libyui-qt
Loading...
Searching...
No Matches
YQOptionalWidgetFactory.h
1/*
2 Copyright (C) 2000-2012 Novell, Inc
3 This library is free software; you can redistribute it and/or modify
4 it under the terms of the GNU Lesser General Public License as
5 published by the Free Software Foundation; either version 2.1 of the
6 License, or (at your option) version 3.0 of the License. This library
7 is distributed in the hope that it will be useful, but WITHOUT ANY
8 WARRANTY; without even the implied warranty of MERCHANTABILITY or
9 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10 License for more details. You should have received a copy of the GNU
11 Lesser General Public License along with this library; if not, write
12 to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13 Floor, Boston, MA 02110-1301 USA
14*/
15
16
17/*-/
18
19 File: YQOptionalWidgetFactory.h
20
21 Author: Stefan Hundhammer <shundhammer@suse.de>
22
23/-*/
24
25#ifndef YQOptionalWidgetFactory_h
26#define YQOptionalWidgetFactory_h
27
28
29#include <yui/YOptionalWidgetFactory.h>
30
31#include "YQBarGraph.h"
32#include "YQDateField.h"
33#include "YQDownloadProgress.h"
34#include "YQDumbTab.h"
35#include "YQMultiProgressMeter.h"
36#include "YQPartitionSplitter.h"
37#include "YQSlider.h"
38#include "YQTimeField.h"
39
40class YQWizard;
41
42using std::string;
43using std::vector;
44
45
46
54class YQOptionalWidgetFactory: public YOptionalWidgetFactory
55{
56public:
57
58 //
59 // Optional Widgets
60 //
61
62
63 virtual bool hasWizard();
64 virtual YWizard * createWizard ( YWidget * parent,
65 const std::string & backButtonLabel,
66 const std::string & abortButtonLabel,
67 const std::string & nextButtonLabel,
68 YWizardMode wizardMode = YWizardMode_Standard );
69
70 virtual bool hasDumbTab();
71 virtual YQDumbTab * createDumbTab ( YWidget * parent );
72
73 virtual bool hasSlider();
74 virtual YQSlider * createSlider ( YWidget * parent,
75 const std::string & label,
76 int minVal,
77 int maxVal,
78 int initialVal );
79
80 virtual bool hasDateField();
81 virtual YQDateField * createDateField ( YWidget * parent, const std::string & label );
82
83 virtual bool hasTimeField();
84 virtual YQTimeField * createTimeField ( YWidget * parent, const std::string & label );
85
86 virtual bool hasBarGraph();
87 virtual YQBarGraph * createBarGraph ( YWidget * parent );
88
89 virtual bool hasPatternSelector();
90 virtual YWidget * createPatternSelector ( YWidget * parent, long modeFlags = 0 );
91
92 virtual bool hasSimplePatchSelector();
93 virtual YWidget * createSimplePatchSelector( YWidget * parent, long modeFlags = 0 );
94
95 virtual bool hasMultiProgressMeter();
96 virtual YQMultiProgressMeter * createMultiProgressMeter( YWidget * parent, YUIDimension dim, const vector<float> & maxValues );
97
98 virtual bool hasPartitionSplitter();
99 virtual YQPartitionSplitter * createPartitionSplitter ( YWidget * parent,
100 int usedSize,
101 int totalFreeSize,
102 int newPartSize,
103 int minNewPartSize,
104 int minFreeSize,
105 const std::string & usedLabel,
106 const std::string & freeLabel,
107 const std::string & newPartLabel,
108 const std::string & freeFieldLabel,
109 const std::string & newPartFieldLabel );
110
111 virtual bool hasDownloadProgress();
112 virtual YQDownloadProgress * createDownloadProgress ( YWidget * parent,
113 const std::string & label,
114 const std::string & filename,
115 YFileSize_t expectedFileSize );
116
117 virtual bool hasTimezoneSelector();
118 virtual YTimezoneSelector * createTimezoneSelector( YWidget * parent,
119 const std::string & timezoneMap,
120 const map<string,string> & timezones );
121
122 virtual bool hasGraph();
123 virtual YGraph * createGraph( YWidget * parent,
124 const std::string & filename,
125 const std::string & layoutAlgorithm );
126
127 virtual YGraph * createGraph( YWidget * parent,
128 /* graph_t */ void * graph );
129
130 virtual bool hasContextMenu();
131
132
133protected:
134
135 friend class YQUI;
136
143
147 virtual ~YQOptionalWidgetFactory();
148
149}; // class YQOptionalWidgetFactory
150
151
152
153#endif // YQOptionalWidgetFactory_h
Definition YQBarGraph.h:38
Definition YQDateField.h:38
Definition YQDownloadProgress.h:37
Definition YQDumbTab.h:38
Definition YQMultiProgressMeter.h:43
Definition YQOptionalWidgetFactory.h:55
YQOptionalWidgetFactory()
Definition YQOptionalWidgetFactory.cc:39
virtual ~YQOptionalWidgetFactory()
Definition YQOptionalWidgetFactory.cc:45
Definition YQPartitionSplitter.h:39
Definition YQSlider.h:37
Definition YQTimeField.h:37
Definition YQUI.h:63
Definition YQWizard.h:64