| 1 |
/* This file is part of the KDE project |
| 2 |
SPDX-FileCopyrightText: 2007 Matthias Kretz <[email protected]> |
| 3 |
|
| 4 |
SPDX-License-Identifier: LGPL-2.0-only |
| 5 |
|
| 6 |
*/ |
| 7 |
|
| 8 |
#ifndef KODIALOG_P_H |
| 9 |
#define KODIALOG_P_H |
| 10 |
|
| 11 |
#include "KoDialog.h" |
| 12 |
#include <QPointer> |
| 13 |
#include <QSignalMapper> |
| 14 |
#include <QSize> |
| 15 |
#include <QHash> |
| 16 |
|
| 17 |
class QBoxLayout; |
| 18 |
class QPushButton; |
| 19 |
class KUrlLabel; |
| 20 |
class KSeparator; |
| 21 |
class QDialogButtonBox; |
| 22 |
|
| 23 |
class KoDialogPrivate |
| 24 |
{ |
| 25 |
Q_DECLARE_PUBLIC(KoDialog) |
| 26 |
protected: |
| 27 |
KoDialogPrivate() |
| 28 |
: mDetailsVisible(false), mSettingDetails(false), mDeferredDelete(false), |
| 29 |
mDetailsWidget(nullptr), |
| 30 |
mTopLayout(nullptr), mMainWidget(nullptr), mUrlHelp(nullptr), mActionSeparator(nullptr), |
| 31 |
mButtonOrientation(Qt::Horizontal), |
| 32 |
mDefaultButton(KoDialog::NoDefault), |
| 33 |
mButtonBox(nullptr) |
| 34 |
{ |
| 35 |
} |
| 36 |
|
| 37 |
virtual ~KoDialogPrivate() {} |
| 38 |
|
| 39 |
KoDialog *q_ptr; |
| 40 |
|
| 41 |
void setupLayout(); |
| 42 |
void appendButton(KoDialog::ButtonCode code, const KGuiItem &item); |
| 43 |
|
| 44 |
bool mDetailsVisible; |
| 45 |
bool mSettingDetails; |
| 46 |
bool mDeferredDelete; |
| 47 |
QWidget *mDetailsWidget; |
| 48 |
QSize mIncSize; |
| 49 |
QSize mMinSize; |
| 50 |
QString mDetailsButtonText; |
| 51 |
|
| 52 |
QBoxLayout *mTopLayout; |
| 53 |
QPointer<QWidget> mMainWidget; |
| 54 |
KUrlLabel *mUrlHelp; |
| 55 |
KSeparator *mActionSeparator; |
| 56 |
|
| 57 |
QString mAnchor; |
| 58 |
QString mHelpApp; |
| 59 |
QString mHelpLinkText; |
| 60 |
|
| 61 |
Qt::Orientation mButtonOrientation; |
| 62 |
KoDialog::ButtonCode mDefaultButton; |
| 63 |
KoDialog::ButtonCode mEscapeButton; |
| 64 |
|
| 65 |
QDialogButtonBox *mButtonBox; |
| 66 |
QHash<int, QPushButton *> mButtonList; |
| 67 |
QSignalMapper mButtonSignalMapper; |
| 68 |
|
| 69 |
protected Q_SLOTS: |
| 70 |
void queuedLayoutUpdate(); |
| 71 |
void helpLinkClicked(); |
| 72 |
|
| 73 |
private: |
| 74 |
void init(KoDialog *); |
| 75 |
bool dirty: 1; |
| 76 |
}; |
| 77 |
|
| 78 |
#endif // KDEUI_KDIALOG_P_H |