libyui
 
Loading...
Searching...
No Matches
YOptionalWidgetFactory.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: YOptionalWidgetFactory.h
20
21 Author: Stefan Hundhammer <shundhammer@suse.de>
22
23/-*/
24
25#ifndef YOptionalWidgetFactory_h
26#define YOptionalWidgetFactory_h
27
28#include <string>
29#include <vector>
30#include <map>
31
32#include "YTypes.h"
33#include "YWizard.h"
34#include "YGraph.h"
35
36
37class YBarGraph;
38class YDateField;
40class YDumbTab;
41class YDummySpecialWidget;
44class YSlider;
45class YTimeField;
46class YWidget;
48
57{
58public:
59
60 //
61 // Optional Widgets
62 //
63
64 virtual bool hasWizard();
65 virtual YWizard * createWizard ( YWidget * parent,
66 const std::string & backButtonLabel,
67 const std::string & abortButtonLabel,
68 const std::string & nextButtonLabel,
69 YWizardMode wizardMode = YWizardMode_Standard );
70
71 virtual bool hasDumbTab();
72 virtual YDumbTab * createDumbTab ( YWidget * parent );
73
74 virtual bool hasSlider();
75 virtual YSlider * createSlider ( YWidget * parent,
76 const std::string & label,
77 int minVal,
78 int maxVal,
79 int initialVal );
80
81 virtual bool hasDateField();
82 virtual YDateField * createDateField ( YWidget * parent, const std::string & label );
83
84 virtual bool hasTimeField();
85 virtual YTimeField * createTimeField ( YWidget * parent, const std::string & label );
86
87 virtual bool hasBarGraph();
88 virtual YBarGraph * createBarGraph ( YWidget * parent );
89
90 virtual bool hasPatternSelector();
91 virtual YWidget * createPatternSelector ( YWidget * parent, long modeFlags = 0 );
92
93 virtual bool hasSimplePatchSelector();
94 virtual YWidget * createSimplePatchSelector( YWidget * parent, long modeFlags = 0 );
95
96 virtual bool hasMultiProgressMeter();
97 YMultiProgressMeter * createHMultiProgressMeter( YWidget * parent, const std::vector<float> & maxValues );
98 YMultiProgressMeter * createVMultiProgressMeter( YWidget * parent, const std::vector<float> & maxValues );
99 virtual YMultiProgressMeter * createMultiProgressMeter ( YWidget * parent, YUIDimension dim, const std::vector<float> & maxValues );
100
101 virtual bool hasPartitionSplitter();
102 virtual YPartitionSplitter * createPartitionSplitter ( YWidget * parent,
103 int usedSize,
104 int totalFreeSize,
105 int newPartSize,
106 int minNewPartSize,
107 int minFreeSize,
108 const std::string & usedLabel,
109 const std::string & freeLabel,
110 const std::string & newPartLabel,
111 const std::string & freeFieldLabel,
112 const std::string & newPartFieldLabel );
113
114
115 virtual bool hasDownloadProgress();
116 virtual YDownloadProgress * createDownloadProgress ( YWidget * parent,
117 const std::string & label,
118 const std::string & filename,
119 YFileSize_t expectedFileSize );
120
121 bool hasDummySpecialWidget();
122 YWidget * createDummySpecialWidget( YWidget * parent );
123
124 virtual bool hasTimezoneSelector();
125 virtual YTimezoneSelector * createTimezoneSelector ( YWidget * parent,
126 const std::string & timezoneMap,
127 const std::map<std::string,std::string> & timezones );
128
129 virtual bool hasGraph();
130
131 virtual YGraph * createGraph( YWidget * parent,
132 const std::string & filename,
133 const std::string & layoutAlgorithm );
134
135 virtual YGraph * createGraph( YWidget * parent,
136 /* graph_t */ void * graph );
137
138 virtual bool hasContextMenu();
139
140protected:
141
142 friend class YUI;
143
150
154 virtual ~YOptionalWidgetFactory();
155
156}; // class YOptionalWidgetFactory
157
158
159
160#endif // YOptionalWidgetFactory_h
YWizardMode
Definition YWizard.h:43
@ YWizardMode_Standard
Normal wizard (help panel or nothing)
Definition YWizard.h:44
Definition YBarGraph.h:41
Definition YDateField.h:43
Definition YDownloadProgress.h:38
Definition YDumbTab.h:41
Definition YGraph.h:46
Definition YMultiProgressMeter.h:65
YOptionalWidgetFactory()
Definition YOptionalWidgetFactory.cc:44
virtual ~YOptionalWidgetFactory()
Definition YOptionalWidgetFactory.cc:50
Definition YPartitionSplitter.h:64
Definition YSlider.h:45
Definition YTimeField.h:42
Definition YTimezoneSelector.h:39
Definition YWidget.h:55
Definition YWizard.h:97