umbrello 2.34.3 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

singlepagedialogbase.h
Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: GPL-2.0-or-later
3 SPDX-FileCopyrightText: 2012-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4*/
5
6#ifndef SINGLEPAGEDIALOGBASE_H
7#define SINGLEPAGEDIALOGBASE_H
8
9#include <QtGlobal>
10
11#if QT_VERSION >= 0x050000
12#include <QDialog>
13 class QAbstractButton;
14 class QDialogButtonBox;
15#else
16#include <KDialog>
17#endif
18
26#if QT_VERSION >= 0x050000
27 class SinglePageDialogBase : public QDialog
28#else
29class SinglePageDialogBase : public KDialog
30#endif
31{
32 Q_OBJECT
33 public:
34 explicit SinglePageDialogBase(QWidget *parent, bool withApplyButton = false, bool withSearchButton = false);
35 virtual ~SinglePageDialogBase();
36 virtual bool apply();
37
38#if QT_VERSION >= 0x050000
39 typedef enum { Cancel = 0, Ok = 1, Apply = 2, No = 2 } ButtonCode;
40 // keep in sync with MultiPageDialogBase
41 void setCaption(const QString &caption);
42
43 QWidget *mainWidget();
44 void setMainWidget(QWidget *widget);
45 void setButtonText(ButtonCode code, const QString &text);
46#endif
47
48 protected slots:
49 void slotApply();
50 void slotOk();
51#if QT_VERSION >= 0x050000
52 void slotCancel();
53 void slotClicked(QAbstractButton*);
54#endif
55
56 protected:
57#if QT_VERSION >= 0x050000
58 QDialogButtonBox *m_buttonBox;
59 QWidget *m_mainWidget;
60 void enableButtonOk(bool enable);
61#endif
62 virtual bool validate();
63};
64
65#endif
SinglePageDialogBase
Definition: singlepagedialogbase.h:31
SinglePageDialogBase::validate
virtual bool validate()
Definition: singlepagedialogbase.cpp:214
SinglePageDialogBase::slotOk
void slotOk()
Definition: singlepagedialogbase.cpp:166
SinglePageDialogBase::SinglePageDialogBase
SinglePageDialogBase(QWidget *parent, bool withApplyButton=false, bool withSearchButton=false)
Definition: singlepagedialogbase.cpp:48
SinglePageDialogBase::slotApply
void slotApply()
Definition: singlepagedialogbase.cpp:157
SinglePageDialogBase::~SinglePageDialogBase
virtual ~SinglePageDialogBase()
Definition: singlepagedialogbase.cpp:68
SinglePageDialogBase::apply
virtual bool apply()
Definition: singlepagedialogbase.cpp:80