25 #include <QColorGroup>
26 #define YUILogComponent "qt-ui"
27 #include <yui/YUILog.h>
29 #include "YQWidgetFactory.h"
30 #include "YQApplication.h"
31 #include <yui/YUIException.h>
32 #include "YQPackageSelectorPluginStub.h"
33 #include "YQMainWinDock.h"
60 YQWidgetFactory::createDialog( YDialogType dialogType, YDialogColorMode colorMode )
63 YUI_CHECK_NEW( dialog );
75 YQWidgetFactory::createLayoutBox( YWidget * parent, YUIDimension dim )
78 YUI_CHECK_NEW( layoutBox );
85 YQWidgetFactory::createButtonBox( YWidget * parent )
88 YUI_CHECK_NEW( buttonBox );
100 YQWidgetFactory::createPushButton( YWidget * parent,
const std::string & label )
103 YUI_CHECK_NEW( pushButton );
111 YQWidgetFactory::createLabel( YWidget * parent,
112 const std::string & text,
116 YQLabel * label =
new YQLabel( parent, text, isHeading, isOutputField );
117 YUI_CHECK_NEW( label );
125 YQWidgetFactory::createInputField( YWidget * parent,
const std::string & label,
bool passwordMode )
128 YUI_CHECK_NEW( inputField );
136 YQWidgetFactory::createCheckBox( YWidget * parent,
const std::string & label,
bool isChecked )
139 YUI_CHECK_NEW( checkBox );
147 YQWidgetFactory::createRadioButton( YWidget * parent,
const std::string & label,
bool isChecked )
150 YUI_CHECK_NEW( radioButton );
156 if ( radioButton->buttonGroup() )
157 radioButton->buttonGroup()->addRadioButton( radioButton );
165 YQWidgetFactory::createComboBox( YWidget * parent,
const std::string & label,
bool editable )
168 YUI_CHECK_NEW( comboBox );
176 YQWidgetFactory::createSelectionBox( YWidget * parent,
const std::string & label )
179 YUI_CHECK_NEW( selectionBox );
187 YQWidgetFactory::createTree( YWidget * parent,
const std::string & label,
bool multiselection,
bool recursiveselection )
189 YQTree * tree =
new YQTree( parent, label, multiselection, recursiveselection );
190 YUI_CHECK_NEW( tree );
198 YQWidgetFactory::createTable( YWidget * parent, YTableHeader * header,
bool multiSelection )
201 YUI_CHECK_NEW( table );
209 YQWidgetFactory::createProgressBar( YWidget * parent,
const std::string & label,
int maxValue )
212 YUI_CHECK_NEW( progressBar );
220 YQWidgetFactory::createRichText( YWidget * parent,
const std::string & text,
bool plainTextMode )
223 YUI_CHECK_NEW( richText );
230 YQWidgetFactory::createBusyIndicator( YWidget * parent,
const std::string & label,
int maxValue )
233 YUI_CHECK_NEW( busyIndicator );
235 return busyIndicator;
246 YQWidgetFactory::createIntField( YWidget * parent,
const std::string & label,
int minVal,
int maxVal,
int initialVal )
249 YUI_CHECK_NEW( intField );
257 YQWidgetFactory::createMenuButton( YWidget * parent,
const std::string & label )
260 YUI_CHECK_NEW( menuButton );
268 YQWidgetFactory::createMultiLineEdit( YWidget * parent,
const std::string & label )
271 YUI_CHECK_NEW( multiLineEdit );
273 return multiLineEdit;
279 YQWidgetFactory::createImage( YWidget * parent,
const std::string & imageFileName,
bool animated )
282 YUI_CHECK_NEW( image );
289 YQWidgetFactory::createLogView( YWidget * parent,
const std::string & label,
int visibleLines,
int storedLines )
292 YUI_CHECK_NEW( logView );
300 YQWidgetFactory::createMultiSelectionBox( YWidget * parent,
const std::string & label )
303 YUI_CHECK_NEW( multiSelectionBox );
305 return multiSelectionBox;
309 YQWidgetFactory::createPackageSelector(YWidget* parent,
long modeFlags)
312 YUI_CHECK_PTR( plugin );
316 YUI_CHECK_NEW( pkgSel );
322 YQWidgetFactory::createPkgSpecial( YWidget * ,
const std::string & )
324 YUI_THROW( YUIUnsupportedWidgetException(
"YQPkgSpecial" ) );
334 YQWidgetFactory::createSpacing( YWidget * parent, YUIDimension dim,
bool stretchable, YLayoutSize_t size )
337 YUI_CHECK_NEW( spacing );
344 YQWidgetFactory::createEmpty( YWidget * parent )
347 YUI_CHECK_NEW( empty );
355 YQWidgetFactory::createAlignment( YWidget * parent,
356 YAlignmentType horAlignment,
357 YAlignmentType vertAlignment )
360 YUI_CHECK_NEW( alignment );
367 YQWidgetFactory::createSquash( YWidget * parent,
bool horSquash,
bool vertSquash )
370 YUI_CHECK_NEW( squash );
378 YQWidgetFactory::createFrame( YWidget * parent,
const std::string & label )
381 YUI_CHECK_NEW( frame );
389 YQWidgetFactory::createCheckBoxFrame( YWidget * parent,
const std::string & label,
bool checked )
392 YUI_CHECK_NEW( checkBoxFrame );
394 return checkBoxFrame;
400 YQWidgetFactory::createRadioButtonGroup( YWidget * parent )
403 YUI_CHECK_NEW( radioButtonGroup );
405 return radioButtonGroup;
411 YQWidgetFactory::createReplacePoint( YWidget * parent )
414 YUI_CHECK_NEW( replacePoint );
virtual YPackageSelector * createPackageSelector(YWidget *parent, long modeFlags)
static YQPackageSelectorPluginStub * packageSelectorPlugin()