Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/wizards/kmymoneywizardpage.h
- This file was moved from kmymoney/widgets/kmymoneywizardpage.h.
Context not available. | |||||
18 | #ifndef KMYMONEYWIZARDPAGE_H | 18 | #ifndef KMYMONEYWIZARDPAGE_H | ||
---|---|---|---|---|---|
19 | #define KMYMONEYWIZARDPAGE_H | 19 | #define KMYMONEYWIZARDPAGE_H | ||
20 | 20 | | |||
21 | #include "kmymoneywizardpage_p.h" | ||||
22 | | ||||
21 | // ---------------------------------------------------------------------------- | 23 | // ---------------------------------------------------------------------------- | ||
22 | // QT Includes | 24 | // QT Includes | ||
23 | 25 | | |||
Context not available. | |||||
39 | 41 | | |||
40 | class KMyMoneyTitleLabel; | 42 | class KMyMoneyTitleLabel; | ||
41 | class KMyMoneyWizard; | 43 | class KMyMoneyWizard; | ||
42 | class KMyMoneyWizardPagePrivate; | | |||
43 | class KMandatoryFieldGroup; | 44 | class KMandatoryFieldGroup; | ||
44 | 45 | | |||
45 | /** | 46 | /** | ||
Context not available. | |||||
139 | * @note The implementation of this class is heavily based on ideas found at | 140 | * @note The implementation of this class is heavily based on ideas found at | ||
140 | * http://doc.trolltech.com/4.1/dialogs-complexwizard.html | 141 | * http://doc.trolltech.com/4.1/dialogs-complexwizard.html | ||
141 | */ | 142 | */ | ||
143 | class KMyMoneyWizardPagePrivate; | ||||
142 | class KMyMoneyWizardPage | 144 | class KMyMoneyWizardPage | ||
143 | { | 145 | { | ||
144 | public: | 146 | public: | ||
Context not available. | |||||
215 | * by application code for signal/slot connections as well. | 217 | * by application code for signal/slot connections as well. | ||
216 | * Other use is not foreseen. | 218 | * Other use is not foreseen. | ||
217 | */ | 219 | */ | ||
218 | QObject* object() const; | 220 | const KMyMoneyWizardPagePrivate *object() const; | ||
219 | 221 | | |||
220 | /** | 222 | /** | ||
221 | * This method returns a pointer to the widget which should | 223 | * This method returns a pointer to the widget which should | ||
Context not available. | |||||
236 | 238 | | |||
237 | virtual ~KMyMoneyWizardPage(); | 239 | virtual ~KMyMoneyWizardPage(); | ||
238 | protected: | 240 | protected: | ||
241 | KMyMoneyWizardPagePrivate * const d_ptr; | ||||
242 | | ||||
243 | KMyMoneyWizardPage(KMyMoneyWizardPagePrivate &dd, uint step, QWidget *widget); | ||||
244 | Q_DECLARE_PRIVATE(KMyMoneyWizardPage) | ||||
245 | | ||||
239 | /** | 246 | /** | ||
240 | * Constructor (kept protected, so that one cannot create such an object directly) | 247 | * Constructor (kept protected, so that one cannot create such an object directly) | ||
241 | */ | 248 | */ | ||
242 | explicit KMyMoneyWizardPage(unsigned int step, QWidget* widget); | 249 | explicit KMyMoneyWizardPage(uint step, QWidget* widget); | ||
243 | 250 | | |||
244 | /** | 251 | /** | ||
245 | * This method must be called by the implementation when the | 252 | * This method must be called by the implementation when the | ||
Context not available. | |||||
249 | * @note If you do not override isComplete() then there is no need | 256 | * @note If you do not override isComplete() then there is no need | ||
250 | * to call this method. | 257 | * to call this method. | ||
251 | */ | 258 | */ | ||
252 | void completeStateChanged() const; | 259 | void completeStateChanged(); | ||
253 | | ||||
254 | protected: | | |||
255 | KMandatoryFieldGroup* m_mandatoryGroup; | | |||
256 | | ||||
257 | private: | | |||
258 | unsigned int m_step; | | |||
259 | QWidget* m_widget; | | |||
260 | KMyMoneyWizardPagePrivate* const d; | | |||
261 | }; | | |||
262 | | ||||
263 | | ||||
264 | /** | | |||
265 | * The general base class for wizard pages | | |||
266 | * | | |||
267 | * @author Thomas Baumgart | | |||
268 | */ | | |||
269 | template <class T> | | |||
270 | class WizardPage : public KMyMoneyWizardPage | | |||
271 | { | | |||
272 | public: | | |||
273 | WizardPage(unsigned int step, QWidget* widget, T* parent) : | | |||
274 | KMyMoneyWizardPage(step, widget), | | |||
275 | m_wizard(parent), | | |||
276 | m_wizardBase(parent) { | | |||
277 | } | | |||
278 | virtual ~WizardPage() {} | | |||
279 | virtual KMyMoneyWizard* wizard() const { | | |||
280 | return m_wizardBase; | | |||
281 | } | | |||
282 | | ||||
283 | protected: | | |||
284 | T* m_wizard; | | |||
285 | KMyMoneyWizard* m_wizardBase; | | |||
286 | }; | 260 | }; | ||
287 | | ||||
288 | | ||||
289 | #endif | 261 | #endif | ||
Context not available. |