From c2d66b27bfbfbce21922eef7fb14a366092f746c Mon Sep 17 00:00:00 2001 From: pavelpa Date: Wed, 13 Jan 2010 09:19:07 +0000 Subject: [PATCH] added about dialog(s) - some modifications needed - About Qt: not scrollable - About app: modifications to display items in system font/colors needed --- src/gui/about.ui | 222 +++++++++++++++++++++++++++++++++++++++++ src/gui/gui.pro | 3 +- src/gui/mainwindow.cpp | 17 +++- src/gui/mainwindow.h | 2 + src/gui/mainwindow.ui | 81 +++++++++++++++ 5 files changed, 322 insertions(+), 3 deletions(-) create mode 100644 src/gui/about.ui diff --git a/src/gui/about.ui b/src/gui/about.ui new file mode 100644 index 0000000..2941aa8 --- /dev/null +++ b/src/gui/about.ui @@ -0,0 +1,222 @@ + + AboutDialog + + + Qt::WindowModal + + + + 0 + 0 + 500 + 300 + + + + + 0 + 0 + + + + + 77 + 77 + + + + + 500 + 300 + + + + + + + + + 239 + 235 + 231 + + + + + + + 239 + 235 + 231 + + + + + + + + + 239 + 235 + 231 + + + + + + + 239 + 235 + 231 + + + + + + + + + 255 + 255 + 255 + + + + + + + 239 + 235 + 231 + + + + + + + + About application + + + + + + + + + + + + + + 0 + 0 + + + + + + + :/icons/fosdem.png + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + true + + + true + + + + + + QFrame::NoFrame + + + QFrame::Plain + + + true + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600; color:#000000;">Qt FOSDEM/Maemo</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;"><span style=" font-family:'Sans Serif'; font-size:9pt; color:#000000;">Version 1.0.0.</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;">The FOSDEM Maemo is an application making the conference schedule available offline. Supports searches on various items (speaker, speech topic, location, etc.). For Nokia N8x0 and N900 Internet Tablets.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;"><span style=" font-weight:600; color:#000000;">Developers:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;"><span style=" color:#000000;">Berendova Monika, Hanzes Matus, Komara Martin, Korinek Pavol,</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt; color:#000000;">Pavelka Pavol, Timko Marek, Uzak Matus</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;"><span style=" color:#000000;">Copyright (C) Ixonos, 2010</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;"><span style=" font-size:7pt; color:#000000;">This program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR PARTICULAR PURPOSE.</span></p></body></html> + + + false + + + true + + + + + + + QDialogButtonBox::Ok + + + + + + + + + + + + + + + + buttonOK + accepted() + AboutDialog + close() + + + 292 + 272 + + + 249 + 149 + + + + + diff --git a/src/gui/gui.pro b/src/gui/gui.pro index 1728bc9..26c5386 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -15,7 +15,8 @@ TARGETDEPS += $$DESTDIR/liborm.a $$DESTDIR/libmodel.a $$DESTDIR/libsql.a # Please note that resources MUST be added to the app module # (which means they need to be added to the test module as well, # but I am sure you can live with that for the time being). -FORMS += mainwindow.ui +FORMS += mainwindow.ui \ + about.ui SOURCES += mainwindow.cpp HEADERS += mainwindow.h diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index c8ce6f5..5784d47 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -9,12 +9,19 @@ #include #include +#include +#include "ui_about.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { setupUi(this); + // connect Menu actions + connect(actionImportSchedule, SIGNAL(triggered()), SLOT(importSchedule())); + connect(actionAboutQt, SIGNAL(triggered()), qApp, SLOT(aboutQt())); + connect(actionAboutApplication, SIGNAL(triggered()), SLOT(aboutApp())); + // create "SQLITE" DB instance/connection // opens DB connection (needed for EventModel) mSqlEngine = new SqlEngine(this); @@ -24,8 +31,6 @@ MainWindow::MainWindow(QWidget *parent) connect(mXmlParser, SIGNAL(progressStatus(int)), this, SLOT(showParsingProgress(int))); statusBar()->showMessage(tr("Ready")); - connect(actionImportSchedule, SIGNAL(triggered()), SLOT(importSchedule())); - treeView->setHeaderHidden(true); treeView->setRootIsDecorated(false); treeView->setIndentation(0); @@ -69,3 +74,11 @@ void MainWindow::showParsingProgress(int aStatus) statusBar()->showMessage(msg,1000); } +void MainWindow::aboutApp() +{ + QDialog dialog(this); + Ui::AboutDialog ui; + ui.setupUi(&dialog); + dialog.exec(); +} + diff --git a/src/gui/mainwindow.h b/src/gui/mainwindow.h index 7ab90d9..94a04cf 100644 --- a/src/gui/mainwindow.h +++ b/src/gui/mainwindow.h @@ -17,9 +17,11 @@ public: private slots: void importSchedule(); void showParsingProgress(int aStatus); + void aboutApp(); private: SqlEngine *mSqlEngine; ScheduleXmlParser *mXmlParser; }; #endif // MAINWINDOW_H + diff --git a/src/gui/mainwindow.ui b/src/gui/mainwindow.ui index 412bd10..eca186c 100644 --- a/src/gui/mainwindow.ui +++ b/src/gui/mainwindow.ui @@ -26,6 +26,69 @@ + + + + + + <| + + + true + + + Qt::LeftArrow + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Selected Date Goes Here + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + |> + + + true + + + Qt::RightArrow + + + + + @@ -64,7 +127,15 @@ + + + Help + + + + + @@ -72,6 +143,16 @@ Import Schedule + + + About Qt + + + + + About application + + -- 2.39.5