Logo    
KDWinUtils
Helper library for MFC to Qt migration
Loading...
Searching...
No Matches
kpropertypage.h
Go to the documentation of this file.
1/****************************************************************************
2**
3** This file is part of KDWinutils, KDAB's MFC to Qt migration tool.
4**
5** Copyright (C) 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6** All rights reserved.
7**
8** This file is intended solely for use by the migration tools and services
9** provided by Klarälvdalens Datakonsult AB.
10**
11** Any other use or distribution of this software that is not otherwise agreed
12** upon in writing and signed by an authorized representative of Klarälvdalens
13** Datakonsult AB, KDAB (USA) LLC, KDAB (Deutschland) GmbH & Co. K.G.,
14** KDAB (France) SAS, KDAB (UK), Ltd., or any future subsidiary of Klarälvdalens
15** Datakonsult AB is hereby prohibited.
16**
17** Contact info@kdab.com if any conditions stated above are unclear to you.
18**
19****************************************************************************/
20
21#pragma once
22
24#include "kwidget.h"
25
26#include <QWidget>
27
29
36{
37 Q_OBJECT
38
39public:
40 explicit KPropertyPage(QWidget *parent = nullptr);
41 ~KPropertyPage() override;
42
43public:
45 virtual bool OnApply();
46
48 virtual void OnCancel() { }
49
52 virtual bool OnKillActive() { return true; }
53
55 virtual void OnOK() { }
56
58 virtual bool OnQueryCancel() { return true; }
59
61 virtual void OnReset() { }
62
64 virtual bool OnSetActive() { return true; }
65
67 virtual bool OnWizardBack() { return true; }
68
70 virtual bool OnWizardFinish() { return true; }
71
73 virtual bool OnWizardNext() { return true; }
74
76 void SetModified(bool bChanged = true);
77
78signals:
80 void pageChanged(bool isModified);
81
82private:
83 friend class KPropertySheet;
84 bool m_isModified = false;
85};
86
The KPropertyPage class is used as a page inside a KPropertySheet.
Definition kpropertypage.h:36
virtual bool OnKillActive()
Called by the framework when the current page is no longer the active page. Perform data validation h...
Definition kpropertypage.h:52
virtual bool OnWizardBack()
Called by the framework when the Back button is clicked while using a wizard-type property sheet.
Definition kpropertypage.h:67
virtual void OnReset()
Called by the framework when the Cancel button is clicked.
Definition kpropertypage.h:61
virtual void OnCancel()
Called by the framework when the Cancel button is clicked.
Definition kpropertypage.h:48
~KPropertyPage() override
void pageChanged(bool isModified)
void SetModified(bool bChanged=true)
Call to activate or deactivate the Apply Now button.
virtual bool OnQueryCancel()
Called by the framework when the Cancel button is clicked, and before the cancel has taken place.
Definition kpropertypage.h:58
virtual bool OnApply()
Called by the framework when the Apply Now button is clicked.
virtual bool OnSetActive()
Called by the framework when the page is made the active page.
Definition kpropertypage.h:64
virtual void OnOK()
Called by the framework when the OK, Apply Now, or Close button is clicked.
Definition kpropertypage.h:55
KPropertyPage(QWidget *parent=nullptr)
virtual bool OnWizardFinish()
Called by the framework when the Finish button is clicked while using a wizard-type property sheet.
Definition kpropertypage.h:70
virtual bool OnWizardNext()
Called by the framework when the Next button is clicked while using a wizard-type property sheet.
Definition kpropertypage.h:73
The KPropertySheet class is a dialog with a tab control that contains property pages.
Definition kpropertysheet.h:40
The KWidget class is used to replace MFC CWnd.
Definition kwidget.h:283
#define KDWINUTILS_EXPORT
Definition kdwinutils_export.h:31
#define KDWINUTILS_BEGIN_NAMESPACE
Definition kdwinutils_global.h:27
#define KDWINUTILS_END_NAMESPACE
Definition kdwinutils_global.h:28