1 /*---------------------------------------------------------------------\
3 | __ __ ____ _____ ____ |
4 | \ \ / /_ _/ ___|_ _|___ \ |
5 | \ V / _` \___ \ | | __) | |
6 | | | (_| |___) || | / __/ |
7 | |_|\__,_|____/ |_| |_____| |
11 \----------------------------------------------------------------------/
13 File: YQOptionalWidgetFactory.h
15 Author: Stefan Hundhammer <sh@suse.de>
19 #ifndef YQOptionalWidgetFactory_h
20 #define YQOptionalWidgetFactory_h
23 #include "YOptionalWidgetFactory.h"
25 #include "YQBarGraph.h"
26 #include "YQDateField.h"
27 #include "YQDownloadProgress.h"
28 #include "YQDumbTab.h"
29 #include "YQMultiProgressMeter.h"
30 #include "YQPartitionSplitter.h"
31 #include "YQPatternSelector.h"
32 #include "YQSimplePatchSelector.h"
34 #include "YQTimeField.h"
43 * Widget factory for optional ("special") widgets.
45 * Remember to always check with the corresponding "has..()" method if the
46 * current UI actually provides the requested widget. Otherwise the
47 * "create...()" method will throw an exception.
49 class YQOptionalWidgetFactory: public YOptionalWidgetFactory
58 virtual bool hasWizard();
59 virtual YQWizard * createWizard ( YWidget * parent,
60 YWidgetID * backButtonId, const string & backButtonLabel,
61 YWidgetID * abortButtonId, const string & abortButtonLabel,
62 YWidgetID * nextButtonId, const string & nextButtonLabel,
63 YWizardMode wizardMode = YWizardMode_Standard );
65 virtual bool hasDumbTab();
66 virtual YQDumbTab * createDumbTab ( YWidget * parent );
68 virtual bool hasSlider();
69 virtual YQSlider * createSlider ( YWidget * parent,
75 virtual bool hasDateField();
76 virtual YQDateField * createDateField ( YWidget * parent, const string & label );
78 virtual bool hasTimeField();
79 virtual YQTimeField * createTimeField ( YWidget * parent, const string & label );
81 virtual bool hasBarGraph();
82 virtual YQBarGraph * createBarGraph ( YWidget * parent );
84 virtual bool hasPatternSelector();
85 virtual YQPatternSelector * createPatternSelector ( YWidget * parent, long modeFlags = 0 );
87 virtual bool hasSimplePatchSelector();
88 virtual YQSimplePatchSelector * createSimplePatchSelector( YWidget * parent, long modeFlags = 0 );
90 virtual bool hasMultiProgressMeter();
91 virtual YQMultiProgressMeter * createMultiProgressMeter( YWidget * parent, YUIDimension dim, const vector<float> & maxValues );
93 virtual bool hasPartitionSplitter();
94 virtual YQPartitionSplitter * createPartitionSplitter ( YWidget * parent,
100 const string & usedLabel,
101 const string & freeLabel,
102 const string & newPartLabel,
103 const string & freeFieldLabel,
104 const string & newPartFieldLabel );
106 virtual bool hasDownloadProgress();
107 virtual YQDownloadProgress * createDownloadProgress ( YWidget * parent,
108 const string & label,
109 const string & filename,
110 YFileSize_t expectedFileSize );
119 * Use YUI::optionalWidgetFactory() to get the singleton for this class.
121 YQOptionalWidgetFactory();
126 virtual ~YQOptionalWidgetFactory();
128 }; // class YQOptionalWidgetFactory
132 #endif // YQOptionalWidgetFactory_h