Changeset e51c78af27 in tspsg for src/mainwindow.cpp
- Timestamp:
- Apr 30, 2010, 3:45:55 AM (15 years ago)
- Branches:
- 0.1.3.145-beta1-symbian, 0.1.4.170-beta2-bb10, appveyor, imgbot, master, readme
- Children:
- e3533af1cf
- Parents:
- 0773f1b65f
- git-author:
- Oleksii Serdiuk <contacts@…> (04/30/10 03:45:55)
- git-committer:
- Oleksii Serdiuk <contacts@…> (06/29/12 19:41:42)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mainwindow.cpp
r0773f1b65f re51c78af27 51 51 connect(QApplication::desktop(), SIGNAL(workAreaResized(int)), SLOT(desktopResized(int))); 52 52 #endif // Q_OS_WINCE_WM 53 connect(actionFileNew, SIGNAL(triggered()),this,SLOT(actionFileNewTriggered()));54 connect(actionFileOpen, SIGNAL(triggered()),this,SLOT(actionFileOpenTriggered()));55 connect(actionFileSave, SIGNAL(triggered()),this,SLOT(actionFileSaveTriggered()));56 connect(actionFileSaveAsTask, SIGNAL(triggered()),this,SLOT(actionFileSaveAsTaskTriggered()));57 connect(actionFileSaveAsSolution, SIGNAL(triggered()),this,SLOT(actionFileSaveAsSolutionTriggered()));53 connect(actionFileNew, SIGNAL(triggered()), SLOT(actionFileNewTriggered())); 54 connect(actionFileOpen, SIGNAL(triggered()), SLOT(actionFileOpenTriggered())); 55 connect(actionFileSave, SIGNAL(triggered()), SLOT(actionFileSaveTriggered())); 56 connect(actionFileSaveAsTask, SIGNAL(triggered()), SLOT(actionFileSaveAsTaskTriggered())); 57 connect(actionFileSaveAsSolution, SIGNAL(triggered()), SLOT(actionFileSaveAsSolutionTriggered())); 58 58 #ifndef QT_NO_PRINTER 59 connect(actionFilePrintPreview, SIGNAL(triggered()),this,SLOT(actionFilePrintPreviewTriggered()));60 connect(actionFilePrint, SIGNAL(triggered()),this,SLOT(actionFilePrintTriggered()));59 connect(actionFilePrintPreview, SIGNAL(triggered()), SLOT(actionFilePrintPreviewTriggered())); 60 connect(actionFilePrint, SIGNAL(triggered()), SLOT(actionFilePrintTriggered())); 61 61 #endif // QT_NO_PRINTER 62 connect(actionSettingsPreferences, SIGNAL(triggered()),this,SLOT(actionSettingsPreferencesTriggered()));62 connect(actionSettingsPreferences, SIGNAL(triggered()), SLOT(actionSettingsPreferencesTriggered())); 63 63 #ifdef Q_OS_WIN32 64 64 connect(actionHelpCheck4Updates, SIGNAL(triggered()), SLOT(actionHelpCheck4UpdatesTriggered())); 65 65 #endif // Q_OS_WIN32 66 connect(actionSettingsLanguageAutodetect, SIGNAL(triggered(bool)),this,SLOT(actionSettingsLanguageAutodetectTriggered(bool)));67 connect(groupSettingsLanguageList, SIGNAL(triggered(QAction *)),this,SLOT(groupSettingsLanguageListTriggered(QAction *)));68 connect(actionHelpAboutQt, SIGNAL(triggered()),qApp,SLOT(aboutQt()));69 connect(actionHelpAbout, SIGNAL(triggered()),this,SLOT(actionHelpAboutTriggered()));70 71 connect(buttonSolve, SIGNAL(clicked()),this,SLOT(buttonSolveClicked()));72 connect(buttonRandom, SIGNAL(clicked()),this,SLOT(buttonRandomClicked()));73 connect(buttonBackToTask, SIGNAL(clicked()),this,SLOT(buttonBackToTaskClicked()));74 connect(spinCities, SIGNAL(valueChanged(int)),this,SLOT(spinCitiesValueChanged(int)));66 connect(actionSettingsLanguageAutodetect, SIGNAL(triggered(bool)), SLOT(actionSettingsLanguageAutodetectTriggered(bool))); 67 connect(groupSettingsLanguageList, SIGNAL(triggered(QAction *)), SLOT(groupSettingsLanguageListTriggered(QAction *))); 68 connect(actionHelpAboutQt, SIGNAL(triggered()), qApp, SLOT(aboutQt())); 69 connect(actionHelpAbout, SIGNAL(triggered()), SLOT(actionHelpAboutTriggered())); 70 71 connect(buttonSolve, SIGNAL(clicked()), SLOT(buttonSolveClicked())); 72 connect(buttonRandom, SIGNAL(clicked()), SLOT(buttonRandomClicked())); 73 connect(buttonBackToTask, SIGNAL(clicked()), SLOT(buttonBackToTaskClicked())); 74 connect(spinCities, SIGNAL(valueChanged(int)), SLOT(spinCitiesValueChanged(int))); 75 75 76 76 #ifndef HANDHELD … … 86 86 settings->endGroup(); 87 87 } 88 #else89 setWindowState(Qt::WindowMaximized);90 88 #endif // HANDHELD 91 89 92 90 tspmodel = new CTSPModel(this); 93 91 taskView->setModel(tspmodel); 94 connect(tspmodel, SIGNAL(numCitiesChanged(int)),this,SLOT(numCitiesChanged(int)));95 connect(tspmodel, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)),this,SLOT(dataChanged(const QModelIndex &, const QModelIndex &)));96 connect(tspmodel, SIGNAL(layoutChanged()),this,SLOT(dataChanged()));92 connect(tspmodel, SIGNAL(numCitiesChanged(int)), SLOT(numCitiesChanged(int))); 93 connect(tspmodel, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), SLOT(dataChanged(const QModelIndex &, const QModelIndex &))); 94 connect(tspmodel, SIGNAL(layoutChanged()), SLOT(dataChanged())); 97 95 if ((QCoreApplication::arguments().count() > 1) && (tspmodel->loadTask(QCoreApplication::arguments().at(1)))) 98 96 setFileName(QCoreApplication::arguments().at(1)); … … 944 942 name = t.translate("--------", "LANGNAME", "Please, provide a native name of your translation language here."); 945 943 a = menuSettingsLanguage->addAction(name); 946 a->setStatusTip( QString("Set application language to %1").arg(name));944 a->setStatusTip(tr("Set application language to %1").arg(name)); 947 945 a->setData(lang.completeBaseName().mid(6)); 948 946 a->setCheckable(true); … … 1169 1167 1170 1168 //! \hack HACK: A little hack for toolbar icons to have a sane size. 1171 #ifdef Q_OS_WINCE_WM1169 #ifdef HANDHELD 1172 1170 toolBar->setIconSize(QSize(logicalDpiX() / 4, logicalDpiY() / 4)); 1173 #e lif defined(Q_OS_SYMBIAN)1174 toolBar->setIconSize(QSize(logicalDpiX() / 5, logicalDpiY() / 5));1175 #endif // Q_OS_WINCE_WM 1171 #endif // HANDHELD 1172 static_cast<QToolButton *>(toolBar->widgetForAction(actionFileSave))->setMenu(menuFileSaveAs); 1173 static_cast<QToolButton *>(toolBar->widgetForAction(actionFileSave))->setPopupMode(QToolButton::MenuButtonPopup); 1176 1174 1177 1175 solutionText->document()->setDefaultFont(settings->value("Output/Font", QFont(DEF_FONT_FAMILY, DEF_FONT_SIZE)).value<QFont>()); … … 1195 1193 toolBar->insertAction(actionSettingsPreferences,actionFilePrint); 1196 1194 #endif // QT_NO_PRINTER 1195 1196 menuSettings->insertAction(actionSettingsPreferences, toolBar->toggleViewAction()); 1197 menuSettings->insertSeparator(actionSettingsPreferences); 1198 1197 1199 #ifdef Q_OS_WIN32 1198 1200 actionHelpCheck4Updates = new QAction(this);
Note: See TracChangeset
for help on using the changeset viewer.