diff options
author | Rohan McGovern <rohan@mcgovern.id.au> | 2010-03-06 23:44:26 (GMT) |
---|---|---|
committer | Rohan McGovern <rohan@mcgovern.id.au> | 2010-03-06 23:44:26 (GMT) |
commit | ad341d612129287793620bc84d3077afd64f97a4 (patch) | |
tree | 3d62b038c34985046ad1f3ff56c1c4e85a194ed2 /examples | |
parent | b20ef0ade0aec89b969bd0ae7f754c680e390c67 (diff) | |
parent | 2458cb45665b0fe3144266122f876bd541de9c42 (diff) | |
download | Qt-ad341d612129287793620bc84d3077afd64f97a4.zip Qt-ad341d612129287793620bc84d3077afd64f97a4.tar.gz Qt-ad341d612129287793620bc84d3077afd64f97a4.tar.bz2 |
Merge remote branch 'origin/4.6' into qt-4.7-from-4.6
Conflicts:
configure.exe
examples/multimedia/audioinput/audioinput.cpp
src/corelib/io/qfsfileengine.cpp
src/gui/egl/qegl_wince.cpp
src/gui/egl/qeglproperties.cpp
src/gui/egl/qeglproperties_p.h
src/gui/embedded/directfb.pri
src/gui/kernel/qapplication_win.cpp
src/gui/painting/qdrawutil.cpp
src/opengl/qgl_p.h
src/sql/drivers/odbc/qsql_odbc.cpp
src/sql/drivers/odbc/qsql_odbc.h
tests/auto/auto.pro
tests/auto/qgl/tst_qgl.cpp
translations/assistant_adp_ru.ts
Diffstat (limited to 'examples')
-rw-r--r-- | examples/multimedia/audioinput/audioinput.h | 2 | ||||
-rw-r--r-- | examples/network/qftp/sym_iap_util.h | 16 | ||||
-rw-r--r-- | examples/openvg/star/starwidget.cpp | 5 | ||||
-rw-r--r-- | examples/widgets/softkeys/softkeys.cpp | 38 | ||||
-rw-r--r-- | examples/widgets/softkeys/softkeys.h | 19 | ||||
-rw-r--r-- | examples/widgets/windowflags/controllerwindow.cpp | 2 |
6 files changed, 65 insertions, 17 deletions
diff --git a/examples/multimedia/audioinput/audioinput.h b/examples/multimedia/audioinput/audioinput.h index f87c682..be721de 100644 --- a/examples/multimedia/audioinput/audioinput.h +++ b/examples/multimedia/audioinput/audioinput.h @@ -119,8 +119,8 @@ private: QPushButton *m_suspendResumeButton; QComboBox *m_deviceBox; - AudioInfo *m_audioInfo; QAudioDeviceInfo m_device; + AudioInfo *m_audioInfo; QAudioFormat m_format; QAudioInput *m_audioInput; QIODevice *m_input; diff --git a/examples/network/qftp/sym_iap_util.h b/examples/network/qftp/sym_iap_util.h index 41e43a9..445036a 100644 --- a/examples/network/qftp/sym_iap_util.h +++ b/examples/network/qftp/sym_iap_util.h @@ -60,6 +60,7 @@ //#include <QTextCodec> _LIT(KIapNameSetting, "IAP\\Name"); // text - mandatory +_LIT(KIapTableIdField, "IAP\Id"); _LIT(KIapDialogPref, "IAP\\DialogPref"); // TUnit32 - optional _LIT(KIapService, "IAP\\IAPService"); // TUnit32 - mandatory _LIT(KIapServiceType, "IAP\\IAPServiceType"); // text - mandatory @@ -367,20 +368,25 @@ static QString qt_OfferIapDialog() { CleanupClosePushL(connection); socketServ.Connect(); + + TCommDbConnPref prefs; + prefs.SetDialogPreference(ECommDbDialogPrefPrompt); + connection.Open(socketServ); - connection.Start(); + connection.Start(prefs); connection.GetDesSetting(TPtrC(KIapNameSetting), iapName); - //connection.Stop(); iapName.ZeroTerminate(); QString strIapName((char*)iapName.Ptr()); int error = 0; - if(!qt_SetDefaultIapName(strIapName, error)) { - //printf("failed setdefaultif @ %i with %s and errno = %d \n", __LINE__, strIapName.toUtf8().data(), error); - strIapName = QString(""); + if(!strIapName.isEmpty()) { + if(!qt_SetDefaultIapName(strIapName, error)) { + //printf("failed setdefaultif @ %i with %s and errno = %d \n", __LINE__, strIapName.toUtf8().data(), error); + strIapName = QString(""); + } } CleanupStack::PopAndDestroy(&connection); diff --git a/examples/openvg/star/starwidget.cpp b/examples/openvg/star/starwidget.cpp index bde0719..794ede9 100644 --- a/examples/openvg/star/starwidget.cpp +++ b/examples/openvg/star/starwidget.cpp @@ -93,8 +93,9 @@ void StarWidget::paintEvent(QPaintEvent *) // and prepare to perform raw OpenVG calls. painter.beginNativePainting(); - // Cache the path if we haven't already. - if (path == VG_INVALID_HANDLE) { + // Cache the path if we haven't already or if the path has + // become invalid because the window's context has changed. + if (path == VG_INVALID_HANDLE || !vgGetPathCapabilities(path)) { path = vgCreatePath(VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_F, 1.0f, // scale diff --git a/examples/widgets/softkeys/softkeys.cpp b/examples/widgets/softkeys/softkeys.cpp index cbd227c9..e5c2e73 100644 --- a/examples/widgets/softkeys/softkeys.cpp +++ b/examples/widgets/softkeys/softkeys.cpp @@ -70,6 +70,12 @@ MainWindow::MainWindow(QWidget *parent) toggleButton->setContextMenuPolicy(Qt::NoContextMenu); toggleButton->setCheckable(true); + modeButton = new QPushButton(tr("Loop SK window type"), this); + modeButton->setContextMenuPolicy(Qt::NoContextMenu); + + modeLabel = new QLabel(tr("Normal maximized"), this); + modeLabel->setContextMenuPolicy(Qt::NoContextMenu); + pushButton = new QPushButton(tr("File Dialog"), this); pushButton->setContextMenuPolicy(Qt::NoContextMenu); @@ -87,6 +93,8 @@ MainWindow::MainWindow(QWidget *parent) layout->addWidget(toggleButton, 2, 0); layout->addWidget(pushButton, 2, 1); layout->addWidget(comboBox, 3, 0, 1, 2); + layout->addWidget(modeButton, 4, 0, 1, 2); + layout->addWidget(modeLabel, 5, 0, 1, 2); central->setLayout(layout); fileMenu = menuBar()->addMenu(tr("&File")); @@ -97,6 +105,7 @@ MainWindow::MainWindow(QWidget *parent) connect(pushButton, SIGNAL(clicked()), this, SLOT(openDialog())); connect(exit, SIGNAL(triggered()), this, SLOT(exitApplication())); connect(toggleButton, SIGNAL(clicked()), this, SLOT(setCustomSoftKeys())); + connect(modeButton, SIGNAL(clicked()), this, SLOT(setMode())); pushButton->setFocus(); } @@ -133,6 +142,35 @@ void MainWindow::setCustomSoftKeys() } } +void MainWindow::setMode() +{ + if(isMaximized()) { + showFullScreen(); + modeLabel->setText(tr("Normal Fullscreen")); + } else { + Qt::WindowFlags flags = windowFlags(); + if(flags & Qt::WindowSoftkeysRespondHint) { + flags |= Qt::WindowSoftkeysVisibleHint; + flags &= ~Qt::WindowSoftkeysRespondHint; + setWindowFlags(flags); // Hides visible window + showFullScreen(); + modeLabel->setText(tr("Fullscreen with softkeys")); + } else if(flags & Qt::WindowSoftkeysVisibleHint) { + flags &= ~Qt::WindowSoftkeysVisibleHint; + flags &= ~Qt::WindowSoftkeysRespondHint; + setWindowFlags(flags); // Hides visible window + showMaximized(); + modeLabel->setText(tr("Normal Maximized")); + } else { + flags &= ~Qt::WindowSoftkeysVisibleHint; + flags |= Qt::WindowSoftkeysRespondHint; + setWindowFlags(flags); // Hides visible window + showFullScreen(); + modeLabel->setText(tr("Fullscreen with SK respond")); + } + } +} + void MainWindow::exitApplication() { qApp->exit(); diff --git a/examples/widgets/softkeys/softkeys.h b/examples/widgets/softkeys/softkeys.h index bae31e7..d533484 100644 --- a/examples/widgets/softkeys/softkeys.h +++ b/examples/widgets/softkeys/softkeys.h @@ -57,21 +57,24 @@ private slots: void okPressed(); void cancelPressed(); void setCustomSoftKeys(); + void setMode(); public: MainWindow(QWidget *parent = 0); ~MainWindow(); private: QGridLayout *layout; QWidget *central; - QTextEdit* textEditor; + QTextEdit *textEditor; QLabel *infoLabel; - QPushButton* toggleButton; - QPushButton* pushButton; - QMenu* fileMenu; - QAction* addSoftKeysAct; - QAction* exit; - QAction* ok; - QAction* cancel; + QPushButton *toggleButton; + QPushButton *pushButton; + QPushButton *modeButton; + QLabel *modeLabel; + QMenu *fileMenu; + QAction *addSoftKeysAct; + QAction *exit; + QAction *ok; + QAction *cancel; }; //! [0] diff --git a/examples/widgets/windowflags/controllerwindow.cpp b/examples/widgets/windowflags/controllerwindow.cpp index 0277794..fb82b8f 100644 --- a/examples/widgets/windowflags/controllerwindow.cpp +++ b/examples/widgets/windowflags/controllerwindow.cpp @@ -58,7 +58,7 @@ ControllerWindow::ControllerWindow() bottomLayout->addStretch(); bottomLayout->addWidget(quitButton); - QVBoxLayout *mainLayout = new QVBoxLayout; + QHBoxLayout *mainLayout = new QHBoxLayout; mainLayout->addWidget(typeGroupBox); mainLayout->addWidget(hintsGroupBox); mainLayout->addLayout(bottomLayout); |