#include <YQUI.h>
Inheritance diagram for YQUI:
Public Slots | |
void | busyCursor () |
void | normalCursor () |
void | askSaveLogs () |
void | askConfigureLogging () |
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 & | boldFont () |
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 () |
QPalette | normalPalette () const |
void | toggleVisionImpairedPalette () |
bool | usingVisionImpairedPalette () const |
virtual long | deviceUnits (YUIDimension dim, float layout_units) |
virtual float | layoutUnits (YUIDimension dim, long device_units) |
Static Public Member Functions | |
static YQUI * | ui () |
static void | setEmbeddingParent (QWidget *p) |
static void | setTextdomain (const char *domain) |
static QPalette | visionImpairedPalette () |
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 | setLangFonts (const YCPString &language) |
QString | fontKey (const QString &lang) |
void | setAllFontsDirty () |
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, 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 | hasDate () |
YWidget * | createDate (YWidget *parent, YWidgetOpt &opt, const YCPString &label, const YCPString &date) |
bool | hasTime () |
YWidget * | createTime (YWidget *parent, YWidgetOpt &opt, const YCPString &label, const YCPString &time) |
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 | hasMultiProgressMeter () |
YWidget * | createMultiProgressMeter (YWidget *parent, YWidgetOpt &opt, bool horizontal, const YCPList &maxValues) |
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 () |
bool | richTextSupportsTable () |
void | processCommandLineArgs (int argc, char **argv) |
void | calcDefaultSize () |
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 |
QString | _font_family |
QY2Settings * | _lang_fonts |
QFont | _current_font |
bool | _loaded_current_font |
QFont | _bold_font |
bool | _loaded_bold_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 |
QPalette | _normalPalette |
bool | _usingVisionImpairedPalette |
Static Protected Attributes | |
static YQUI * | _ui = 0 |
static QWidget * | _embeddingParent = 0 |
|
Constructor. |
|
Destructor. |
|
Open dialog to configure logging. (Shift-F7) |
|
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) |
|
Open file selection box and let the user Save y2logs to that location. (Shift-F8) |
|
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. |
|
Returns the UI's default bold font. |
|
Show hourglass cursor. Reimplemented from YUI. Reimplemented from YUI. |
|
Calculate size of `opt(`defaultsize) dialogs |
|
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. |
|
Reimplemented from 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. |
|
Reimplemented from 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. |
|
Reimplemented from 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). |
|
Convert logical layout spacing units into device dependent units. A default size dialog is assumed to be 80x25 layout spacing units and 640x480 device dependent spacing units. Reimplemented from YUI. Reimplemented from YUI. |
|
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. |
|
Constructs a key for the language specific font file: "font[lang]" for font[de_DE] = "Sans Serif" font[zh] = "ChineseSpecial, something" font[ja_JP] = "JapaneseSpecial, something" font = "Sans Serif" |
|
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. |
|
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. |
|
Convert device dependent units into logical layout spacing units. A default size dialog is assumed to be 80x25 layout spacing units and 640x480 device dependent spacing units. 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 normal color palette |
|
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. |
|
Reimplemented from YUI. |
|
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'. |
|
Invalidate information about cached fonts so they will be reloaded upon their next usage |
|
Set the parent widget for embedding the UI into a KPart or KCMShell. Used by kyast. |
|
Set fonts according to the specified language. This is most important for some Asian languages that have overlaps in the Unicode table, like Japanese vs. Chinese. |
|
Sets the X input method according to the locale. [Reimplemented from YUI] Reimplemented from YUI. |
|
Initialize and set a textdomain for gettext() |
|
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. |
|
Toggle between the vision impaired and the normal color palette. |
|
Access the global Qt-UI. Reimplemented from YUI. |
|
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() |
|
Returns 'true' if high-contrast colors for vision impaired users is in use. This should be queried at other places before using custom colors. |
|
Returns a high-contrast color palette suitable for vision impaired users. |
|
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 |
|
|
|
|
|
Default bold font (cached) |
|
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 |
|
Font family or list of font families to use ("Sans Serif" etc.) |
|
Use the entire available screen |
|
Assume presence of a window manager |
|
Heading font (cached) |
|
Language-specific font settings |
|
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. |
|
Saved normal palette |
|
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(). |
|
Flag: currently using special palette for vision impaired users? |
|
Stack for the Qt widgets inside the main window. |
|
Window manager close events blocked? |
|
|
|
|