#include <controllerwindow.h>
Inheritance diagram for ControllerWindow:


Definition at line 37 of file controllerwindow.h.
| ControllerWindow::ControllerWindow | ( | ) |
Definition at line 28 of file controllerwindow.cpp.
References QBoxLayout::addLayout(), QBoxLayout::addStretch(), QBoxLayout::addWidget(), QObject::connect(), createHintsGroupBox(), createTypeGroupBox(), hintsGroupBox, previewWindow, qApp, quitButton, QWidget::setLayout(), QWidget::setWindowTitle(), SIGNAL, SLOT, typeGroupBox, and updatePreview().
00029 { 00030 previewWindow = new PreviewWindow(this); 00031 00032 createTypeGroupBox(); 00033 createHintsGroupBox(); 00034 00035 quitButton = new QPushButton(tr("&Quit")); 00036 connect(quitButton, SIGNAL(clicked()), qApp, SLOT(quit())); 00037 00038 QHBoxLayout *bottomLayout = new QHBoxLayout; 00039 bottomLayout->addStretch(); 00040 bottomLayout->addWidget(quitButton); 00041 00042 QVBoxLayout *mainLayout = new QVBoxLayout; 00043 mainLayout->addWidget(typeGroupBox); 00044 mainLayout->addWidget(hintsGroupBox); 00045 mainLayout->addLayout(bottomLayout); 00046 setLayout(mainLayout); 00047 00048 setWindowTitle(tr("Window Flags")); 00049 updatePreview(); 00050 }
Here is the call graph for this function:

| void ControllerWindow::updatePreview | ( | ) | [private, slot] |
Definition at line 52 of file controllerwindow.cpp.
References Qt::Dialog, dialogRadioButton, Qt::Drawer, drawerRadioButton, flags, framelessWindowCheckBox, Qt::FramelessWindowHint, QAbstractButton::isChecked(), QWidget::move(), msWindowsFixedSizeDialogCheckBox, Qt::MSWindowsFixedSizeDialogHint, Qt::Popup, popupRadioButton, QWidget::pos(), previewWindow, PreviewWindow::setWindowFlags(), QPoint::setX(), QPoint::setY(), Qt::Sheet, sheetRadioButton, QWidget::show(), Qt::SplashScreen, splashScreenRadioButton, Qt::Tool, toolRadioButton, Qt::ToolTip, toolTipRadioButton, Qt::Window, windowContextHelpButtonCheckBox, Qt::WindowContextHelpButtonHint, windowMaximizeButtonCheckBox, Qt::WindowMaximizeButtonHint, windowMinimizeButtonCheckBox, Qt::WindowMinimizeButtonHint, windowRadioButton, windowShadeButtonCheckBox, Qt::WindowShadeButtonHint, windowStaysOnTopCheckBox, Qt::WindowStaysOnTopHint, windowSystemMenuCheckBox, Qt::WindowSystemMenuHint, windowTitleCheckBox, Qt::WindowTitleHint, QPoint::x(), x11BypassWindowManagerCheckBox, Qt::X11BypassWindowManagerHint, and QPoint::y().
Referenced by ControllerWindow(), createCheckBox(), and createRadioButton().
00053 { 00054 Qt::WindowFlags flags = 0; 00055 00056 if (windowRadioButton->isChecked()) { 00057 flags = Qt::Window; 00058 } else if (dialogRadioButton->isChecked()) { 00059 flags = Qt::Dialog; 00060 } else if (sheetRadioButton->isChecked()) { 00061 flags = Qt::Sheet; 00062 } else if (drawerRadioButton->isChecked()) { 00063 flags = Qt::Drawer; 00064 } else if (popupRadioButton->isChecked()) { 00065 flags = Qt::Popup; 00066 } else if (toolRadioButton->isChecked()) { 00067 flags = Qt::Tool; 00068 } else if (toolTipRadioButton->isChecked()) { 00069 flags = Qt::ToolTip; 00070 } else if (splashScreenRadioButton->isChecked()) { 00071 flags = Qt::SplashScreen; 00072 } 00073 00074 if (msWindowsFixedSizeDialogCheckBox->isChecked()) 00075 flags |= Qt::MSWindowsFixedSizeDialogHint; 00076 if (x11BypassWindowManagerCheckBox->isChecked()) 00077 flags |= Qt::X11BypassWindowManagerHint; 00078 if (framelessWindowCheckBox->isChecked()) 00079 flags |= Qt::FramelessWindowHint; 00080 if (windowTitleCheckBox->isChecked()) 00081 flags |= Qt::WindowTitleHint; 00082 if (windowSystemMenuCheckBox->isChecked()) 00083 flags |= Qt::WindowSystemMenuHint; 00084 if (windowMinimizeButtonCheckBox->isChecked()) 00085 flags |= Qt::WindowMinimizeButtonHint; 00086 if (windowMaximizeButtonCheckBox->isChecked()) 00087 flags |= Qt::WindowMaximizeButtonHint; 00088 if (windowContextHelpButtonCheckBox->isChecked()) 00089 flags |= Qt::WindowContextHelpButtonHint; 00090 if (windowShadeButtonCheckBox->isChecked()) 00091 flags |= Qt::WindowShadeButtonHint; 00092 if (windowStaysOnTopCheckBox->isChecked()) 00093 flags |= Qt::WindowStaysOnTopHint; 00094 00095 previewWindow->setWindowFlags(flags); 00096 previewWindow->show(); 00097 00098 QPoint pos = previewWindow->pos(); 00099 if (pos.x() < 0) 00100 pos.setX(0); 00101 if (pos.y() < 0) 00102 pos.setY(0); 00103 previewWindow->move(pos); 00104 }
| void ControllerWindow::createTypeGroupBox | ( | ) | [private] |
Definition at line 106 of file controllerwindow.cpp.
References QLayout::addWidget(), createRadioButton(), dialogRadioButton, drawerRadioButton, QWidget::layout(), popupRadioButton, QAbstractButton::setChecked(), QWidget::setLayout(), sheetRadioButton, splashScreenRadioButton, toolRadioButton, toolTipRadioButton, typeGroupBox, and windowRadioButton.
Referenced by ControllerWindow().
00107 { 00108 typeGroupBox = new QGroupBox(tr("Type")); 00109 00110 windowRadioButton = createRadioButton(tr("Window")); 00111 dialogRadioButton = createRadioButton(tr("Dialog")); 00112 sheetRadioButton = createRadioButton(tr("Sheet")); 00113 drawerRadioButton = createRadioButton(tr("Drawer")); 00114 popupRadioButton = createRadioButton(tr("Popup")); 00115 toolRadioButton = createRadioButton(tr("Tool")); 00116 toolTipRadioButton = createRadioButton(tr("Tooltip")); 00117 splashScreenRadioButton = createRadioButton(tr("Splash screen")); 00118 windowRadioButton->setChecked(true); 00119 00120 QGridLayout *layout = new QGridLayout; 00121 layout->addWidget(windowRadioButton, 0, 0); 00122 layout->addWidget(dialogRadioButton, 1, 0); 00123 layout->addWidget(sheetRadioButton, 2, 0); 00124 layout->addWidget(drawerRadioButton, 3, 0); 00125 layout->addWidget(popupRadioButton, 0, 1); 00126 layout->addWidget(toolRadioButton, 1, 1); 00127 layout->addWidget(toolTipRadioButton, 2, 1); 00128 layout->addWidget(splashScreenRadioButton, 3, 1); 00129 typeGroupBox->setLayout(layout); 00130 }
Here is the call graph for this function:

| void ControllerWindow::createHintsGroupBox | ( | ) | [private] |
Definition at line 132 of file controllerwindow.cpp.
References QLayout::addWidget(), createCheckBox(), framelessWindowCheckBox, hintsGroupBox, QWidget::layout(), msWindowsFixedSizeDialogCheckBox, QWidget::setLayout(), windowContextHelpButtonCheckBox, windowMaximizeButtonCheckBox, windowMinimizeButtonCheckBox, windowShadeButtonCheckBox, windowStaysOnTopCheckBox, windowSystemMenuCheckBox, windowTitleCheckBox, and x11BypassWindowManagerCheckBox.
Referenced by ControllerWindow().
00133 { 00134 hintsGroupBox = new QGroupBox(tr("Hints")); 00135 00136 msWindowsFixedSizeDialogCheckBox = 00137 createCheckBox(tr("MS Windows fixed size dialog")); 00138 x11BypassWindowManagerCheckBox = 00139 createCheckBox(tr("X11 bypass window manager")); 00140 framelessWindowCheckBox = createCheckBox(tr("Frameless window")); 00141 windowTitleCheckBox = createCheckBox(tr("Window title")); 00142 windowSystemMenuCheckBox = createCheckBox(tr("Window system menu")); 00143 windowMinimizeButtonCheckBox = createCheckBox(tr("Window minimize button")); 00144 windowMaximizeButtonCheckBox = createCheckBox(tr("Window maximize button")); 00145 windowContextHelpButtonCheckBox = 00146 createCheckBox(tr("Window context help button")); 00147 windowShadeButtonCheckBox = createCheckBox(tr("Window shade button")); 00148 windowStaysOnTopCheckBox = createCheckBox(tr("Window stays on top")); 00149 00150 QGridLayout *layout = new QGridLayout; 00151 layout->addWidget(msWindowsFixedSizeDialogCheckBox, 0, 0); 00152 layout->addWidget(x11BypassWindowManagerCheckBox, 1, 0); 00153 layout->addWidget(framelessWindowCheckBox, 2, 0); 00154 layout->addWidget(windowTitleCheckBox, 3, 0); 00155 layout->addWidget(windowSystemMenuCheckBox, 4, 0); 00156 layout->addWidget(windowMinimizeButtonCheckBox, 0, 1); 00157 layout->addWidget(windowMaximizeButtonCheckBox, 1, 1); 00158 layout->addWidget(windowContextHelpButtonCheckBox, 2, 1); 00159 layout->addWidget(windowShadeButtonCheckBox, 3, 1); 00160 layout->addWidget(windowStaysOnTopCheckBox, 4, 1); 00161 hintsGroupBox->setLayout(layout); 00162 }
Here is the call graph for this function:

Definition at line 164 of file controllerwindow.cpp.
References QObject::connect(), SIGNAL, SLOT, and updatePreview().
Referenced by createHintsGroupBox().
00165 { 00166 QCheckBox *checkBox = new QCheckBox(text); 00167 connect(checkBox, SIGNAL(clicked()), this, SLOT(updatePreview())); 00168 return checkBox; 00169 }
Here is the call graph for this function:

| QRadioButton * ControllerWindow::createRadioButton | ( | const QString & | text | ) | [private] |
Definition at line 171 of file controllerwindow.cpp.
References QObject::connect(), SIGNAL, SLOT, and updatePreview().
Referenced by createTypeGroupBox().
00172 { 00173 QRadioButton *button = new QRadioButton(text); 00174 connect(button, SIGNAL(clicked()), this, SLOT(updatePreview())); 00175 return button; 00176 }
Here is the call graph for this function:

PreviewWindow* ControllerWindow::previewWindow [private] |
Definition at line 53 of file controllerwindow.h.
Referenced by ControllerWindow(), and updatePreview().
QGroupBox* ControllerWindow::typeGroupBox [private] |
Definition at line 55 of file controllerwindow.h.
Referenced by ControllerWindow(), and createTypeGroupBox().
QGroupBox* ControllerWindow::hintsGroupBox [private] |
Definition at line 56 of file controllerwindow.h.
Referenced by ControllerWindow(), and createHintsGroupBox().
QPushButton* ControllerWindow::quitButton [private] |
QRadioButton* ControllerWindow::windowRadioButton [private] |
Definition at line 59 of file controllerwindow.h.
Referenced by createTypeGroupBox(), and updatePreview().
QRadioButton* ControllerWindow::dialogRadioButton [private] |
Definition at line 60 of file controllerwindow.h.
Referenced by createTypeGroupBox(), and updatePreview().
QRadioButton* ControllerWindow::sheetRadioButton [private] |
Definition at line 61 of file controllerwindow.h.
Referenced by createTypeGroupBox(), and updatePreview().
QRadioButton* ControllerWindow::drawerRadioButton [private] |
Definition at line 62 of file controllerwindow.h.
Referenced by createTypeGroupBox(), and updatePreview().
QRadioButton* ControllerWindow::popupRadioButton [private] |
Definition at line 63 of file controllerwindow.h.
Referenced by createTypeGroupBox(), and updatePreview().
QRadioButton* ControllerWindow::toolRadioButton [private] |
Definition at line 64 of file controllerwindow.h.
Referenced by createTypeGroupBox(), and updatePreview().
QRadioButton* ControllerWindow::toolTipRadioButton [private] |
Definition at line 65 of file controllerwindow.h.
Referenced by createTypeGroupBox(), and updatePreview().
Definition at line 66 of file controllerwindow.h.
Referenced by createTypeGroupBox(), and updatePreview().
Definition at line 68 of file controllerwindow.h.
Referenced by createHintsGroupBox(), and updatePreview().
Definition at line 69 of file controllerwindow.h.
Referenced by createHintsGroupBox(), and updatePreview().
Definition at line 70 of file controllerwindow.h.
Referenced by createHintsGroupBox(), and updatePreview().
QCheckBox* ControllerWindow::windowTitleCheckBox [private] |
Definition at line 71 of file controllerwindow.h.
Referenced by createHintsGroupBox(), and updatePreview().
Definition at line 72 of file controllerwindow.h.
Referenced by createHintsGroupBox(), and updatePreview().
Definition at line 73 of file controllerwindow.h.
Referenced by createHintsGroupBox(), and updatePreview().
Definition at line 74 of file controllerwindow.h.
Referenced by createHintsGroupBox(), and updatePreview().
Definition at line 75 of file controllerwindow.h.
Referenced by createHintsGroupBox(), and updatePreview().
Definition at line 76 of file controllerwindow.h.
Referenced by createHintsGroupBox(), and updatePreview().
Definition at line 77 of file controllerwindow.h.
Referenced by createHintsGroupBox(), and updatePreview().
1.5.1