Changeset c2d66b2
- Timestamp:
- 01/13/10 10:19:07 (13 years ago)
- Branches:
- master, qt5
- Children:
- 69393c0
- Parents:
- f0ce4d0
- Location:
- src/gui
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gui/gui.pro
rf0ce4d0 rc2d66b2 16 16 # (which means they need to be added to the test module as well, 17 17 # but I am sure you can live with that for the time being). 18 FORMS += mainwindow.ui 18 FORMS += mainwindow.ui \ 19 about.ui 19 20 SOURCES += mainwindow.cpp 20 21 HEADERS += mainwindow.h -
src/gui/mainwindow.cpp
rf0ce4d0 rc2d66b2 10 10 #include <delegate.h> 11 11 12 #include <QDialog> 13 #include "ui_about.h" 12 14 13 15 MainWindow::MainWindow(QWidget *parent) … … 15 17 { 16 18 setupUi(this); 19 20 // connect Menu actions 21 connect(actionImportSchedule, SIGNAL(triggered()), SLOT(importSchedule())); 22 connect(actionAboutQt, SIGNAL(triggered()), qApp, SLOT(aboutQt())); 23 connect(actionAboutApplication, SIGNAL(triggered()), SLOT(aboutApp())); 17 24 18 25 // create "SQLITE" DB instance/connection … … 24 31 connect(mXmlParser, SIGNAL(progressStatus(int)), this, SLOT(showParsingProgress(int))); 25 32 statusBar()->showMessage(tr("Ready")); 26 27 connect(actionImportSchedule, SIGNAL(triggered()), SLOT(importSchedule()));28 33 29 34 treeView->setHeaderHidden(true); … … 70 75 } 71 76 77 void MainWindow::aboutApp() 78 { 79 QDialog dialog(this); 80 Ui::AboutDialog ui; 81 ui.setupUi(&dialog); 82 dialog.exec(); 83 } 84 -
src/gui/mainwindow.h
rf0ce4d0 rc2d66b2 18 18 void importSchedule(); 19 19 void showParsingProgress(int aStatus); 20 void aboutApp(); 20 21 private: 21 22 SqlEngine *mSqlEngine; … … 24 25 25 26 #endif // MAINWINDOW_H 27 -
src/gui/mainwindow.ui
rf0ce4d0 rc2d66b2 27 27 <item row="0" column="0" > 28 28 <layout class="QVBoxLayout" name="verticalLayout" > 29 <item> 30 <layout class="QHBoxLayout" name="horizontalLayout_2" > 31 <item> 32 <widget class="QToolButton" name="buttonPrevDay" > 33 <property name="text" > 34 <string><|</string> 35 </property> 36 <property name="autoRaise" > 37 <bool>true</bool> 38 </property> 39 <property name="arrowType" > 40 <enum>Qt::LeftArrow</enum> 41 </property> 42 </widget> 43 </item> 44 <item> 45 <spacer name="horizontalSpacer" > 46 <property name="orientation" > 47 <enum>Qt::Horizontal</enum> 48 </property> 49 <property name="sizeHint" stdset="0" > 50 <size> 51 <width>40</width> 52 <height>20</height> 53 </size> 54 </property> 55 </spacer> 56 </item> 57 <item> 58 <widget class="QLabel" name="label" > 59 <property name="text" > 60 <string>Selected Date Goes Here</string> 61 </property> 62 </widget> 63 </item> 64 <item> 65 <spacer name="horizontalSpacer_2" > 66 <property name="orientation" > 67 <enum>Qt::Horizontal</enum> 68 </property> 69 <property name="sizeHint" stdset="0" > 70 <size> 71 <width>40</width> 72 <height>20</height> 73 </size> 74 </property> 75 </spacer> 76 </item> 77 <item> 78 <widget class="QToolButton" name="buttonNextDay" > 79 <property name="text" > 80 <string>|></string> 81 </property> 82 <property name="autoRaise" > 83 <bool>true</bool> 84 </property> 85 <property name="arrowType" > 86 <enum>Qt::RightArrow</enum> 87 </property> 88 </widget> 89 </item> 90 </layout> 91 </item> 29 92 <item> 30 93 <widget class="TreeView" name="treeView" > … … 65 128 <addaction name="actionImportSchedule" /> 66 129 </widget> 130 <widget class="QMenu" name="menuAbout" > 131 <property name="title" > 132 <string>Help</string> 133 </property> 134 <addaction name="actionAboutQt" /> 135 <addaction name="actionAboutApplication" /> 136 </widget> 67 137 <addaction name="menuFile" /> 138 <addaction name="menuAbout" /> 68 139 </widget> 69 140 <widget class="QStatusBar" name="statusbar" /> … … 71 142 <property name="text" > 72 143 <string>Import Schedule</string> 144 </property> 145 </action> 146 <action name="actionAboutQt" > 147 <property name="text" > 148 <string>About Qt</string> 149 </property> 150 </action> 151 <action name="actionAboutApplication" > 152 <property name="text" > 153 <string>About application</string> 73 154 </property> 74 155 </action>
Note: See TracChangeset
for help on using the changeset viewer.