libyui-mga  1.0.7
YMGAWidgetFactory Class Referenceabstract

Abstract extension widget factory to create widget extensions. More...

#include <YMGAWidgetExtensionFactory.h>

Inheritance diagram for YMGAWidgetFactory:
Collaboration diagram for YMGAWidgetFactory:

Public Member Functions

YMGAAboutDialogcreateAboutDialog (const std::string &appname, const std::string &appversion, const std::string &applicense, const std::string &appauthors, const std::string &appdescription, const std::string &applogo, const std::string &appicon=std::string(), const std::string &appcredits=std::string(), const std::string &appinfo=std::string())
 creates an About Dialog providing the information passed as arguments Remember to remove this instance after. More...
 
virtual YMGA_CBTablecreateCBTable (YWidget *parent, YTableHeader *header_disown, YCBTableMode mode=YCBTableCheckBoxOnFirstColumn)=0
 creates a check boxed table More...
 
YMGAMessageBoxcreateDialogBox (YMGAMessageBox::DLG_BUTTON button_number=YMGAMessageBox::B_ONE, YMGAMessageBox::DLG_MODE dialog_mode=YMGAMessageBox::D_NORMAL)
 creates a dialog box dialog, use the instance to set dialog information and call show() to use it. More...
 
YMGAMessageBoxcreateMessageBox (const std::string &title, const std::string &text, bool useRichText, const std::string &btn_label)
 creates an messagebox dialog, use the instance to set dialog information and call show() to use it. More...
 
YMGAMessageBoxcreateInfoBox (const std::string &title, const std::string &text, bool useRichText, const std::string &btn_label)
 creates an Info messagebox dialog, use the instance to set dialog information and call show() to use it. More...
 
YMGAMessageBoxcreateWarningBox (const std::string &title, const std::string &text, bool useRichText, const std::string &btn_label)
 creates an Warning messagebox dialog, use the instance to set dialog information and call show() to use it. More...
 

Static Public Member Functions

static YMGAWidgetFactorygetYMGAWidgetFactory (YExternalWidgetFactory *instance)
 casts useful for bindings from YExternalWidgetFactory* to YMGAWidgetFactory* More...
 
static YWidgetEvent * getYWidgetEvent (YEvent *event)
 casts useful for bindings from YEvent* to YWidgetEvent* More...
 
static YKeyEvent * getYKeyEvent (YEvent *event)
 casts useful for bindings from YEvent* to YKeyEvent* More...
 
static YMenuEvent * getYMenuEvent (YEvent *event)
 casts useful for bindings from YEvent* to YMenuEvent* More...
 
static YCancelEvent * getYCancelEvent (YEvent *event)
 casts useful for bindings from YEvent* to YCancelEvent* More...
 
static YDebugEvent * getYDebugEvent (YEvent *event)
 casts useful for bindings from YEvent* to YDebugEvent* More...
 
static YTimeoutEvent * getYTimeoutEvent (YEvent *event)
 casts useful for bindings from YEvent* to YTimeoutEvent* More...
 

Protected Member Functions

 YMGAWidgetFactory ()
 Constructor. More...
 
virtual ~YMGAWidgetFactory ()
 Destructor.
 

Friends

class YExternalWidgets
 

Detailed Description

Abstract extension widget factory to create widget extensions.

Refer to the respective widget's documentation (in the header file) for documentation about the function parameters.

Definition at line 52 of file YMGAWidgetExtensionFactory.h.

Constructor & Destructor Documentation

◆ YMGAWidgetFactory()

YMGAWidgetFactory::YMGAWidgetFactory ( )
protected

Constructor.

Use YExternalWidgets::widgetExtensionFactory() to get the singleton for this class.

Definition at line 41 of file YMGAWidgetExtensionFactory.cc.

Member Function Documentation

◆ createAboutDialog()

YMGAAboutDialog * YMGAWidgetFactory::createAboutDialog ( const std::string &  appname,
const std::string &  appversion,
const std::string &  applicense,
const std::string &  appauthors,
const std::string &  appdescription,
const std::string &  applogo,
const std::string &  appicon = std::string(),
const std::string &  appcredits = std::string(),
const std::string &  appinfo = std::string() 
)

creates an About Dialog providing the information passed as arguments Remember to remove this instance after.

Parameters
appnamethe application name
appverthe application version
applicensethe application license, short-length (e.g. GPLv2, GPLv3, LGPL, LGPLv2+, etc)
appauthorsthe application authors
appdescriptiona brief description of the application
applogothe file path to the application logo
appiconthe file path to the application icon
appcreditsoptional, the credits
appinfooptional, other extra information
Returns
YMGAAboutDialog instance

Definition at line 52 of file YMGAWidgetExtensionFactory.cc.

◆ createCBTable()

virtual YMGA_CBTable* YMGAWidgetFactory::createCBTable ( YWidget *  parent,
YTableHeader *  header_disown,
YCBTableMode  mode = YCBTableCheckBoxOnFirstColumn 
)
pure virtual

creates a check boxed table

Parameters
parentparent widget
header_disownYTable header
modecheck box position (YCBTableCheckBoxOnFirstColumn, YCBTableCheckBoxOnLastColumn)
Returns
YMGA_CBTable widget instance

◆ createDialogBox()

YMGAMessageBox * YMGAWidgetFactory::createDialogBox ( YMGAMessageBox::DLG_BUTTON  button_number = YMGAMessageBox::B_ONE,
YMGAMessageBox::DLG_MODE  dialog_mode = YMGAMessageBox::D_NORMAL 
)

creates a dialog box dialog, use the instance to set dialog information and call show() to use it.

Remember to remove this instance after.

Parameters
button_numberone button (such as "ok" for instance) B_ONE or two buttons (such as "ok" and "cancel") B_TWO
dialog_modedialog type (D_NORMAL, D_INFO, D_WARNING)
Returns
YMGAMessageBox dialog instance

Definition at line 68 of file YMGAWidgetExtensionFactory.cc.

◆ createInfoBox()

YMGAMessageBox * YMGAWidgetFactory::createInfoBox ( const std::string &  title,
const std::string &  text,
bool  useRichText,
const std::string &  btn_label 
)

creates an Info messagebox dialog, use the instance to set dialog information and call show() to use it.

Remember to remove this instance after.

Parameters
titledialog title
textdialog content text
useRichTextset text using rich text if true
btn_labelbutton label (such as Ok, for instance)
Returns
YMGAMessageBox dialog instance

Definition at line 84 of file YMGAWidgetExtensionFactory.cc.

Here is the call graph for this function:

◆ createMessageBox()

YMGAMessageBox * YMGAWidgetFactory::createMessageBox ( const std::string &  title,
const std::string &  text,
bool  useRichText,
const std::string &  btn_label 
)

creates an messagebox dialog, use the instance to set dialog information and call show() to use it.

Remember to remove this instance after.

Parameters
titledialog title
textdialog content text
useRichTextset text using rich text if true
btn_labelbutton label (such as Ok, for instance)
Returns
YMGAMessageBox dialog instance

Definition at line 75 of file YMGAWidgetExtensionFactory.cc.

Here is the call graph for this function:

◆ createWarningBox()

YMGAMessageBox * YMGAWidgetFactory::createWarningBox ( const std::string &  title,
const std::string &  text,
bool  useRichText,
const std::string &  btn_label 
)

creates an Warning messagebox dialog, use the instance to set dialog information and call show() to use it.

casts

Remember to remove this instance after.

Parameters
titledialog title
textdialog content text
useRichTextset text using rich text if true
btn_labelbutton label (such as Ok, for instance)
Returns
YMGAMessageBox dialog instance

Definition at line 93 of file YMGAWidgetExtensionFactory.cc.

Here is the call graph for this function:

◆ getYCancelEvent()

YCancelEvent * YMGAWidgetFactory::getYCancelEvent ( YEvent *  event)
static

casts useful for bindings from YEvent* to YCancelEvent*

Definition at line 123 of file YMGAWidgetExtensionFactory.cc.

◆ getYDebugEvent()

YDebugEvent * YMGAWidgetFactory::getYDebugEvent ( YEvent *  event)
static

casts useful for bindings from YEvent* to YDebugEvent*

Definition at line 128 of file YMGAWidgetExtensionFactory.cc.

◆ getYKeyEvent()

YKeyEvent * YMGAWidgetFactory::getYKeyEvent ( YEvent *  event)
static

casts useful for bindings from YEvent* to YKeyEvent*

Definition at line 113 of file YMGAWidgetExtensionFactory.cc.

◆ getYMenuEvent()

YMenuEvent * YMGAWidgetFactory::getYMenuEvent ( YEvent *  event)
static

casts useful for bindings from YEvent* to YMenuEvent*

Definition at line 118 of file YMGAWidgetExtensionFactory.cc.

◆ getYMGAWidgetFactory()

YMGAWidgetFactory * YMGAWidgetFactory::getYMGAWidgetFactory ( YExternalWidgetFactory *  instance)
static

casts useful for bindings from YExternalWidgetFactory* to YMGAWidgetFactory*

Definition at line 103 of file YMGAWidgetExtensionFactory.cc.

◆ getYTimeoutEvent()

YTimeoutEvent * YMGAWidgetFactory::getYTimeoutEvent ( YEvent *  event)
static

casts useful for bindings from YEvent* to YTimeoutEvent*

Definition at line 133 of file YMGAWidgetExtensionFactory.cc.

◆ getYWidgetEvent()

YWidgetEvent * YMGAWidgetFactory::getYWidgetEvent ( YEvent *  event)
static

casts useful for bindings from YEvent* to YWidgetEvent*

Definition at line 108 of file YMGAWidgetExtensionFactory.cc.


The documentation for this class was generated from the following files: