CVB++ 15.0
Cvb/QtDisplayAdvanced

This example measures display performance on your system for the QGraphicsView based display.

This example requires Qt5 >= 5.9 setup for building.

You may build it with Ubuntu 18.04's default Qt5 after installing:

The main file just shows the main widget

1#include <iostream>
2
3#include <QApplication>
4
5#include <cvb/image.hpp>
6#include "main_widget.hpp"
7
8int main(int argc, char* argv[])
9{
10
11 QApplication application(argc, argv);
12
13 PTResultWidget ptResultWidget;
14 MainWidget mainWidget(&ptResultWidget);
15 mainWidget.setWindowIcon(QIcon(":/qttutorial.png"));
16 mainWidget.show();
17 application.exec();
18}

Main QWidget declaration, adding some additional controls.

1#pragma once
2
3
4
5#include <QWidget>
6#include <QTimer>
7#include <QDialog>
8#include <QSpinBox>
9#include <QList>
10#include <QTableWidget>
11#include <QHBoxLayout>
12#include <QMenu>
13#include <QAction>
14#include <QActionGroup>
15#include <QMessageBox>
16#include <QFileDialog>
17#include <QPushButton>
18#include <QStringList>
19#include <QHeaderView>
20#include <QLabel>
21#include <QGroupBox>
22#include <QApplication>
23#include <QDesktopWidget>
24
25
26#include <cvb/ui/image_view.hpp>
27#include <cvb/utilities/rate_counter.hpp>
28
29struct PTResult
30{
31 Cvb::Size2D<int> ImageSize;
32 QSize ViewSize;
34 int Planes = 1;
37 double FPS = 0.0;
38};
39
40class PTResultWidget
41 : public QTableWidget
42{
43 public:
44
45 PTResultWidget();
46 ~PTResultWidget() = default;
47
48 void AddResult(const PTResult& result);
49
50 private:
51
52 void SetResultItem(int row, int column, const QString & text, const QString & toolTip = QString());
53
54 QString ImageSizeToString(Cvb::Size2D<int> size) const;
55 QString ViewSizeToString(QSize size) const;
56 QString ZoomToString(Cvb::UI::ZoomDescriptor zoomDescriptor) const;
57 QString PlanesToString(int planes) const;
58 QString UploadModeToString(Cvb::UI::UploadMode uploadMode) const;
59 QString RenderEngineToString(Cvb::UI::RenderEngine renderEngine) const;
60 QString FPsToString(double fps) const;
61
62
63
64};
65
66class PTSetupWidget
67 : public QWidget
68{
69 Q_OBJECT
70
71
72 public:
73
74 PTSetupWidget(QWidget * parent, PTResultWidget * ptResultWidget);
75 ~PTSetupWidget() = default;
76
77 int RefreshCount() const noexcept
78 {
79 return refreshCount_;
80 }
81
82 int MeasurementCout() const noexcept
83 {
84 return measurementCount_;
85 }
86
87 private:
88
89 QSpinBox * spRefreshCount_ = nullptr;
90 QSpinBox * spMeasurementCount_ = nullptr;
91
92 PTResultWidget * ptResultWidget_ = nullptr;
93
94 private Q_SLOTS:
95
96 void HandleHide() noexcept;
97 void HandleHideAndRunPT() noexcept;
98
99 void HandleRefreshCountChanged(int value) noexcept;
100 void HandleMeasurementCountChanged(int value) noexcept;
101
102 private:
103
104 int refreshCount_ = 1000;
105 int measurementCount_ = 10;
106
107 Q_SIGNALS:
108
109 void RunPT();
110
111
112};
113
114
115
116enum class PTState
117{
118 Idle,
119 Running
120};
121
122class MainWidget
123 : public QWidget
124{
125 Q_OBJECT
126
127 public:
128
129 explicit MainWidget(PTResultWidget * ptResultWidget);
130 ~MainWidget() = default;
131
132
133 private Q_SLOTS:
134
135 void HandleLoadImage();
136 void HandlePixelValue();
137 void HandleRenderEngineChanged(QAction* action);
138 void HandleUploadModeChange(QAction* action);
139 void HandlePT();
140
141 void HandleTimeout();
142
143 void HandleClearResults();
144
145 private:
146
147 void contextMenuEvent(QContextMenuEvent *event) override;
148
149 void keyPressEvent(QKeyEvent *event) override;
150
151 void ShowProgress() noexcept;
152
153 void AppendResult(double fps);
154
155 Cvb::RateCounter rateCounter_;
156
157 QTimer performaceTimer_;
158
159 Cvb::UI::ImageView* imageView_ = nullptr;
160
161 Cvb::EventCookie mouseMoveCookie_;
162
163 int testCycles_ = 0;
164
165
166
167
168 PTState ptState_ = PTState::Idle;
169
170 PTSetupWidget * ptSetupWidget_ = nullptr;
171
172 PTResultWidget * ptResultWidget_ = nullptr;
173
174};
UploadMode
Defines the upload behavior.
Definition: detail_ui.hpp:38
RenderEngine
Defines the render engine used for drawing.
Definition: ui.hpp:90
Root namespace for the Image Manager interface.
Definition: c_barcode.h:24
Describes an zoom setting for the display.
Definition: detail_ui.hpp:153

Main QWidget definition, using the QApplication main loop to redraw as fast as possible.

1// ---------------------------------------------------------------------------
5// ---------------------------------------------------------------------------
6
7#include "main_widget.hpp"
8
9#include <cvb/image.hpp>
10#include <cvb/utilities/system_info.hpp>
11#include <cvb/ui/ui.hpp>
12#include <cvb/ui/opengl_image_renderer_factory.hpp>
13
14// performance test result window
15PTResultWidget::PTResultWidget()
16 : QTableWidget()
17{
18 setWindowIcon(QIcon(":/qttutorial.png"));
19
20 for (int i = 0; i < 7; i++)
21 insertColumn(0);
22
23 QStringList lables;
24 lables << "Image Size" << "View Size" << "Zoom" << "Format" << "Upload" << "Rendering" << "FPs";
25 setHorizontalHeaderLabels(lables);
26
27 auto* header = horizontalHeader();
28 header->setSectionResizeMode(QHeaderView::Stretch);
29 auto font = header->font();
30 font.setBold(true);
31 header->setFont(font);
32 resize(640, 480);
33 setWindowTitle("Performance Test Results");
34}
35
36// display result in the result window
37void PTResultWidget::AddResult(const PTResult& result)
38{
39 auto row = rowCount();
40 insertRow(row);
41
42 SetResultItem(row, 0, ImageSizeToString(result.ImageSize));
43 SetResultItem(row, 1, ViewSizeToString(result.ViewSize));
44 SetResultItem(row, 2, ZoomToString(result.Zoom));
45 SetResultItem(row, 3, PlanesToString(result.Planes));
46 SetResultItem(row, 4, UploadModeToString(result.UploadMode));
47
48
49 QString renderEngineToolTip;
50
51 if (result.RenderEngine == Cvb::UI::RenderEngine::Raster)
52 {
53 renderEngineToolTip = QString("Rendered with \"QPainter\"");
54 }
55 else
56 {
57 int glVersion = (result.RenderEngine == Cvb::UI::RenderEngine::OpenGL2) ? 2 : 3;
60 renderEngineToolTip = vendor + QString("\n") + renderer;
61 }
62
63 SetResultItem(row, 5, RenderEngineToString(result.RenderEngine), renderEngineToolTip);
64 SetResultItem(row, 6, FPsToString(result.FPS));
65}
66
67void PTResultWidget::SetResultItem(int row, int column, const QString & text, const QString & toolTip)
68{
69 auto cell = new QTableWidgetItem(text);
70 cell->setTextAlignment(Qt::AlignCenter);
71 cell->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
72 if (!toolTip.isEmpty())
73 cell->setToolTip(toolTip);
74 setItem(row, column, cell);
75}
76
77QString PTResultWidget::ImageSizeToString(Cvb::Size2D<int> size) const
78{
79 return QString("%1 x ").arg(size.Width()) + QString("%1").arg(size.Height());
80}
81
82QString PTResultWidget::ViewSizeToString(QSize size) const
83{
84 return QString("%1 x ").arg(size.width()) + QString("%1").arg(size.height());
85}
86
87QString PTResultWidget::ZoomToString(Cvb::UI::ZoomDescriptor zoomDescriptor) const
88{
89 switch (zoomDescriptor.ID)
90 {
91 default:
93 return "Invalid";
94
96 return "Panorama";
97
99 return "1 : 1";
100
102 return "1 : 2";
103
105 return "1 : 4";
106
108 return "1 : 8";
109
111 return "1 : 16";
112
114 return "1 : 32";
115
117 return "1 : 64";
118
120 return "1 : 128";
121 }
122}
123
124QString PTResultWidget::PlanesToString(int planes) const
125{
126 return (planes == 1) ? "Mono" : "Colour";
127}
128
129QString PTResultWidget::UploadModeToString(Cvb::UI::UploadMode uploadMode) const
130{
131 return (uploadMode == Cvb::UI::UploadMode::Image) ? "Image" : "View";
132}
133
134QString PTResultWidget::RenderEngineToString(Cvb::UI::RenderEngine renderEngine) const
135{
136 switch (renderEngine)
137 {
138 default:
139 return "Invalid";
140
142 return "Raster";
143
145 return "OpenGL 2";
146
148 return "OpenGL 3";
149 }
150}
151
152QString PTResultWidget::FPsToString(double fps) const
153{
154 return QString("%1").arg(fps, 3);
155}
156
157PTSetupWidget::PTSetupWidget(QWidget * parent, PTResultWidget * ptResultWidget)
158 : QWidget(parent)
159 , ptResultWidget_(ptResultWidget)
160{
161 spMeasurementCount_ = new QSpinBox(this);
162 spRefreshCount_ = new QSpinBox(this);
163
164 auto pbHide = new QPushButton("Hide");
165 auto pbHideAndRunPT = new QPushButton("Hide & Run");
166
167 auto groupBox = new QGroupBox("Performance Test for Render Engine");
168 auto mainLayout = new QVBoxLayout;
169 auto spLayout = new QVBoxLayout;
170 auto pbLayout = new QHBoxLayout;
171
172 spLayout->addWidget(spMeasurementCount_);
173 spLayout->addWidget(spRefreshCount_);
174
175 pbLayout->addStretch();
176 pbLayout->addWidget(pbHide);
177 pbLayout->addWidget(pbHideAndRunPT);
178 pbLayout->addStretch();
179
180 mainLayout->addLayout(spLayout);
181 mainLayout->addLayout(pbLayout);
182
183 groupBox->setLayout(mainLayout);
184
185 auto gblayout = new QVBoxLayout;
186 gblayout->addWidget(groupBox);
187 setLayout(gblayout);
188
189 spMeasurementCount_->setPrefix("Measurement Count: ");
190 spMeasurementCount_->setRange(2, 10000);
191 spMeasurementCount_->setValue(measurementCount_);
192 spMeasurementCount_->setToolTip("Number of measurements used to get a result as mean.");
193
194 spRefreshCount_->setPrefix("Refresh Count: ");
195 spRefreshCount_->setRange(500, 1000000);
196 spRefreshCount_->setValue(refreshCount_);
197 spRefreshCount_->setToolTip("Number of display refreshes executed for a single measurement.");
198
199 connect(spMeasurementCount_, SIGNAL(valueChanged(int)), this, SLOT(HandleMeasurementCountChanged(int)));
200 connect(spRefreshCount_, SIGNAL(valueChanged(int)), this, SLOT(HandleRefreshCountChanged(int)));
201
202 connect(pbHide, SIGNAL(clicked()), this, SLOT(HandleHide()));
203 connect(pbHideAndRunPT, SIGNAL(clicked()), this, SLOT(HandleHideAndRunPT()));
204}
205
206void PTSetupWidget::HandleHide() noexcept
207{
208 setVisible(false);
209}
210
211void PTSetupWidget::HandleHideAndRunPT() noexcept
212{
213 HandleHide();
214 if (!ptResultWidget_->isVisible())
215 {
216 ptResultWidget_->move(QApplication::desktop()->screen()->rect().center());
217 ptResultWidget_->show();
218 }
219 RunPT();
220}
221
222void PTSetupWidget::HandleRefreshCountChanged(int value) noexcept
223{
224 refreshCount_ = value;
225}
226
227void PTSetupWidget::HandleMeasurementCountChanged(int value) noexcept
228{
229 measurementCount_ = value;
230}
231
232
233
234MainWidget::MainWidget(PTResultWidget * ptResultWidget)
235 : QWidget()
236 , ptResultWidget_(ptResultWidget)
237{
238 imageView_ = new Cvb::UI::ImageView(this);
239 ptSetupWidget_ = new PTSetupWidget(this, ptResultWidget_);
240
241
242 auto mainLayout = new QVBoxLayout;
243 mainLayout->addWidget(imageView_);
244 mainLayout->addWidget(new QLabel(tr("Right click to get the context menu."), this));
245 mainLayout->addWidget(ptSetupWidget_);
246
247 setLayout(mainLayout);
248
249 Cvb::ImagePtr image = Cvb::Image::Load(Cvb::ExpandPath(Cvb::InstallPath() + CVB_LIT("tutorial/ClassicSwitch001.bmp")));
250 imageView_->Refresh(image);
251
252
253 performaceTimer_.setTimerType(Qt::TimerType::PreciseTimer);
254
255 connect(ptSetupWidget_, SIGNAL(RunPT()), this, SLOT(HandlePT()));
256 connect(&performaceTimer_, SIGNAL(timeout()), this, SLOT(HandleTimeout()));
257
258 ptSetupWidget_->hide();
259
260 resize(640, 480);
261}
262
263void MainWidget::HandleLoadImage()
264{
265 auto fileName = QFileDialog::getOpenFileName(this, "Load Image", Cvb::UI::CvbToQt(Cvb::InstallPath()), "Images(*.bmp *.png *.tif *.tiff *.jpg);;Common Vision Blox Image Object(*.mio)");
266 if (fileName.isEmpty())
267 return;
268
269 try
270 {
272 imageView_->Refresh(image);
273 }
274 catch (const std::exception& error)
275 {
276 QMessageBox::critical(this, "Error", QString(error.what()));
277 }
278
279}
280
281void MainWidget::HandlePixelValue()
282{
284 if (!mouseMoveCookie_)
285 {
286 mouseMoveCookie_ = imageView_->RegisterEventMouseMoved([&](Cvb::Point2D<int> mousePos, const std::vector<double>& pixelVal)
287 {
288 Cvb::StringStream titleStream;
289 titleStream << "(X:" << mousePos.X() << ", Y:" << mousePos.Y() << ") ";
290 if (pixelVal.size() == 3)
291 titleStream << "(R:" << qFloor(pixelVal[0]) << ", G:" << qFloor(pixelVal[1]) << ", B:" << qFloor(pixelVal[2]) << ")";
292 else if (pixelVal.size() == 1)
293 titleStream << "(V:" << qFloor(pixelVal[0]) << ")";
294 setWindowTitle(Cvb::UI::CvbToQt(titleStream.str()));
295
296 });
297 }
298 else
299 {
300 imageView_->UnregisterEventMouseMoved(mouseMoveCookie_);
301 setWindowTitle("");
302 }
303}
304
305void MainWidget::HandleRenderEngineChanged(QAction* action)
306{
307 auto renderEngine = static_cast<Cvb::UI::RenderEngine>(action->data().toInt());
308 try
309 {
310 imageView_->SetRenderEngine(renderEngine);
311 imageView_->Refresh();
312 }
313 catch (const std::exception& error)
314 {
315 QMessageBox::critical(this, "Error", QString(error.what()) + QString("\nCheck your graphics driver!"));
316 }
317
318}
319
320void MainWidget::HandleUploadModeChange(QAction* action)
321{
322 auto uploadMode = static_cast<Cvb::UI::UploadMode>(action->data().toInt());
323 try
324 {
325 imageView_->SetUploadMode(uploadMode);
326 }
327 catch (const std::exception& error)
328 {
329 QMessageBox::critical(this, "Error", QString(error.what()));
330 }
331
332}
333
334void MainWidget::HandlePT()
335{
336 ptState_ = PTState::Running;
337 rateCounter_.SetWindowSize(ptSetupWidget_->MeasurementCout());
338 testCycles_ = 0;
339 ShowProgress();
340 performaceTimer_.start();
341}
342
343void MainWidget::HandleTimeout()
344{
345 if (testCycles_ % ptSetupWidget_->RefreshCount() == 0)
346 {
347 rateCounter_.Step();
348 ShowProgress();
349
350 if (rateCounter_.NumSteps() == rateCounter_.WindowSize())
351 {
352 performaceTimer_.stop();
353 if (ptState_ == PTState::Running)
354 {
355 auto rate = rateCounter_.Rate();
356 AppendResult(rate * static_cast<double>(ptSetupWidget_->RefreshCount()));
357 rateCounter_.Reset();
358 ptState_ = PTState::Idle;
359 setWindowTitle("");
360
361 }
362 }
363 }
364 imageView_->Refresh();
365 testCycles_++;
366}
367
368void MainWidget::HandleClearResults()
369{
370 while (ptResultWidget_->rowCount())
371 ptResultWidget_->removeRow(0);
372}
373
374void MainWidget::ShowProgress() noexcept
375{
376 ptResultWidget_->setWindowTitle(QString("Performance Test ")
377 + ((ptState_ == PTState::Running) ? QString("Running") : QString("Setup"))
378 + QString(": %1").arg(rateCounter_.NumSteps())
379 + QString(" / %1").arg(rateCounter_.WindowSize()));
380
381}
382
383void MainWidget::AppendResult(double fps)
384{
385
386 PTResult result;
387 result.Planes = imageView_->Image()->PlanesCount();
388 result.FPS = fps;
389 result.RenderEngine = imageView_->RenderEngine();
390 result.ViewSize = imageView_->size();
391 result.ImageSize = imageView_->Image()->Size();
392 result.UploadMode = imageView_->UploadMode();
393 result.Zoom = imageView_->Zoom();
394
395 ptResultWidget_->setWindowTitle("Performance Test Results");
396 ptResultWidget_->AddResult(result);
397
398
399}
400
401void MainWidget::contextMenuEvent(QContextMenuEvent *event)
402{
403 // Context menus do not work in full screen mode!
404 if (windowState() & Qt::WindowFullScreen
405 || ptState_ != PTState::Idle)
406 return;
407
408 QMenu contextMenu;
409
410 auto acLoadImage = contextMenu.addAction("Load Image");
411 contextMenu.addSeparator();
412
413 auto acShowFullScreen = contextMenu.addAction("Show Full Screen");
414 auto acPixelValues = contextMenu.addAction("Pixel Values");
415 acPixelValues->setCheckable(true);
416 acPixelValues->setChecked(static_cast<bool>(mouseMoveCookie_));
417 contextMenu.addSeparator();
418
419 auto mnRenderEngine = contextMenu.addMenu("Render Engine");
420 QActionGroup* agRenderEngine = new QActionGroup(&contextMenu);
421 agRenderEngine->setExclusive(true);
422 auto acRenderEngineRaster = agRenderEngine->addAction("Raster");
423 acRenderEngineRaster->setCheckable(true);
424 acRenderEngineRaster->setData(static_cast<int>(Cvb::UI::RenderEngine::Raster));
425 auto acRenderEngineGL2 = agRenderEngine->addAction("OpenGL 2");
426 acRenderEngineGL2->setCheckable(true);
427 acRenderEngineGL2->setData(static_cast<int>(Cvb::UI::RenderEngine::OpenGL2));
428 auto acRenderEngineGL3 = agRenderEngine->addAction("OpenGL 3");
429 acRenderEngineGL3->setCheckable(true);
430 acRenderEngineGL3->setData(static_cast<int>(Cvb::UI::RenderEngine::OpenGL3));
431
432 switch (imageView_->RenderEngine())
433 {
434 default:
436 acRenderEngineRaster->setChecked(true);
437 break;
438
440 acRenderEngineGL2->setChecked(true);
441 break;
442
444 acRenderEngineGL3->setChecked(true);
445 break;
446 }
447
448 mnRenderEngine->addActions(agRenderEngine->actions());
449
450 auto mnUploadMode = contextMenu.addMenu("Upload Mode");
451 QActionGroup* agUploadMode = new QActionGroup(&contextMenu);
452 agUploadMode->setExclusive(true);
453 auto acUploadModeViewPort = agUploadMode->addAction("Viewport");
454 acUploadModeViewPort->setCheckable(true);
455 acUploadModeViewPort->setData(static_cast<int>(Cvb::UI::UploadMode::Viewport));
456 auto acUploadModeImage = agUploadMode->addAction("Image");
457 acUploadModeImage->setCheckable(true);
458 acUploadModeImage->setData(static_cast<int>(Cvb::UI::UploadMode::Image));
459
460 switch (imageView_->UploadMode())
461 {
462 default:
464 acUploadModeViewPort->setChecked(true);
465 break;
466
468 acUploadModeImage->setChecked(true);
469 break;
470 }
471
472 mnUploadMode->addActions(agUploadMode->actions());
473
474
475 auto mnPT = contextMenu.addMenu("Performance Test");
476 auto acSetupTest = mnPT->addAction("Setup Test");
477 auto acShowResults = mnPT->addAction("Show Results");
478 auto acClearResults = mnPT->addAction("Clear Results");
479
480 connect(acLoadImage, SIGNAL(triggered()), this, SLOT(HandleLoadImage()));
481 connect(acPixelValues, SIGNAL(triggered()), this, SLOT(HandlePixelValue()));
482 connect(agRenderEngine, SIGNAL(triggered(QAction*)), this, SLOT(HandleRenderEngineChanged(QAction*)));
483 connect(agUploadMode, SIGNAL(triggered(QAction*)), this, SLOT(HandleUploadModeChange(QAction*)));
484 connect(acShowFullScreen, SIGNAL(triggered()), this, SLOT(showFullScreen()));
485 connect(acSetupTest, SIGNAL(triggered()), ptSetupWidget_, SLOT(show()));
486 connect(acShowResults, SIGNAL(triggered()), ptResultWidget_, SLOT(show()));
487 connect(acClearResults, SIGNAL(triggered()), this, SLOT(HandleClearResults()));
488
489 contextMenu.exec(mapToGlobal(event->pos()));
490}
491
492void MainWidget::keyPressEvent(QKeyEvent *event)
493{
494 if (ptState_ == PTState::Running)
495 {
497 return;
498 }
499
500 if ((event->key() == Qt::Key_T) && QApplication::keyboardModifiers() && Qt::ControlModifier)
501 {
502 if (ptSetupWidget_->isVisible())
503 ptSetupWidget_->hide();
504 else
505 ptSetupWidget_->show();
506 }
507 else if ((event->key() == Qt::Key_F) && QApplication::keyboardModifiers() && Qt::ControlModifier)
508 {
509 if (isFullScreen())
510 showNormal();
511 else
512 showFullScreen();
513 }
514 else if ((event->key() == Qt::Key_R) && QApplication::keyboardModifiers() && Qt::ControlModifier)
515 {
516 if (ptResultWidget_->isVisible())
517 ptResultWidget_->close();
518 else
519 ptResultWidget_->show();
520 }
521 else if (event->key() == Qt::Key_Escape)
522 {
523 if (isFullScreen())
524 showNormal();
525 }
526
527}
528
static std::unique_ptr< Image > Load(const String &fileName)
Loads an image with the given file name.
Definition: detail_image.hpp:32
T X() const noexcept
Gets the x-component of the point.
Definition: point_2d.hpp:86
T Y() const noexcept
Gets the y-component of the point.
Definition: point_2d.hpp:106
T Height() const noexcept
Gets the vertical component of the size.
Definition: size_2d.hpp:79
T Width() const noexcept
Gets the horizontal component of the size.
Definition: size_2d.hpp:59
View to display an image.
Definition: decl_image_view.hpp:75
static String VendorName(int version)
Get the name of the OpenGL vendor.
Definition: detail_opengl_image_renderer_factory.hpp:88
static String RendererName(int version)
Gets the name of the OpenGL renderer.
Definition: detail_opengl_image_renderer_factory.hpp:93
Cvb::String QtToCvb(const QString text) noexcept
Convenience converter for strings.
Definition: ui.hpp:238
QString CvbToQt(const Cvb::String &text) noexcept
Convenience converter for strings.
Definition: ui.hpp:253
void setCheckable(bool)
QVariant data() const const
QList< QAction * > actions() const const
QAction * addAction(QAction *action)
void setExclusive(bool)
QDesktopWidget * desktop()
void addWidget(QWidget *widget, int stretch, Qt::Alignment alignment)
const QPoint & pos() const const
QString getOpenFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options options)
Qt::KeyboardModifiers keyboardModifiers()
int key() const const
QAction * addAction(const QString &text)
QAction * addMenu(QMenu *menu)
QAction * addSeparator()
QAction * exec()
QMessageBox::StandardButton critical(QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton)
QString arg(qlonglong a, int fieldWidth, int base, QChar fillChar) const const
bool isEmpty() const const
int toInt(bool *ok) const const
virtual void keyPressEvent(QKeyEvent *event)
ZoomID ID
Zoom identifier for known factors.
Definition: detail_ui.hpp:161