Changeset 17 in tspsg-svn for trunk/src/mainwindow.cpp
- Timestamp:
- Jun 15, 2009, 5:10:25 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 *. vcproj*1 *.idb 2 2 *.ncb 3 *.pdb 3 4 *.sln 4 5 *.suo 5 *.idb 6 *.pdb 7 ui_* 6 *.vcproj* 7 Makefile* 8 Win32 9 Windows Mobile* 10 debug 8 11 moc_* 9 12 qrc_* 10 tspsg11 Makefile*12 debug13 13 release 14 ui_*
-
- Property svn:ignore
-
trunk/src/mainwindow.cpp
r15 r17 1 1 /* 2 2 * TSPSG - TSP Solver and Generator 3 * Copyright (C) 2007 Lёppa <lacontacts[at]gmail[dot]com>3 * Copyright (C) 2007-2009 Lёppa <contacts[at]oleksii[dot]name> 4 4 * 5 5 * $Id$ … … 23 23 24 24 #include <QtGui> 25 #ifndef Q_OS_WINCE 26 #include <QPrintDialog> 27 #endif // Q_OS_WINCE 25 28 #include "mainwindow.h" 26 29 … … 32 35 setupUi(this); 33 36 connect(actionSettingsSettings,SIGNAL(triggered()),this,SLOT(ChangeSettings())); 37 #ifndef Q_OS_WINCE 38 connect(actionFilePrintSetup,SIGNAL(triggered()),this,SLOT(PrintSetup())); 39 #endif // Q_OS_WINCE 34 40 connect(buttonSolve,SIGNAL(clicked()),this,SLOT(Solve())); 35 41 connect(buttonRandom,SIGNAL(clicked()),this,SLOT(Random())); 36 42 connect(spinCities,SIGNAL(valueChanged(int)),this,SLOT(CitiesNumberChanged(int))); 43 QRect rect = geometry(); 44 #ifdef Q_OS_WINCE 45 // HACK: Fix for all tabWidget elements becoming "unclickable" if making it central widget. 46 rect.setSize(QApplication::desktop()->availableGeometry().size()); 47 rect.setHeight(rect.height() - (QApplication::desktop()->screenGeometry().height() - QApplication::desktop()->availableGeometry().height())); 48 tabWidget->resize(rect.width(),rect.height() - toolBar->size().height()); 49 #else 37 50 // Centering MainWindow 38 51 // TODO: Loading of saved window state 39 QRect rect = geometry();40 rect.moveCenter(QApplication::desktop()->screenGeometry(QApplication::desktop()->primaryScreen()).center()); 52 rect.moveCenter(QApplication::desktop()->availableGeometry().center()); 53 #endif // Q_OS_WINCE 41 54 setGeometry(rect); 42 55 qsrand(QDateTime().currentDateTime().toTime_t()); … … 63 76 } 64 77 } 78 79 #ifndef Q_OS_WINCE 80 void MainWindow::PrintSetup() 81 { 82 QPrintDialog pd; 83 pd.exec(); 84 } 85 #endif // Q_OS_WINCE 65 86 66 87 void MainWindow::Random() … … 93 114 // tabWidget->setCurrentIndex(1); 94 115 } 95
Note: See TracChangeset
for help on using the changeset viewer.