diff options
Diffstat (limited to 'examples/itemviews')
63 files changed, 450 insertions, 46 deletions
diff --git a/examples/itemviews/addressbook/addressbook.desktop b/examples/itemviews/addressbook/addressbook.desktop new file mode 100644 index 0000000..11767f5 --- /dev/null +++ b/examples/itemviews/addressbook/addressbook.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Address Book +Exec=/opt/usr/bin/addressbook +Icon=addressbook +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/itemviews/addressbook/addressbook.pro b/examples/itemviews/addressbook/addressbook.pro index f45f92c..d5d4af9 100644 --- a/examples/itemviews/addressbook/addressbook.pro +++ b/examples/itemviews/addressbook/addressbook.pro @@ -20,3 +20,5 @@ symbian { TARGET.UID3 = 0xA000A646 include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) } +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) + diff --git a/examples/itemviews/addressbook/main.cpp b/examples/itemviews/addressbook/main.cpp index 455b275..76efb01 100644 --- a/examples/itemviews/addressbook/main.cpp +++ b/examples/itemviews/addressbook/main.cpp @@ -46,7 +46,11 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); MainWindow mw; +#if defined(Q_OS_SYMBIAN) + mw.showMaximized(); +#else mw.show(); +#endif return app.exec(); } //! [0] diff --git a/examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.desktop b/examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.desktop new file mode 100644 index 0000000..22621f3 --- /dev/null +++ b/examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Basic Sort Filter Model +Exec=/opt/usr/bin/basicsortfiltermodel +Icon=basicsortfiltermodel +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro b/examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro index 1daba5d..cdf9d36 100644 --- a/examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro +++ b/examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro @@ -10,3 +10,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/basicsortfiltermodel INSTALLS += target sources symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) + diff --git a/examples/itemviews/basicsortfiltermodel/main.cpp b/examples/itemviews/basicsortfiltermodel/main.cpp index 84cfd05..750a19e 100644 --- a/examples/itemviews/basicsortfiltermodel/main.cpp +++ b/examples/itemviews/basicsortfiltermodel/main.cpp @@ -88,6 +88,10 @@ int main(int argc, char *argv[]) QApplication app(argc, argv); Window window; window.setSourceModel(createMailModel(&window)); +#if defined(Q_OS_SYMBIAN) + window.showMaximized(); +#else window.show(); +#endif return app.exec(); } diff --git a/examples/itemviews/basicsortfiltermodel/window.cpp b/examples/itemviews/basicsortfiltermodel/window.cpp index f35c1e1..f95c9cc 100644 --- a/examples/itemviews/basicsortfiltermodel/window.cpp +++ b/examples/itemviews/basicsortfiltermodel/window.cpp @@ -47,9 +47,6 @@ Window::Window() proxyModel = new QSortFilterProxyModel; proxyModel->setDynamicSortFilter(true); - sourceGroupBox = new QGroupBox(tr("Original Model")); - proxyGroupBox = new QGroupBox(tr("Sorted/Filtered Model")); - sourceView = new QTreeView; sourceView->setRootIsDecorated(false); sourceView->setAlternatingRowColors(true); @@ -92,6 +89,41 @@ Window::Window() connect(sortCaseSensitivityCheckBox, SIGNAL(toggled(bool)), this, SLOT(sortChanged())); +#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR) + sourceWidget = new QWidget; + filterWidget = new QWidget; + proxyWidget = new QWidget; + + QHBoxLayout *sourceLayout = new QHBoxLayout; + sourceLayout->addWidget(sourceView); + sourceWidget->setLayout(sourceLayout); + + QGridLayout *filterLayout = new QGridLayout; + filterLayout->addWidget(filterPatternLabel, 1, 0); + filterLayout->addWidget(filterPatternLineEdit, 1, 1, 1, 2); + filterLayout->addWidget(filterSyntaxLabel, 2, 0); + filterLayout->addWidget(filterSyntaxComboBox, 2, 1, 1, 2); + filterLayout->addWidget(filterColumnLabel, 3, 0); + filterLayout->addWidget(filterColumnComboBox, 3, 1, 1, 2); + filterLayout->addWidget(filterCaseSensitivityCheckBox, 4, 0, 1, 2); + filterLayout->addWidget(sortCaseSensitivityCheckBox, 4, 2); + filterWidget->setLayout(filterLayout); + + QHBoxLayout *proxyLayout = new QHBoxLayout; + proxyLayout->addWidget(proxyView); + proxyWidget->setLayout(proxyLayout); + + QVBoxLayout *mainLayout = new QVBoxLayout; + + QTabWidget *tabWidget = new QTabWidget; + tabWidget->addTab(sourceWidget, "Source"); + tabWidget->addTab(filterWidget, "Filters"); + tabWidget->addTab(proxyWidget, "Proxy"); + mainLayout->addWidget(tabWidget); +#else + sourceGroupBox = new QGroupBox(tr("Original Model")); + proxyGroupBox = new QGroupBox(tr("Sorted/Filtered Model")); + QHBoxLayout *sourceLayout = new QHBoxLayout; sourceLayout->addWidget(sourceView); sourceGroupBox->setLayout(sourceLayout); @@ -109,8 +141,11 @@ Window::Window() proxyGroupBox->setLayout(proxyLayout); QVBoxLayout *mainLayout = new QVBoxLayout; + mainLayout->addWidget(sourceGroupBox); mainLayout->addWidget(proxyGroupBox); +#endif + setLayout(mainLayout); setWindowTitle(tr("Basic Sort/Filter Model")); diff --git a/examples/itemviews/basicsortfiltermodel/window.h b/examples/itemviews/basicsortfiltermodel/window.h index 92b5008..fbdffc3 100644 --- a/examples/itemviews/basicsortfiltermodel/window.h +++ b/examples/itemviews/basicsortfiltermodel/window.h @@ -71,8 +71,14 @@ private slots: private: QSortFilterProxyModel *proxyModel; +#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR) + QWidget *sourceWidget; + QWidget *filterWidget; + QWidget *proxyWidget; +#else QGroupBox *sourceGroupBox; QGroupBox *proxyGroupBox; +#endif QTreeView *sourceView; QTreeView *proxyView; QCheckBox *filterCaseSensitivityCheckBox; diff --git a/examples/itemviews/chart/chart.desktop b/examples/itemviews/chart/chart.desktop new file mode 100644 index 0000000..73e017b --- /dev/null +++ b/examples/itemviews/chart/chart.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Chart +Exec=/opt/usr/bin/chart +Icon=chart +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/itemviews/chart/chart.pro b/examples/itemviews/chart/chart.pro index 12f08b9..b8f00cb 100644 --- a/examples/itemviews/chart/chart.pro +++ b/examples/itemviews/chart/chart.pro @@ -18,3 +18,5 @@ symbian { TARGET.UID3 = 0xA000A647 include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) } +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) + diff --git a/examples/itemviews/chart/main.cpp b/examples/itemviews/chart/main.cpp index 9366540..52d8f28 100644 --- a/examples/itemviews/chart/main.cpp +++ b/examples/itemviews/chart/main.cpp @@ -48,6 +48,10 @@ int main(int argc, char *argv[]) QApplication app(argc, argv); MainWindow window; +#if defined(Q_OS_SYMBIAN) + window.showMaximized(); +#else window.show(); +#endif return app.exec(); } diff --git a/examples/itemviews/coloreditorfactory/coloreditorfactory.desktop b/examples/itemviews/coloreditorfactory/coloreditorfactory.desktop new file mode 100644 index 0000000..70b9664 --- /dev/null +++ b/examples/itemviews/coloreditorfactory/coloreditorfactory.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Color Editor Factory +Exec=/opt/usr/bin/coloreditorfactory +Icon=coloreditorfactory +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/itemviews/coloreditorfactory/coloreditorfactory.pro b/examples/itemviews/coloreditorfactory/coloreditorfactory.pro index 934d880..2416eb9 100644 --- a/examples/itemviews/coloreditorfactory/coloreditorfactory.pro +++ b/examples/itemviews/coloreditorfactory/coloreditorfactory.pro @@ -11,3 +11,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/coloreditorfactory INSTALLS += target sources symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) + +symbian: warning(This example might not fully work on Symbian platform) +maemo5: warning(This example might not fully work on Maemo platform) diff --git a/examples/itemviews/coloreditorfactory/main.cpp b/examples/itemviews/coloreditorfactory/main.cpp index aa46cc5..8b7eff4 100644 --- a/examples/itemviews/coloreditorfactory/main.cpp +++ b/examples/itemviews/coloreditorfactory/main.cpp @@ -47,7 +47,11 @@ int main(int argv, char **args) QApplication app(argv, args); Window window; +#if defined(Q_OS_SYMBIAN) + window.showMaximized(); +#else window.show(); +#endif return app.exec(); } diff --git a/examples/itemviews/combowidgetmapper/combowidgetmapper.desktop b/examples/itemviews/combowidgetmapper/combowidgetmapper.desktop new file mode 100644 index 0000000..3bbf6ad --- /dev/null +++ b/examples/itemviews/combowidgetmapper/combowidgetmapper.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Combo Widget Mapper +Exec=/opt/usr/bin/combowidgetmapper +Icon=combowidgetmapper +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/itemviews/combowidgetmapper/combowidgetmapper.pro b/examples/itemviews/combowidgetmapper/combowidgetmapper.pro index 7f5c8e8..28dffa4 100644 --- a/examples/itemviews/combowidgetmapper/combowidgetmapper.pro +++ b/examples/itemviews/combowidgetmapper/combowidgetmapper.pro @@ -7,3 +7,6 @@ target.path = $$[QT_INSTALL_EXAMPLES]/itemviews/combowidgetmapper sources.files = $$SOURCES $$HEADERS *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/combowidgetmapper INSTALLS += target sources + +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) diff --git a/examples/itemviews/combowidgetmapper/main.cpp b/examples/itemviews/combowidgetmapper/main.cpp index 41e756d..9e45ede 100644 --- a/examples/itemviews/combowidgetmapper/main.cpp +++ b/examples/itemviews/combowidgetmapper/main.cpp @@ -46,6 +46,10 @@ int main(int argc, char **argv) { QApplication app(argc, argv); Window window; +#if defined(Q_OS_SYMBIAN) + window.showMaximized(); +#else window.show(); +#endif return app.exec(); } diff --git a/examples/itemviews/customsortfiltermodel/customsortfiltermodel.desktop b/examples/itemviews/customsortfiltermodel/customsortfiltermodel.desktop new file mode 100644 index 0000000..3c961f7 --- /dev/null +++ b/examples/itemviews/customsortfiltermodel/customsortfiltermodel.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Custom Sort Filter Model +Exec=/opt/usr/bin/customsortfiltermodel +Icon=customsortfiltermodel +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/itemviews/customsortfiltermodel/customsortfiltermodel.pro b/examples/itemviews/customsortfiltermodel/customsortfiltermodel.pro index df32a2b..8754d5e 100644 --- a/examples/itemviews/customsortfiltermodel/customsortfiltermodel.pro +++ b/examples/itemviews/customsortfiltermodel/customsortfiltermodel.pro @@ -12,3 +12,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/customsortfiltermodel INSTALLS += target sources symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) diff --git a/examples/itemviews/customsortfiltermodel/main.cpp b/examples/itemviews/customsortfiltermodel/main.cpp index b35b847..4154dbf 100644 --- a/examples/itemviews/customsortfiltermodel/main.cpp +++ b/examples/itemviews/customsortfiltermodel/main.cpp @@ -89,7 +89,11 @@ int main(int argc, char *argv[]) QApplication app(argc, argv); Window window; window.setSourceModel(createMailModel(&window)); +#if defined(Q_OS_SYMBIAN) + window.showMaximized(); +#else window.show(); +#endif return app.exec(); } //! [0] diff --git a/examples/itemviews/customsortfiltermodel/window.cpp b/examples/itemviews/customsortfiltermodel/window.cpp index 555e854..51fdcb7 100644 --- a/examples/itemviews/customsortfiltermodel/window.cpp +++ b/examples/itemviews/customsortfiltermodel/window.cpp @@ -48,22 +48,27 @@ Window::Window() { proxyModel = new MySortFilterProxyModel(this); proxyModel->setDynamicSortFilter(true); -//! [0] + //! [0] -//! [1] + //! [1] sourceView = new QTreeView; sourceView->setRootIsDecorated(false); sourceView->setAlternatingRowColors(true); -//! [1] + //! [1] QHBoxLayout *sourceLayout = new QHBoxLayout; -//! [2] + //! [2] sourceLayout->addWidget(sourceView); +#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR) + sourceWidget = new QWidget; + sourceWidget->setLayout(sourceLayout); +#else sourceGroupBox = new QGroupBox(tr("Original Model")); sourceGroupBox->setLayout(sourceLayout); -//! [2] +#endif + //! [2] -//! [3] + //! [3] filterCaseSensitivityCheckBox = new QCheckBox(tr("Case sensitive filter")); filterCaseSensitivityCheckBox->setChecked(true); @@ -97,11 +102,11 @@ Window::Window() connect(fromDateEdit, SIGNAL(dateChanged(QDate)), this, SLOT(dateFilterChanged())); connect(toDateEdit, SIGNAL(dateChanged(QDate)), -//! [3] //! [4] + //! [3] //! [4] this, SLOT(dateFilterChanged())); -//! [4] + //! [4] -//! [5] + //! [5] proxyView = new QTreeView; proxyView->setRootIsDecorated(false); proxyView->setAlternatingRowColors(true); @@ -109,6 +114,26 @@ Window::Window() proxyView->setSortingEnabled(true); proxyView->sortByColumn(1, Qt::AscendingOrder); +#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR) + QGridLayout *filterLayout = new QGridLayout; + filterLayout->addWidget(filterPatternLabel, 0, 0); + filterLayout->addWidget(filterPatternLineEdit, 0, 1); + filterLayout->addWidget(filterSyntaxComboBox, 0, 2); + filterLayout->addWidget(filterCaseSensitivityCheckBox, 1, 0, 1, 3); + filterLayout->addWidget(fromLabel, 2, 0); + filterLayout->addWidget(fromDateEdit, 2, 1, 1, 2); + filterLayout->addWidget(toLabel, 3, 0); + filterLayout->addWidget(toDateEdit, 3, 1, 1, 2); + + filterWidget = new QWidget; + filterWidget->setLayout(filterLayout); + + QHBoxLayout *proxyLayout = new QHBoxLayout; + proxyLayout->addWidget(proxyView); + + proxyWidget = new QWidget; + proxyWidget->setLayout(proxyLayout); +#else QGridLayout *proxyLayout = new QGridLayout; proxyLayout->addWidget(proxyView, 0, 0, 1, 3); proxyLayout->addWidget(filterPatternLabel, 1, 0); @@ -122,9 +147,21 @@ Window::Window() proxyGroupBox = new QGroupBox(tr("Sorted/Filtered Model")); proxyGroupBox->setLayout(proxyLayout); -//! [5] +#endif + //! [5] -//! [6] + //! [6] +#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR) + QTabWidget *tabWidget = new QTabWidget; + tabWidget->addTab(sourceWidget, "Original"); + tabWidget->addTab(filterWidget, "Filters"); + tabWidget->addTab(proxyWidget, "Sorted"); + + QVBoxLayout *mainLayout = new QVBoxLayout; + mainLayout->addWidget(tabWidget); + setLayout(mainLayout); + setWindowTitle(tr("Custom Model")); +#else QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addWidget(sourceGroupBox); mainLayout->addWidget(proxyGroupBox); @@ -132,6 +169,7 @@ Window::Window() setWindowTitle(tr("Custom Sort/Filter Model")); resize(500, 450); +#endif } //! [6] @@ -151,7 +189,7 @@ void Window::textFilterChanged() filterSyntaxComboBox->currentIndex()).toInt()); Qt::CaseSensitivity caseSensitivity = filterCaseSensitivityCheckBox->isChecked() ? Qt::CaseSensitive - : Qt::CaseInsensitive; + : Qt::CaseInsensitive; QRegExp regExp(filterPatternLineEdit->text(), caseSensitivity, syntax); proxyModel->setFilterRegExp(regExp); diff --git a/examples/itemviews/customsortfiltermodel/window.h b/examples/itemviews/customsortfiltermodel/window.h index 15baffc..50ec1f4 100644 --- a/examples/itemviews/customsortfiltermodel/window.h +++ b/examples/itemviews/customsortfiltermodel/window.h @@ -72,8 +72,14 @@ private slots: private: MySortFilterProxyModel *proxyModel; +#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5 ) || defined(Q_WS_SIMULATOR) + QWidget *sourceWidget; + QWidget *filterWidget; + QWidget *proxyWidget; +#else QGroupBox *sourceGroupBox; QGroupBox *proxyGroupBox; +#endif QTreeView *sourceView; QTreeView *proxyView; QCheckBox *filterCaseSensitivityCheckBox; diff --git a/examples/itemviews/dirview/dirview.desktop b/examples/itemviews/dirview/dirview.desktop new file mode 100644 index 0000000..51ec4df --- /dev/null +++ b/examples/itemviews/dirview/dirview.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Dir View +Exec=/opt/usr/bin/dirview +Icon=dirview +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/itemviews/dirview/dirview.pro b/examples/itemviews/dirview/dirview.pro index 3197000..b0ee17f 100644 --- a/examples/itemviews/dirview/dirview.pro +++ b/examples/itemviews/dirview/dirview.pro @@ -7,3 +7,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/dirview INSTALLS += target sources symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) + diff --git a/examples/itemviews/dirview/main.cpp b/examples/itemviews/dirview/main.cpp index ffa287b..3500d7b 100644 --- a/examples/itemviews/dirview/main.cpp +++ b/examples/itemviews/dirview/main.cpp @@ -55,8 +55,12 @@ int main(int argc, char *argv[]) tree.setSortingEnabled(true); tree.setWindowTitle(QObject::tr("Dir View")); +#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) + tree.showMaximized(); +#else tree.resize(640, 480); tree.show(); +#endif return app.exec(); } diff --git a/examples/itemviews/editabletreemodel/editabletreemodel.desktop b/examples/itemviews/editabletreemodel/editabletreemodel.desktop new file mode 100644 index 0000000..17d1733 --- /dev/null +++ b/examples/itemviews/editabletreemodel/editabletreemodel.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Editable Tree Model +Exec=/opt/usr/bin/editabletreemodel +Icon=editabletreemodel +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/itemviews/editabletreemodel/editabletreemodel.pro b/examples/itemviews/editabletreemodel/editabletreemodel.pro index d9ce803..941bee6 100644 --- a/examples/itemviews/editabletreemodel/editabletreemodel.pro +++ b/examples/itemviews/editabletreemodel/editabletreemodel.pro @@ -16,3 +16,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/editabletreemodel INSTALLS += target sources symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) + diff --git a/examples/itemviews/editabletreemodel/main.cpp b/examples/itemviews/editabletreemodel/main.cpp index b6e6b02..d8b3b9b 100644 --- a/examples/itemviews/editabletreemodel/main.cpp +++ b/examples/itemviews/editabletreemodel/main.cpp @@ -48,6 +48,10 @@ int main(int argc, char *argv[]) QApplication app(argc, argv); MainWindow window; +#if defined(Q_OS_SYMBIAN) + window.showMaximized(); +#else window.show(); +#endif return app.exec(); } diff --git a/examples/itemviews/editabletreemodel/mainwindow.cpp b/examples/itemviews/editabletreemodel/mainwindow.cpp index 6f08ced..486a9ad 100644 --- a/examples/itemviews/editabletreemodel/mainwindow.cpp +++ b/examples/itemviews/editabletreemodel/mainwindow.cpp @@ -48,6 +48,11 @@ MainWindow::MainWindow(QWidget *parent) { setupUi(this); +#ifdef Q_WS_MAEMO_5 + // Alternating row colors look bad on Maemo + view->setAlternatingRowColors(false); +#endif + QStringList headers; headers << tr("Title") << tr("Description"); diff --git a/examples/itemviews/fetchmore/fetchmore.desktop b/examples/itemviews/fetchmore/fetchmore.desktop new file mode 100644 index 0000000..b8c9ff3 --- /dev/null +++ b/examples/itemviews/fetchmore/fetchmore.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Fetch More +Exec=/opt/usr/bin/fetchmore +Icon=fetchmore +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/itemviews/fetchmore/fetchmore.pro b/examples/itemviews/fetchmore/fetchmore.pro index dcb84ed..f620fba 100644 --- a/examples/itemviews/fetchmore/fetchmore.pro +++ b/examples/itemviews/fetchmore/fetchmore.pro @@ -10,3 +10,5 @@ sources.files = $$SOURCES $$HEADERS *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/fetchmore INSTALLS += target sources +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) diff --git a/examples/itemviews/fetchmore/main.cpp b/examples/itemviews/fetchmore/main.cpp index aedfd9f..c2deca3 100644 --- a/examples/itemviews/fetchmore/main.cpp +++ b/examples/itemviews/fetchmore/main.cpp @@ -45,6 +45,10 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); Window window; +#if defined(Q_OS_SYMBIAN) + window.showMaximized(); +#else window.show(); +#endif return app.exec(); } diff --git a/examples/itemviews/frozencolumn/frozencolumn.desktop b/examples/itemviews/frozencolumn/frozencolumn.desktop new file mode 100644 index 0000000..3d1e3b4 --- /dev/null +++ b/examples/itemviews/frozencolumn/frozencolumn.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Frozen Column +Exec=/opt/usr/bin/frozencolumn +Icon=frozencolumn +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/itemviews/frozencolumn/frozencolumn.pro b/examples/itemviews/frozencolumn/frozencolumn.pro index 361de5b..c79c7cc 100644 --- a/examples/itemviews/frozencolumn/frozencolumn.pro +++ b/examples/itemviews/frozencolumn/frozencolumn.pro @@ -7,3 +7,6 @@ target.path = $$[QT_INSTALL_EXAMPLES]/itemviews/frozencolumn sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/frozencolumn INSTALLS += target sources + +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) diff --git a/examples/itemviews/frozencolumn/main.cpp b/examples/itemviews/frozencolumn/main.cpp index f6aa489..79f8ad4 100644 --- a/examples/itemviews/frozencolumn/main.cpp +++ b/examples/itemviews/frozencolumn/main.cpp @@ -81,8 +81,14 @@ int main( int argc, char** argv ) FreezeTableWidget *tableView = new FreezeTableWidget(model); tableView->setWindowTitle(QObject::tr("Frozen Column Example")); +#if defined(Q_OS_SYMBIAN) + tableView->showMaximized(); +#elif defined(Q_WS_MAEMO_5) + tableView->show(); +#else tableView->resize(560,680); tableView->show(); +#endif return app.exec(); } diff --git a/examples/itemviews/itemviews.pro b/examples/itemviews/itemviews.pro index 56eeee1..137599c 100644 --- a/examples/itemviews/itemviews.pro +++ b/examples/itemviews/itemviews.pro @@ -2,7 +2,6 @@ TEMPLATE = subdirs SUBDIRS = addressbook \ basicsortfiltermodel \ chart \ - coloreditorfactory \ combowidgetmapper \ customsortfiltermodel \ dirview \ @@ -14,16 +13,10 @@ SUBDIRS = addressbook \ simpledommodel \ simpletreemodel \ simplewidgetmapper \ - spinboxdelegate \ - stardelegate - -symbian: SUBDIRS = \ - addressbook \ - chart + spinboxdelegate # install sources.files = README *.pro sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews INSTALLS += sources -symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/itemviews/pixelator/main.cpp b/examples/itemviews/pixelator/main.cpp index e7f45e3..0324b3a 100644 --- a/examples/itemviews/pixelator/main.cpp +++ b/examples/itemviews/pixelator/main.cpp @@ -48,7 +48,11 @@ int main(int argc, char *argv[]) QApplication app(argc, argv); MainWindow window; +#if defined(Q_OS_SYMBIAN) + window.showMaximized(); +#else window.show(); +#endif window.openImage(":/images/qt.png"); return app.exec(); } diff --git a/examples/itemviews/pixelator/pixelator.desktop b/examples/itemviews/pixelator/pixelator.desktop new file mode 100644 index 0000000..751deb1 --- /dev/null +++ b/examples/itemviews/pixelator/pixelator.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Pixelator +Exec=/opt/usr/bin/pixelator +Icon=pixelator +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/itemviews/pixelator/pixelator.pro b/examples/itemviews/pixelator/pixelator.pro index a41d906..60ed7ba 100644 --- a/examples/itemviews/pixelator/pixelator.pro +++ b/examples/itemviews/pixelator/pixelator.pro @@ -14,3 +14,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/pixelator INSTALLS += target sources symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) + diff --git a/examples/itemviews/pixelator/pixeldelegate.cpp b/examples/itemviews/pixelator/pixeldelegate.cpp index 9ec88e6..2c026e1 100644 --- a/examples/itemviews/pixelator/pixeldelegate.cpp +++ b/examples/itemviews/pixelator/pixeldelegate.cpp @@ -80,7 +80,7 @@ void PixelDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, painter->setBrush(option.palette.highlightedText()); else //! [2] - painter->setBrush(QBrush(Qt::black)); + painter->setBrush(option.palette.text()); //! [9] //! [10] diff --git a/examples/itemviews/puzzle/main.cpp b/examples/itemviews/puzzle/main.cpp index 6034194..bdba287 100644 --- a/examples/itemviews/puzzle/main.cpp +++ b/examples/itemviews/puzzle/main.cpp @@ -49,6 +49,10 @@ int main(int argc, char *argv[]) QApplication app(argc, argv); MainWindow window; window.openImage(":/images/example.jpg"); +#if defined(Q_OS_SYMBIAN) + window.showMaximized(); +#else window.show(); +#endif return app.exec(); } diff --git a/examples/itemviews/puzzle/mainwindow.cpp b/examples/itemviews/puzzle/mainwindow.cpp index 4d6da11..6fd5d63 100644 --- a/examples/itemviews/puzzle/mainwindow.cpp +++ b/examples/itemviews/puzzle/mainwindow.cpp @@ -50,7 +50,7 @@ MainWindow::MainWindow(QWidget *parent) { setupMenus(); setupWidgets(); - model = new PiecesModel(this); + model = new PiecesModel(puzzleWidget->pieceSize(), this); piecesList->setModel(model); setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); @@ -92,8 +92,8 @@ void MainWindow::setupPuzzle() { int size = qMin(puzzleImage.width(), puzzleImage.height()); puzzleImage = puzzleImage.copy((puzzleImage.width() - size)/2, - (puzzleImage.height() - size)/2, size, size).scaled(400, - 400, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); + (puzzleImage.height() - size)/2, size, size).scaled(puzzleWidget->imageSize(), + puzzleWidget->imageSize(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation); qsrand(QCursor::pos().x() ^ QCursor::pos().y()); @@ -125,21 +125,25 @@ void MainWindow::setupWidgets() QFrame *frame = new QFrame; QHBoxLayout *frameLayout = new QHBoxLayout(frame); +#if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR) + puzzleWidget = new PuzzleWidget(260); +#else + puzzleWidget = new PuzzleWidget(400); +#endif + piecesList = new QListView; piecesList->setDragEnabled(true); piecesList->setViewMode(QListView::IconMode); - piecesList->setIconSize(QSize(60, 60)); - piecesList->setGridSize(QSize(80, 80)); + piecesList->setIconSize(QSize(puzzleWidget->pieceSize() - 20, puzzleWidget->pieceSize() - 20)); + piecesList->setGridSize(QSize(puzzleWidget->pieceSize(), puzzleWidget->pieceSize())); piecesList->setSpacing(10); piecesList->setMovement(QListView::Snap); piecesList->setAcceptDrops(true); piecesList->setDropIndicatorShown(true); - PiecesModel *model = new PiecesModel(this); + PiecesModel *model = new PiecesModel(puzzleWidget->pieceSize(), this); piecesList->setModel(model); - puzzleWidget = new PuzzleWidget; - connect(puzzleWidget, SIGNAL(puzzleCompleted()), this, SLOT(setCompleted()), Qt::QueuedConnection); diff --git a/examples/itemviews/puzzle/piecesmodel.cpp b/examples/itemviews/puzzle/piecesmodel.cpp index 4235050..520b571 100644 --- a/examples/itemviews/puzzle/piecesmodel.cpp +++ b/examples/itemviews/puzzle/piecesmodel.cpp @@ -42,8 +42,8 @@ #include "piecesmodel.h" -PiecesModel::PiecesModel(QObject *parent) - : QAbstractListModel(parent) +PiecesModel::PiecesModel(int pieceSize, QObject *parent) + : QAbstractListModel(parent), m_PieceSize(pieceSize) { } @@ -53,7 +53,7 @@ QVariant PiecesModel::data(const QModelIndex &index, int role) const return QVariant(); if (role == Qt::DecorationRole) - return QIcon(pixmaps.value(index.row()).scaled(60, 60, + return QIcon(pixmaps.value(index.row()).scaled(m_PieceSize, m_PieceSize, Qt::KeepAspectRatio, Qt::SmoothTransformation)); else if (role == Qt::UserRole) return pixmaps.value(index.row()); @@ -196,7 +196,7 @@ void PiecesModel::addPieces(const QPixmap& pixmap) endRemoveRows(); for (int y = 0; y < 5; ++y) { for (int x = 0; x < 5; ++x) { - QPixmap pieceImage = pixmap.copy(x*80, y*80, 80, 80); + QPixmap pieceImage = pixmap.copy(x*m_PieceSize, y*m_PieceSize, m_PieceSize, m_PieceSize); addPiece(pieceImage, QPoint(x, y)); } } diff --git a/examples/itemviews/puzzle/piecesmodel.h b/examples/itemviews/puzzle/piecesmodel.h index 30bbdf8..40079fe 100644 --- a/examples/itemviews/puzzle/piecesmodel.h +++ b/examples/itemviews/puzzle/piecesmodel.h @@ -56,7 +56,7 @@ class PiecesModel : public QAbstractListModel Q_OBJECT public: - PiecesModel(QObject *parent = 0); + PiecesModel(int pieceSize, QObject *parent = 0); QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; Qt::ItemFlags flags(const QModelIndex &index) const; @@ -75,6 +75,8 @@ public: private: QList<QPoint> locations; QList<QPixmap> pixmaps; + + int m_PieceSize; }; #endif diff --git a/examples/itemviews/puzzle/puzzle.desktop b/examples/itemviews/puzzle/puzzle.desktop new file mode 100644 index 0000000..d493e7d --- /dev/null +++ b/examples/itemviews/puzzle/puzzle.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Item Views Puzzle +Exec=/opt/usr/bin/puzzle +Icon=puzzle +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/itemviews/puzzle/puzzle.pro b/examples/itemviews/puzzle/puzzle.pro index b1c490a..dd900df 100644 --- a/examples/itemviews/puzzle/puzzle.pro +++ b/examples/itemviews/puzzle/puzzle.pro @@ -19,3 +19,5 @@ wince* { DEPLOYMENT_PLUGIN += qjpeg qgif qtiff } +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) + diff --git a/examples/itemviews/puzzle/puzzlewidget.cpp b/examples/itemviews/puzzle/puzzlewidget.cpp index a0d769d..261e008 100644 --- a/examples/itemviews/puzzle/puzzlewidget.cpp +++ b/examples/itemviews/puzzle/puzzlewidget.cpp @@ -42,12 +42,12 @@ #include "puzzlewidget.h" -PuzzleWidget::PuzzleWidget(QWidget *parent) - : QWidget(parent) +PuzzleWidget::PuzzleWidget(int imageSize, QWidget *parent) + : QWidget(parent), m_ImageSize(imageSize) { setAcceptDrops(true); - setMinimumSize(400, 400); - setMaximumSize(400, 400); + setMinimumSize(m_ImageSize, m_ImageSize); + setMaximumSize(m_ImageSize, m_ImageSize); } void PuzzleWidget::clear() @@ -116,7 +116,7 @@ void PuzzleWidget::dropEvent(QDropEvent *event) event->setDropAction(Qt::MoveAction); event->accept(); - if (location == QPoint(square.x()/80, square.y()/80)) { + if (location == QPoint(square.x()/pieceSize(), square.y()/pieceSize())) { inPlace++; if (inPlace == 25) emit puzzleCompleted(); @@ -151,7 +151,7 @@ void PuzzleWidget::mousePressEvent(QMouseEvent *event) piecePixmaps.removeAt(found); pieceRects.removeAt(found); - if (location == QPoint(square.x()/80, square.y()/80)) + if (location == QPoint(square.x()/pieceSize(), square.y()/pieceSize())) inPlace--; update(square); @@ -175,7 +175,7 @@ void PuzzleWidget::mousePressEvent(QMouseEvent *event) pieceRects.insert(found, square); update(targetSquare(event->pos())); - if (location == QPoint(square.x()/80, square.y()/80)) + if (location == QPoint(square.x()/pieceSize(), square.y()/pieceSize())) inPlace++; } } @@ -200,5 +200,15 @@ void PuzzleWidget::paintEvent(QPaintEvent *event) const QRect PuzzleWidget::targetSquare(const QPoint &position) const { - return QRect(position.x()/80 * 80, position.y()/80 * 80, 80, 80); + return QRect(position.x()/pieceSize() * pieceSize(), position.y()/pieceSize() * pieceSize(), pieceSize(), pieceSize()); +} + +int PuzzleWidget::pieceSize() const +{ + return m_ImageSize / 5; +} + +int PuzzleWidget::imageSize() const +{ + return m_ImageSize; } diff --git a/examples/itemviews/puzzle/puzzlewidget.h b/examples/itemviews/puzzle/puzzlewidget.h index e0356b4..2cc789c 100644 --- a/examples/itemviews/puzzle/puzzlewidget.h +++ b/examples/itemviews/puzzle/puzzlewidget.h @@ -57,9 +57,12 @@ class PuzzleWidget : public QWidget Q_OBJECT public: - PuzzleWidget(QWidget *parent = 0); + PuzzleWidget(int imageSize, QWidget *parent = 0); void clear(); + int pieceSize() const; + int imageSize() const; + signals: void puzzleCompleted(); @@ -80,6 +83,7 @@ private: QList<QPoint> pieceLocations; QRect highlightedRect; int inPlace; + int m_ImageSize; }; #endif diff --git a/examples/itemviews/simpledommodel/main.cpp b/examples/itemviews/simpledommodel/main.cpp index 74a14b0..94496f8 100644 --- a/examples/itemviews/simpledommodel/main.cpp +++ b/examples/itemviews/simpledommodel/main.cpp @@ -46,7 +46,13 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); MainWindow window; +#if defined(Q_OS_SYMBIAN) + window.showMaximized(); +#elif defined(Q_WS_MAEMO_5) + window.show(); +#else window.resize(640, 480); window.show(); +#endif return app.exec(); } diff --git a/examples/itemviews/simpledommodel/simpledommodel.desktop b/examples/itemviews/simpledommodel/simpledommodel.desktop new file mode 100644 index 0000000..a53b896 --- /dev/null +++ b/examples/itemviews/simpledommodel/simpledommodel.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Simple DOM Model +Exec=/opt/usr/bin/simpledommodel +Icon=simpledommodel +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/itemviews/simpledommodel/simpledommodel.pro b/examples/itemviews/simpledommodel/simpledommodel.pro index c0c4b1d..2022dad 100644 --- a/examples/itemviews/simpledommodel/simpledommodel.pro +++ b/examples/itemviews/simpledommodel/simpledommodel.pro @@ -15,3 +15,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/simpledommodel INSTALLS += target sources symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) + diff --git a/examples/itemviews/simpletreemodel/main.cpp b/examples/itemviews/simpletreemodel/main.cpp index b14b524..6401695 100644 --- a/examples/itemviews/simpletreemodel/main.cpp +++ b/examples/itemviews/simpletreemodel/main.cpp @@ -56,6 +56,10 @@ int main(int argc, char *argv[]) QTreeView view; view.setModel(&model); view.setWindowTitle(QObject::tr("Simple Tree Model")); +#if defined(Q_OS_SYMBIAN) + view.showMaximized(); +#else view.show(); +#endif return app.exec(); } diff --git a/examples/itemviews/simpletreemodel/simpletreemodel.desktop b/examples/itemviews/simpletreemodel/simpletreemodel.desktop new file mode 100644 index 0000000..361202f --- /dev/null +++ b/examples/itemviews/simpletreemodel/simpletreemodel.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Simple Tree Model +Exec=/opt/usr/bin/simpletreemodel +Icon=simpletreemodel +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/itemviews/simpletreemodel/simpletreemodel.pro b/examples/itemviews/simpletreemodel/simpletreemodel.pro index 4f0e7c4..20de835 100644 --- a/examples/itemviews/simpletreemodel/simpletreemodel.pro +++ b/examples/itemviews/simpletreemodel/simpletreemodel.pro @@ -13,3 +13,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/simpletreemodel INSTALLS += target sources symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) + diff --git a/examples/itemviews/simplewidgetmapper/main.cpp b/examples/itemviews/simplewidgetmapper/main.cpp index 41e756d..9e45ede 100644 --- a/examples/itemviews/simplewidgetmapper/main.cpp +++ b/examples/itemviews/simplewidgetmapper/main.cpp @@ -46,6 +46,10 @@ int main(int argc, char **argv) { QApplication app(argc, argv); Window window; +#if defined(Q_OS_SYMBIAN) + window.showMaximized(); +#else window.show(); +#endif return app.exec(); } diff --git a/examples/itemviews/simplewidgetmapper/simplewidgetmapper.desktop b/examples/itemviews/simplewidgetmapper/simplewidgetmapper.desktop new file mode 100644 index 0000000..6b09a23 --- /dev/null +++ b/examples/itemviews/simplewidgetmapper/simplewidgetmapper.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Simple Widget Mapper +Exec=/opt/usr/bin/simplewidgetmapper +Icon=simplewidgetmapper +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/itemviews/simplewidgetmapper/simplewidgetmapper.pro b/examples/itemviews/simplewidgetmapper/simplewidgetmapper.pro index 67eaf11..ca3945e 100644 --- a/examples/itemviews/simplewidgetmapper/simplewidgetmapper.pro +++ b/examples/itemviews/simplewidgetmapper/simplewidgetmapper.pro @@ -9,3 +9,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/simplewidgetmapper INSTALLS += target sources symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) + diff --git a/examples/itemviews/spinboxdelegate/main.cpp b/examples/itemviews/spinboxdelegate/main.cpp index e078d7f..50d2ef1 100644 --- a/examples/itemviews/spinboxdelegate/main.cpp +++ b/examples/itemviews/spinboxdelegate/main.cpp @@ -80,7 +80,11 @@ int main(int argc, char *argv[]) //! [3] tableView.setWindowTitle(QObject::tr("Spin Box Delegate")); +#if defined(Q_OS_SYMBIAN) + tableView.showMaximized(); +#else tableView.show(); +#endif return app.exec(); } //! [3] diff --git a/examples/itemviews/spinboxdelegate/spinboxdelegate.desktop b/examples/itemviews/spinboxdelegate/spinboxdelegate.desktop new file mode 100644 index 0000000..347e408 --- /dev/null +++ b/examples/itemviews/spinboxdelegate/spinboxdelegate.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Spin Box Delegate +Exec=/opt/usr/bin/spinboxdelegate +Icon=spinboxdelegate +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/itemviews/spinboxdelegate/spinboxdelegate.pro b/examples/itemviews/spinboxdelegate/spinboxdelegate.pro index 42e957b..df36781 100644 --- a/examples/itemviews/spinboxdelegate/spinboxdelegate.pro +++ b/examples/itemviews/spinboxdelegate/spinboxdelegate.pro @@ -9,3 +9,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/spinboxdelegate INSTALLS += target sources symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) + +symbian: warning(This example might not fully work on Symbian platform) +maemo5: warning(This example might not fully work on Maemo platform) +simulator: warning(This example might not fully work on Simulator platform) diff --git a/examples/itemviews/stardelegate/main.cpp b/examples/itemviews/stardelegate/main.cpp index 1af54d0..4f5c861 100644 --- a/examples/itemviews/stardelegate/main.cpp +++ b/examples/itemviews/stardelegate/main.cpp @@ -100,7 +100,11 @@ int main(int argc, char *argv[]) tableWidget.resizeColumnsToContents(); tableWidget.resize(500, 300); +#if defined(Q_OS_SYMBIAN) + tableWidget.showMaximized(); +#else tableWidget.show(); +#endif return app.exec(); } diff --git a/examples/itemviews/stardelegate/stardelegate.desktop b/examples/itemviews/stardelegate/stardelegate.desktop new file mode 100644 index 0000000..d508c3b --- /dev/null +++ b/examples/itemviews/stardelegate/stardelegate.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Star Delegate +Exec=/opt/usr/bin/stardelegate +Icon=stardelegate +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/itemviews/stardelegate/stardelegate.pro b/examples/itemviews/stardelegate/stardelegate.pro index 5b5c10b..50ef5cf 100644 --- a/examples/itemviews/stardelegate/stardelegate.pro +++ b/examples/itemviews/stardelegate/stardelegate.pro @@ -13,4 +13,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/itemviews/stardelegate INSTALLS += target sources symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) +symbian: warning(This example might not fully work on Symbian platform) +maemo5: warning(This example might not fully work on Maemo platform) +simulator: warning(This example might not fully work on Simulator platform) |