#include <YQUI.h>
Inheritance diagram for YQUI:
Public Slots | |
void | busyCursor () |
void | normalCursor () |
void | easterEgg () |
Signals | |
void | wmClose () |
Public Member Functions | |
YQUI (int argc, char **argv, bool with_threads, const char *macro_file) | |
~YQUI () | |
const QFont & | currentFont () |
const QFont & | headingFont () |
void | sendEvent (YEvent *event) |
bool | eventPendingFor (YWidget *widget) const |
YEvent * | pendingEvent () const |
bool | haveWM () const |
bool | fullscreen () const |
bool | decorateToplevelWindow () const |
bool | fatalError () const |
void | raiseFatalError () |
long | defaultSize (YUIDimension dim) const |
void | makeScreenShot (string filename) |
YCPValue | runPkgSelection (YWidget *packageSelector) |
void | toggleRecordMacro () |
void | askPlayMacro () |
void | internalError (const char *msg) |
void | blockWmClose () |
void | unblockWmClose () |
bool | autoActivateDialogs () const |
bool | runningEmbedded () const |
bool | debugEmbedding () const |
virtual void | blockEvents (bool block=true) |
virtual bool | eventsBlocked () const |
QString | productName () const |
YCPValue | askForExistingDirectory (const YCPString &startDir, const YCPString &headline) |
YCPValue | askForExistingFile (const YCPString &startWith, const YCPString &filter, const YCPString &headline) |
YCPValue | askForSaveFileName (const YCPString &startWith, const YCPString &filter, const YCPString &headline) |
QString | askForSaveFileName (const QString &startWith, const QString &filter, const QString &headline) |
QWidget * | mainWidget () |
Static Public Member Functions | |
YQUI * | ui () |
void | setEmbeddingParent (QWidget *p) |
Protected Slots | |
bool | close () |
void | userInputTimeout () |
void | leaveIdleLoop (int) |
Protected Member Functions | |
void | idleLoop (int fd_ycp) |
YCPString | glyph (const YCPSymbol &glyphSymbol) |
YEvent * | userInput (unsigned long timeout_millisec=0) |
YEvent * | pollInput () |
YDialog * | createDialog (YWidgetOpt &opt) |
void | showDialog (YDialog *dialog) |
void | closeDialog (YDialog *dialog) |
bool | eventFilter (QObject *obj, QEvent *ev) |
bool | showEventFilter (QObject *obj, QEvent *ev) |
void | loadPredefinedQtTranslations () |
void | pickAutoFonts () |
bool | autoFonts () const |
YContainerWidget * | createAlignment (YWidget *parent, YWidgetOpt &opt, YAlignmentType horAlign, YAlignmentType vertAlign) |
YContainerWidget * | createFrame (YWidget *parent, YWidgetOpt &opt, const YCPString &label) |
YContainerWidget * | createRadioButtonGroup (YWidget *parent, YWidgetOpt &opt) |
YContainerWidget * | createReplacePoint (YWidget *parent, YWidgetOpt &opt) |
YContainerWidget * | createSplit (YWidget *parent, YWidgetOpt &opt, YUIDimension dimension) |
YContainerWidget * | createSquash (YWidget *parent, YWidgetOpt &opt, bool horSquash, bool vertSquash) |
YContainerWidget * | createWeight (YWidget *parent, YWidgetOpt &opt, YUIDimension dim, long weight) |
YWidget * | createCheckBox (YWidget *parent, YWidgetOpt &opt, const YCPString &label, bool checked) |
YWidget * | createComboBox (YWidget *parent, YWidgetOpt &opt, const YCPString &label) |
YWidget * | createEmpty (YWidget *parent, YWidgetOpt &opt) |
YWidget * | createImage (YWidget *parent, YWidgetOpt &opt, ImageType img, YCPString fallbackText) |
YWidget * | createImage (YWidget *parent, YWidgetOpt &opt, YCPByteblock imageData, YCPString fallbackText) |
YWidget * | createImage (YWidget *parent, YWidgetOpt &opt, YCPString fileName, YCPString fallbackText) |
YWidget * | createIntField (YWidget *parent, YWidgetOpt &opt, const YCPString &label, int minValue, int maxValue, int initialValue) |
YWidget * | createLabel (YWidget *parent, YWidgetOpt &opt, const YCPString &text) |
YWidget * | createLogView (YWidget *parent, YWidgetOpt &opt, const YCPString &label, int visibleLines, int maxLines) |
YWidget * | createMultiLineEdit (YWidget *parent, YWidgetOpt &opt, const YCPString &label, const YCPString &text) |
YWidget * | createProgressBar (YWidget *parent, YWidgetOpt &opt, const YCPString &label, const YCPInteger &maxProgress, const YCPInteger ¤tProgress) |
YWidget * | createPackageSelector (YWidget *parent, YWidgetOpt &opt, const YCPString &floppyDevice) |
YWidget * | createPushButton (YWidget *parent, YWidgetOpt &opt, const YCPString &label) |
YWidget * | createMenuButton (YWidget *parent, YWidgetOpt &opt, const YCPString &label) |
YWidget * | createRadioButton (YWidget *parent, YWidgetOpt &opt, YRadioButtonGroup *rbg, const YCPString &label, bool checked) |
YWidget * | createRichText (YWidget *parent, YWidgetOpt &opt, const YCPString &text) |
YWidget * | createSelectionBox (YWidget *parent, YWidgetOpt &opt, const YCPString &label) |
YWidget * | createMultiSelectionBox (YWidget *parent, YWidgetOpt &opt, const YCPString &label) |
YWidget * | createSpacing (YWidget *parent, YWidgetOpt &opt, float size, bool horizontal, bool vertical) |
YWidget * | createTable (YWidget *parent, YWidgetOpt &opt, vector< string > header) |
YWidget * | createTextEntry (YWidget *parent, YWidgetOpt &opt, const YCPString &label, const YCPString &text) |
YWidget * | createTree (YWidget *parent, YWidgetOpt &opt, const YCPString &label) |
YWidget * | createPkgSpecial (YWidget *parent, YWidgetOpt &opt, const YCPString &subwidget) |
bool | hasBarGraph () |
YWidget * | createBarGraph (YWidget *parent, YWidgetOpt &opt) |
bool | hasColoredLabel () |
YWidget * | createColoredLabel (YWidget *parent, YWidgetOpt &opt, YCPString label, YColor foreground, YColor background, int margin) |
bool | hasDownloadProgress () |
YWidget * | createDownloadProgress (YWidget *parent, YWidgetOpt &opt, const YCPString &label, const YCPString &filename, int expectedSize) |
bool | hasDumbTab () |
YWidget * | createDumbTab (YWidget *parent, YWidgetOpt &opt) |
bool | hasSlider () |
YWidget * | createSlider (YWidget *parent, YWidgetOpt &opt, const YCPString &label, int minValue, int maxValue, int initialValue) |
bool | hasPartitionSplitter () |
YWidget * | createPartitionSplitter (YWidget *parent, YWidgetOpt &opt, int usedSize, int totalFreeSize, int newPartSize, int minNewPartSize, int minFreeSize, const YCPString &usedLabel, const YCPString &freeLabel, const YCPString &newPartLabel, const YCPString &freeFieldLabel, const YCPString &newPartFieldLabel) |
bool | hasWizard () |
YWidget * | createWizard (YWidget *parent, YWidgetOpt &opt, const YCPValue &backButtonId, const YCPString &backButtonLabel, const YCPValue &abortButtonId, const YCPString &abortButtonLabel, const YCPValue &nextButtonId, const YCPString &nextButtonLabel) |
YCPValue | setLanguage (const YCPTerm &term) |
int | getDisplayWidth () |
int | getDisplayHeight () |
int | getDisplayDepth () |
long | getDisplayColors () |
int | getDefaultWidth () |
int | getDefaultHeight () |
bool | textMode () |
bool | hasImageSupport () |
bool | hasLocalImageSupport () |
bool | hasAnimationSupport () |
bool | hasIconSupport () |
bool | hasFullUtf8Support () |
void | processCommandLineArgs (int argc, char **argv) |
Protected Attributes | |
QMap< QString, int > | screenShotNo |
QString | screenShotNameTemplate |
bool | _have_wm |
bool | _fullscreen |
bool | _decorate_toplevel_window |
bool | _debug_embedding |
QVBox * | _main_win |
QWidgetStack * | _widget_stack |
vector< QWidget * > | _popup_stack |
int | _main_dialog_id |
QSize | _default_size |
bool | _leave_idle_loop |
bool | _do_exit_loop |
QCursor * | _busy_cursor |
QFont | _current_font |
bool | _loaded_current_font |
QFont | _heading_font |
bool | _loaded_heading_font |
bool | _auto_fonts |
int | _auto_normal_font_size |
int | _auto_heading_font_size |
bool | _wm_close_blocked |
bool | _auto_activate_dialogs |
bool | _fatal_error |
QTimer | _user_input_timer |
QTimer | _busy_cursor_timer |
YSimpleEventHandler | _event_handler |
QTranslator | _qtTranslations |
bool | _running_embedded |
Static Protected Attributes | |
YQUI * | _ui = 0 |
QWidget * | _embeddingParent = 0 |
|
Constructor. |
|
Destructor. |
|
Open a directory selection box and prompt the user for an existing directory. [Reimplemented from YUI] 'startDir' is the initial directory that is displayed. 'headline' is an explanatory text for the directory selection box. Graphical UIs may omit that if no window manager is running. Returns the selected directory name or 'nil' (YCPVoid() ) if the user canceled the operation. Implements YUI. |
|
Open a file selection box and prompt the user for an existing file. [Reimplemented from YUI] 'startWith' is the initial directory or file. 'filter' is one or more blank-separated file patterns, e.g. "*.png *.jpg" 'headline' is an explanatory text for the file selection box. Graphical UIs may omit that if no window manager is running. Returns the selected file name or 'nil' (YCPVoid() ) if the user canceled the operation. Implements YUI. |
|
Lower-level version that works with QStrings and does not change the mouse cursor. |
|
Open a file selection box and prompt the user for a file to save data to. Automatically asks for confirmation if the user selects an existing file. [Reimplemented from YUI] 'startWith' is the initial directory or file. 'filter' is one or more blank-separated file patterns, e.g. "*.png *.jpg" 'headline' is an explanatory text for the file selection box. Graphical UIs may omit that if no window manager is running. Returns the selected file name or 'nil' (YCPVoid() ) if the user canceled the operation. Implements YUI. |
|
Open file selection box and ask for a macro file to play (activated by Ctrl-Shift-Alt-P) |
|
Check if dialogs are to be activated automatically |
|
Returns 'true' if the UI automatically picks fonts, disregarding Qt standard settings. This makes sense in the installation system where the display DPI cannot reliably be retrieved and thus Qt uses random font sizes based on that random DPI. |
|
Block (or unblock) events. If events are blocked, any event sent should be ignored until events are unblocked again. Reimplemented from YUI. Reimplemented from YUI. |
|
Block WM_CLOSE events for the main window. |
|
Show hourglass cursor. Reimplemented from YUI. Reimplemented from YUI. |
|
Application shutdown |
|
Decativate and close a dialog. This does not delete the dialog yet. Reimplemented from YUI. Reimplemented from YUI. |
|
Implements YUI. |
|
Reimplemented from YUI. |
|
Implements YUI. |
|
Reimplemented from YUI. |
|
Implements YUI. |
|
Create a dialog. Reimplemented from YUI. Implements YUI. |
|
Reimplemented from YUI. |
|
Reimplemented from YUI. |
|
Implements YUI. |
|
Implements YUI. |
|
Implements YUI. |
|
Implements YUI. |
|
Implements YUI. |
|
Implements YUI. |
|
Implements YUI. |
|
Implements YUI. |
|
Implements YUI. |
|
Implements YUI. |
|
Implements YUI. |
|
Implements YUI. |
|
Reimplemented from YUI. |
|
Implements YUI. |
|
Implements YUI. |
|
Implements YUI. |
|
Implements YUI. |
|
Implements YUI. |
|
Implements YUI. |
|
Implements YUI. |
|
Implements YUI. |
|
Reimplemented from YUI. |
|
Implements YUI. |
|
Implements YUI. |
|
Implements YUI. |
|
Implements YUI. |
|
Implements YUI. |
|
Implements YUI. |
|
|
|
Reimplemented from YUI. |
|
Returns the UI's default font. |
|
Returns true if debugging embedding mode is on, i.e., when cmd line arg --debug-embedding was given. |
|
Returns 'false' if toplevel (defaultsize) windows should not get window manager decorations, i.e. "--noborder" was specified on the command line. |
|
Returns size for `opt(`defaultsize) dialogs (in one dimension). |
|
Fun stuff (release dependent) |
|
Grab show events and work around QWidgetStack bug. Reimplemented from QObject. |
|
Returns 'true' if there is any event pending for the specified widget. |
|
Returns 'true' if events are currently blocked. Reimplemented from YUI. Reimplemented from YUI. |
|
Returns 'true' if the UI had a fatal error that requires the application to abort. |
|
Returns 'true' if defaultsize windows should use the full screen. |
|
Reimplemented from YUI. |
|
Reimplemented from YUI. |
|
Reimplemented from YUI. |
|
Reimplemented from YUI. |
|
Reimplemented from YUI. |
|
Display capabilities. [Reimplemented from YUI] See UI builtin GetDisplayInfo() doc for details. Reimplemented from YUI. |
|
Return a representation for the glyph symbol specified in UTF-8 encoding or an empty string to get a default textual representation. Reimplemented from YUI. Reimplemented from YUI. |
|
Reimplemented from YUI. |
|
Reimplemented from YUI. |
|
Reimplemented from YUI. |
|
Reimplemented from YUI. |
|
Reimplemented from YUI. |
|
Reimplemented from YUI. |
|
Reimplemented from YUI. |
|
Reimplemented from YUI. |
|
Reimplemented from YUI. |
|
Reimplemented from YUI. |
|
Reimplemented from YUI. |
|
Reimplemented from YUI. |
|
Returns 'false" if the "--no-wm" was specified on the command line, i.e. we should assume no window manager is running. |
|
Returns the UI's heading font. |
|
Idle around until fd_ycp is readable and handle repaints. This is only used when a separate ui thread is running. Reimplemented from YUI. Reimplemented from YUI. |
|
Issue an internal error: Open popup with that message and wait. Reimplemented from YUI. Reimplemented from YUI. |
|
Sets leave_idle_loop to true. |
|
Load translations for Qt's predefined dialogs like file selection box etc. |
|
main widget |
|
Make a screen shot in .png format and save it to 'filename'. Opens a file selection box if 'filename' is empty. Reimplemented from YUI. |
|
Show pointer cursor. Reimplemented from YUI. Reimplemented from YUI. |
|
Returns the last event that isn't processed yet or 0 if there is none. The Qt UI keeps track of only one single (the last one) event. |
|
Determine good fonts based on defaultsize geometry and set _auto_normal_font_size and _auto_heading_font_size accordingly. Caches the values, so it's safe to call this repeatedly. |
|
Check the event queue for user input. Don't wait. Reimplemented from YUI. Implements YUI. |
|
Handle command line args |
|
Returns the current product name ("SuSE Linux", "SuSE Linux Enterprise Server", "United Linux", etc.) as QString. Reimplemented from YUI. |
|
Raise a fatal UI error. It will be delivered when it is safe to do so. The caller should make sure it can continue for some time until the error is delivered. |
|
Are we running embedded into another application, e.g., inside the KDE control center? |
|
UI-specific runPkgSeleciton method: Start the package selection. This implementation does the same as UserInput(). Reimplemented from YUI. Reimplemented from YUI. |
|
Widget event handlers (slots) call this when an event occured that should be the answer to a UserInput() / PollInput() (etc.) call. The UI assumes ownership of the event object that 'event' points to. In particular, it takes care to delete that object. It is an error to pass 0 for 'event'. |
|
Set the parent widget for embedding the UI into a KPart or KCMShell. Used by kyast. |
|
Sets the X input method according to the locale. [Reimplemented from YUI] Reimplemented from YUI. |
|
Show and activate a dialog. Reimplemented from YUI. Reimplemented from YUI. |
|
Make all UI windows usable without a mouse - even predefined Qt dialogs that don't know the UI's dialogs' activate() magic. Reimplemented from QObject. |
|
Reimplemented from YUI. |
|
Toggle macro recording (activated by Ctrl-Shift-Alt-M): Stop macro recording if it is in progress, open a file selection box and ask for a macro file name to save to and start recording if no recording has been in progress. |
|
Access the global Qt-UI. |
|
Unblock WM_CLOSE events for the main window. |
|
Go into event loop until next user input is available. Reimplemented from YUI. Implements YUI. |
|
Timeout during TimeoutUserInput() / WaitForEvent() |
|
Emitted upon WM_CLOSE |
|
Force new dialogs to the foreground and grab the keyboard focus? (Only if running without a window manager) |
|
For auto fonts |
|
|
|
|
|
Cursor to use when no input is accepted (i.e. outside UserInput() ) |
|
Timer for delayed busy cursor |
|
Default font (cached) |
|
Fake embedding mode (for layout debugging in embedding mode) |
|
Decorate the toplevel window |
|
Size for `opt(`defaultsize) dialogs. |
|
This flag is set during userInput in order to tell returnNow to call exit_loop, which only may be called after enter_loop. |
|
Parent widget for embedding in a KPart or KCMShell |
|
The handler for the single pending event this UI keeps track of |
|
Indicate a fatal error that requires the UI to terminate |
|
Use the entire available screen |
|
Assume presence of a window manager |
|
Heading font (cached) |
|
A flag used during the idle loop. If it is set to true, the idle loop is left. This happens, if the ycp-ui-communication pipe to the ui gets readable. |
|
|
|
|
|
Numeric ID for defaultsize dialogs for the widget stack |
|
Container for the widget stack. QWidgetStack cannot handle a WFlags argument, so this needs to be embedded into something else - and a QVBox at least handles all the sizeHint and resize stuff. |
|
Stack to keep track of the stacking order of popup dialogs. |
|
Translator for the predefined Qt dialogs |
|
Flag that indicates if we are running embedded |
|
Global reference to the UI |
|
Timer for TimeoutUserInput() / WaitForEvent(). |
|
Stack for the Qt widgets inside the main window. |
|
Window manager close events blocked? |
|
|
|
|