Changeset b8a2a118c4 in tspsg
- Timestamp:
- Dec 21, 2010, 2:28:51 PM (14 years ago)
- Branches:
- 0.1.4.170-beta2-bb10, appveyor, imgbot, master, readme
- Children:
- bfe1e5e2ea
- Parents:
- 9eb63a1598
- git-author:
- Oleksii Serdiuk <contacts@…> (12/21/10 14:28:51)
- git-committer:
- Oleksii Serdiuk <contacts@…> (06/29/12 19:45:58)
- Location:
- src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/globals.cpp
r9eb63a1598 rb8a2a118c4 24 24 #include "globals.h" 25 25 26 #if def Q_WS_WIN3226 #ifndef HANDHELD 27 27 void toggleStyle(QWidget *widget, bool enable) 28 28 { … … 33 33 } 34 34 } 35 #endif // Q_WS_WIN3235 #endif // HANDHELD -
src/globals.h
r9eb63a1598 rb8a2a118c4 59 59 // TSPSolver 60 60 #include "tspsolver.h" 61 #if def Q_WS_WIN3262 // Vista/7Eyecandy61 #ifndef HANDHELD 62 // Eyecandy 63 63 # include "qtwin.h" 64 #endif // Q_WS_WIN3264 #endif // HANDHELD 65 65 66 66 // DEFINES … … 129 129 } 130 130 131 #if def Q_WS_WIN32131 #ifndef HANDHELD 132 132 /*! 133 133 * \brief Enables or disables a mask for the \a widget. … … 138 138 */ 139 139 void toggleStyle(QWidget *widget, bool enable); 140 #endif // Q_WS_WIN32140 #endif // HANDHELD 141 141 142 142 #ifndef DOXYGEN_EXCLUDE -
src/mainwindow.cpp
r9eb63a1598 rb8a2a118c4 25 25 26 26 #ifdef Q_WS_WIN32 27 #include "shobjidl.h"27 # include "shobjidl.h" 28 28 #endif 29 29 … … 396 396 if (untitled) 397 397 setFileName(); 398 #if def Q_WS_WIN32398 #ifndef HANDHELD 399 399 if (QtWin::isCompositionEnabled() && settings->value("UseTranslucency", DEF_USE_TRANSLUCENCY).toBool()) { 400 400 toggleStyle(labelVariant, true); … … 610 610 connect(bb, SIGNAL(accepted()), dlg, SLOT(accept())); 611 611 612 #if def Q_WS_WIN32613 // Adding some eyecandy in Vista and 7 :-)612 #ifndef HANDHELD 613 // Adding some eyecandy 614 614 if (QtWin::isCompositionEnabled()) { 615 615 QtWin::enableBlurBehindWindow(dlg, true); 616 616 } 617 #endif // Q_WS_WIN32617 #endif // HANDHELD 618 618 619 619 dlg->resize(450, 350); … … 1030 1030 void MainWindow::solverRoutePartFound(int n) 1031 1031 { 1032 #ifdef Q_WS_WIN321033 1032 tl->SetProgressValue(winId(), n, spinCities->value() * 2); 1034 #else1035 Q_UNUSED(n);1036 #endif // Q_WS_WIN321037 1033 } 1038 1034 #endif // Q_WS_WIN32 … … 1661 1657 retranslateUi(false); 1662 1658 1663 #if def Q_WS_WIN321664 // Adding some eyecandy in Vista and 7 :-)1659 #ifndef HANDHELD 1660 // Adding some eyecandy 1665 1661 if (QtWin::isCompositionEnabled() && settings->value("UseTranslucency", DEF_USE_TRANSLUCENCY).toBool()) { 1666 1662 toggleTranclucency(true); 1667 1663 } 1668 #endif // Q_WS_WIN321664 #endif // HANDHELD 1669 1665 } 1670 1666 … … 1682 1678 void MainWindow::toggleTranclucency(bool enable) 1683 1679 { 1684 #if def Q_WS_WIN321680 #ifndef HANDHELD 1685 1681 toggleStyle(labelVariant, enable); 1686 1682 toggleStyle(labelCities, enable); … … 1690 1686 #else 1691 1687 Q_UNUSED(enable); 1692 #endif // Q_WS_WIN321688 #endif // HANDHELD 1693 1689 } 1694 1690 -
src/qtwin.cpp
r9eb63a1598 rb8a2a118c4 103 103 return isEnabled; 104 104 } 105 #endif106 105 return false; 106 #elif !defined(HANDHELD) 107 //! \todo TODO: Check for trsnsparency support in other OSes. 108 return true; 109 #else 110 return false; 111 #endif 107 112 } 108 113 … … 125 130 bb.dwFlags = DWM_BB_ENABLE; 126 131 bb.hRgnBlur = NULL; 132 #endif 127 133 widget->setAttribute(Qt::WA_TranslucentBackground, enable); 128 134 widget->setAttribute(Qt::WA_NoSystemBackground, enable); 135 #ifdef Q_WS_WIN 129 136 hr = pDwmEnableBlurBehindWindow(widget->winId(), &bb); 130 137 if (SUCCEEDED(hr)) { -
src/settingsdialog.cpp
r9eb63a1598 rb8a2a118c4 142 142 QVBoxLayout *vbox; // Layout helper 143 143 144 #if def Q_WS_WIN32144 #ifndef HANDHELD 145 145 if (QtWin::isCompositionEnabled()) { 146 146 cbUseTranslucency = new QCheckBox(bgWhite); … … 152 152 cbUseTranslucency->setCursor(QCursor(Qt::PointingHandCursor)); 153 153 } 154 #endif // Q_WS_WIN32154 #endif // HANDHELD 155 155 156 156 cbSaveState = new QCheckBox(bgWhite); … … 198 198 box = static_cast<QBoxLayout *>(tabGeneral->layout()); 199 199 box->insertWidget(box->indexOf(cbUseNativeDialogs) + 1, cbSaveState); 200 #if def Q_WS_WIN32200 #ifndef HANDHELD 201 201 if (QtWin::isCompositionEnabled()) 202 202 box->insertWidget(box->indexOf(cbUseNativeDialogs) + 1, cbUseTranslucency); 203 #endif // Q_WS_WIN32203 #endif // HANDHELD 204 204 205 205 // Inserting label for hints to the bottom part (with grey bg) … … 234 234 cbSaveLastUsed->setChecked(settings->value("SaveLastUsed", DEF_SAVE_LAST_USED).toBool()); 235 235 cbUseNativeDialogs->setChecked(settings->value("UseNativeDialogs", DEF_USE_NATIVE_DIALOGS).toBool()); 236 #if def Q_WS_WIN32236 #ifndef HANDHELD 237 237 if (QtWin::isCompositionEnabled()) 238 238 cbUseTranslucency->setChecked(settings->value("UseTranslucency", DEF_USE_TRANSLUCENCY).toBool()); 239 #endif // Q_WS_WIN32239 #endif // HANDHELD 240 240 #ifndef HANDHELD 241 241 cbSaveState->setChecked(settings->value("SavePos", DEF_SAVEPOS).toBool()); … … 353 353 settings->setValue("SaveLastUsed", cbSaveLastUsed->isChecked()); 354 354 settings->setValue("UseNativeDialogs", cbUseNativeDialogs->isChecked()); 355 #if def Q_WS_WIN32355 #ifndef HANDHELD 356 356 if (QtWin::isCompositionEnabled()) { 357 357 bool old = settings->value("UseTranslucency", DEF_USE_TRANSLUCENCY).toBool(); … … 362 362 settings->setValue("UseTranslucency", cbUseTranslucency->isChecked()); 363 363 } 364 #endif // Q_WS_WIN32365 #ifndef HANDHELD366 364 settings->setValue("SavePos", cbSaveState->isChecked()); 367 365 #endif // HANDHELD -
src/settingsdialog.h
r9eb63a1598 rb8a2a118c4 56 56 QSettings *settings; 57 57 QHBoxLayout *layoutCitiesLimit; 58 #if def Q_WS_WIN3258 #ifndef HANDHELD 59 59 QCheckBox *cbUseTranslucency; 60 #endif // Q_WS_WIN3260 #endif // HANDHELD 61 61 QCheckBox *cbCheck4Updates; 62 62 QSpinBox *spinUpdateCheckInterval;
Note: See TracChangeset
for help on using the changeset viewer.