umbrello: umbrello/dialogs/singlepagedialogbase.h Source File

umbrello 2.38.2 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-2022 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4*/
5
6#ifndef SINGLEPAGEDIALOGBASE_H
7#define SINGLEPAGEDIALOGBASE_H
8
9#include <QtGlobal>
10
11#include <QDialog>
12class QAbstractButton;
13class QDialogButtonBox;
14
22 class SinglePageDialogBase : public QDialog
23{
24 Q_OBJECT
25public:
26 explicit SinglePageDialogBase(QWidget *parent, bool withApplyButton = false, bool withSearchButton = false);
27 virtual ~SinglePageDialogBase();
28 virtual bool apply();
29
30 enum ButtonCode { Cancel = 0, Ok = 1, Apply = 2 };
31 // keep in sync with MultiPageDialogBase
32 void setCaption(const QString &caption);
33
34 QWidget *mainWidget();
35 void setMainWidget(QWidget *widget);
36 void setButtonText(ButtonCode code, const QString &text);
37
38protected slots:
39 void slotApply();
40 void slotOk();
41 void slotCancel();
42 void slotClicked(QAbstractButton*);
43
44protected:
45 QDialogButtonBox *m_buttonBox;
46 QWidget *m_mainWidget;
47 void enableButtonOk(bool enable);
48 virtual bool validate();
49};
50
51#endif
SinglePageDialogBase
Definition: singlepagedialogbase.h:23
SinglePageDialogBase::validate
virtual bool validate()
Definition: singlepagedialogbase.cpp:201
SinglePageDialogBase::m_mainWidget
QWidget * m_mainWidget
Definition: singlepagedialogbase.h:46
SinglePageDialogBase::slotOk
void slotOk()
Definition: singlepagedialogbase.cpp:155
SinglePageDialogBase::mainWidget
QWidget * mainWidget()
Definition: singlepagedialogbase.cpp:136
SinglePageDialogBase::setMainWidget
void setMainWidget(QWidget *widget)
Definition: singlepagedialogbase.cpp:85
SinglePageDialogBase::setButtonText
void setButtonText(ButtonCode code, const QString &text)
Definition: singlepagedialogbase.cpp:113
SinglePageDialogBase::slotApply
void slotApply()
Definition: singlepagedialogbase.cpp:146
SinglePageDialogBase::slotCancel
void slotCancel()
Definition: singlepagedialogbase.cpp:167
SinglePageDialogBase::enableButtonOk
void enableButtonOk(bool enable)
Definition: singlepagedialogbase.cpp:189
SinglePageDialogBase::slotClicked
void slotClicked(QAbstractButton *)
Definition: singlepagedialogbase.cpp:175
SinglePageDialogBase::ButtonCode
ButtonCode
Definition: singlepagedialogbase.h:30
SinglePageDialogBase::Ok
@ Ok
Definition: singlepagedialogbase.h:30
SinglePageDialogBase::Cancel
@ Cancel
Definition: singlepagedialogbase.h:30
SinglePageDialogBase::Apply
@ Apply
Definition: singlepagedialogbase.h:30
SinglePageDialogBase::~SinglePageDialogBase
virtual ~SinglePageDialogBase()
Definition: singlepagedialogbase.cpp:58
SinglePageDialogBase::m_buttonBox
QDialogButtonBox * m_buttonBox
Definition: singlepagedialogbase.h:45
SinglePageDialogBase::setCaption
void setCaption(const QString &caption)
Definition: singlepagedialogbase.cpp:77
SinglePageDialogBase::apply
virtual bool apply()
Definition: singlepagedialogbase.cpp:70