itom
Loading...
Searching...
No Matches
userUiDialog.h
1/* ********************************************************************
2 itom software
3 URL: http://www.uni-stuttgart.de/ito
4 Copyright (C) 2020, Institut für Technische Optik (ITO),
5 Universität Stuttgart, Germany
6
7 This file is part of itom.
8
9 itom is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Library General Public Licence as published by
11 the Free Software Foundation; either version 2 of the Licence, or (at
12 your option) any later version.
13
14 itom is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
17 General Public Licence for more details.
18
19 You should have received a copy of the GNU Library General Public License
20 along with itom. If not, see <http://www.gnu.org/licenses/>.
21*********************************************************************** */
22
23#ifndef USERUIDIALOG
24#define USERUIDIALOG
25
26#include "../common/sharedStructuresQt.h"
27#include "../api/apiFunctionsGraph.h"
28#include "../global.h"
29
30#include <qdialog.h>
31
32#include <qstring.h>
33#include <qmap.h>
34#include <QBoxLayout>
35#include <qdialogbuttonbox.h>
36#include <qabstractbutton.h>
37
38#include <qstringlist.h>
39#include <qmetaobject.h>
40
41namespace ito
42{
43
44class UserUiDialog : public QDialog
45{
46 Q_OBJECT
47public:
49 {
50 bbTypeNo = 0x0000,
51 bbTypeHorizontal = 0x0001,
52 bbTypeVertical = 0x0002
53 };
54
56 const QString& filename,
57 tButtonBarType buttonBarType,
58 const StringMap& dialogButtons,
59 RetVal& retValue,
60 QWidget* parent = NULL,
61 Qt::WindowFlags f = Qt::WindowFlags());
63 QWidget* contentWidget,
64 tButtonBarType buttonBarType,
65 const StringMap& dialogButtons,
66 RetVal& retValue,
67 QWidget* parent = NULL,
68 Qt::WindowFlags f = Qt::WindowFlags());
69
71
72protected:
73 RetVal init(const QString &filename, tButtonBarType buttonBarType, const StringMap &dialogButtons);
74 RetVal init(QWidget *contentWidget, tButtonBarType buttonBarType, const StringMap &dialogButtons);
75
76private:
77 QDialogButtonBox::ButtonRole getButtonRole(const QString &role);
78
79 QBoxLayout *m_boxLayout;
80 QDialogButtonBox *m_dialogBtnBox;
81 QWidget *m_uiWidget;
82
83signals:
84
85public slots:
86
87private slots:
88 void dialogButtonClicked ( QAbstractButton * button );
89};
90
91} //end namespace ito
92
93#endif
Class for managing status values (like errors or warning)
Definition retVal.h:54
Definition userUiDialog.h:45
tButtonBarType
Definition userUiDialog.h:49
Definition apiFunctionsGraph.cpp:40