libyui-qt  2.49.2
YQUI Class Reference
Inheritance diagram for YQUI:
Collaboration diagram for YQUI:

Public Member Functions

 YQUI (bool withThreads)
 Constructor.
 
virtual ~YQUI ()
 Destructor.
 
void initUI ()
 Post-constructor initialization. More...
 
void sendEvent (YEvent *event)
 Widget event handlers (slots) call this when an event occured that should be the answer to a UserInput() / PollInput() (etc.) call. More...
 
bool eventPendingFor (YWidget *widget) const
 Returns 'true' if there is any event pending for the specified widget.
 
YEvent * pendingEvent () const
 Returns the last event that isn't processed yet or 0 if there is none. More...
 
YEvent * consumePendingEvent ()
 Return the pending event, if there is one, and mark it as "consumed". More...
 
virtual void deleteNotify (YWidget *widget)
 Notification that a widget is being deleted. More...
 
bool fullscreen () const
 Return 'true' if defaultsize windows should use the full screen.
 
bool noBorder () const
 Return 'true' if defaultsize windows should not get window manager borders / frames.
 
bool fatalError () const
 Returns 'true' if the UI had a fatal error that requires the application to abort.
 
void raiseFatalError ()
 Raise a fatal UI error. More...
 
int defaultSize (YUIDimension dim) const
 Returns size for opt(defaultsize) dialogs (in one dimension).
 
void makeScreenShot (std::string filename)
 Make a screen shot in .png format and save it to 'filename'. More...
 
virtual YEvent * runPkgSelection (YWidget *packageSelector)
 UI-specific runPkgSeleciton method: Start the package selection. More...
 
void toggleRecordMacro ()
 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.
 
void askPlayMacro ()
 Open file selection box and ask for a macro file to play (activated by Ctrl-Shift-Alt-P)
 
void askSendWidgetID ()
 Open a pop-up dialog to ask the user for a widget ID and then send it with sendWidgetID().
 
virtual void blockEvents (bool block=true)
 Block (or unblock) events. More...
 
virtual bool eventsBlocked () const
 Returns 'true' if events are currently blocked. More...
 
void forceUnblockEvents ()
 Force unblocking all events, no matter how many times blockEvents() has This returns 0 if there is no pending eventbeen called before.
 
void busyCursor ()
 Show mouse cursor indicating busy state.
 
void normalCursor ()
 Show normal mouse cursor not indicating busy status.
 
void timeoutBusyCursor ()
 Show mouse cursor indicating busy state if the UI is unable to respond to user input for more than a predefined timeout (200 millisec).
 
void askSaveLogs ()
 Open file selection box and let the user save y2logs to that location. More...
 
void askConfigureLogging ()
 Open dialog to configure logging. More...
 
QString applicationTitle ()
 Returns the application name for the window title (e.g. More...
 
void setApplicationTitle (const QString &title)
 Sets the application name for the window title.
 

Static Public Member Functions

static YQUIui ()
 Access the global Qt-UI.
 
static YQApplicationyqApp ()
 Return the global YApplication object as YQApplication. More...
 
static void setTextdomain (const char *domain)
 Initialize and set a textdomain for gettext()
 

Protected Member Functions

virtual YWidgetFactory * createWidgetFactory ()
 Create the widget factory that provides all the createXY() methods for standard (mandatory, i.e. More...
 
virtual YOptionalWidgetFactory * createOptionalWidgetFactory ()
 Create the widget factory that provides all the createXY() methods for optional ("special") widgets and the corresponding hasXYWidget() methods. More...
 
virtual YApplication * createApplication ()
 
void processCommandLineArgs (int argc, char **argv)
 Handle command line args.
 
void probeX11Display (const YCommandLine &cmdLine)
 Probe the X11 display. More...
 
void calcDefaultSize ()
 Calculate size of opt(defaultsize) dialogs.
 
virtual void idleLoop (int fd_ycp)
 Idle around until fd_ycp is readable and handle repaints. More...
 
virtual void uiThreadDestructor ()
 Destroy whatever needs to be destroyed within the UI thread. More...
 
void receivedYCPCommand ()
 Notification that a YCP command has been received on fd_ycp to leave idleLoop()
 
bool close ()
 Application shutdown.
 

Protected Attributes

QMap< QString, int > screenShotNo
 
QString screenShotNameTemplate
 
bool _fullscreen
 
bool _noborder
 
QSize _defaultSize
 
bool _do_exit_loop
 
bool _received_ycp_command
 
bool _fatalError
 
QTimer * _busyCursorTimer
 
YSimpleEventHandler _eventHandler
 
int _blockedLevel
 
bool _leftHandedMouse
 
bool _askedForLeftHandedMouse
 
bool _uiInitialized
 
YQUISignalReceiver_signalReceiver
 
QString _applicationTitle
 
int _ui_argc
 

Static Protected Attributes

static YQUI_ui = 0
 

Friends

class YQUISignalReceiver
 

Detailed Description

Definition at line 61 of file YQUI.h.

Member Function Documentation

◆ applicationTitle()

QString YQUI::applicationTitle ( )
inline

Returns the application name for the window title (e.g.

"YaST2@hostname")

Definition at line 282 of file YQUI.h.

◆ askConfigureLogging()

void YQUI::askConfigureLogging ( )

Open dialog to configure logging.

(Shift-F7)

Definition at line 265 of file YQUI_builtins.cc.

◆ askSaveLogs()

void YQUI::askSaveLogs ( )

Open file selection box and let the user save y2logs to that location.

(Shift-F8)

Definition at line 206 of file YQUI_builtins.cc.

Here is the call graph for this function:

◆ blockEvents()

void YQUI::blockEvents ( bool  block = true)
virtual

Block (or unblock) events.

If events are blocked, any event sent should be ignored until events are unblocked again.

Reimplemented from YUI.

Definition at line 502 of file YQUI.cc.

Here is the call graph for this function:

◆ consumePendingEvent()

YEvent* YQUI::consumePendingEvent ( )
inline

Return the pending event, if there is one, and mark it as "consumed".

This returns 0 if there is no pending event.

Definition at line 154 of file YQUI.h.

◆ createOptionalWidgetFactory()

YOptionalWidgetFactory * YQUI::createOptionalWidgetFactory ( )
protectedvirtual

Create the widget factory that provides all the createXY() methods for optional ("special") widgets and the corresponding hasXYWidget() methods.

Reimplemented from YUI.

Definition at line 361 of file YQUI.cc.

◆ createWidgetFactory()

YWidgetFactory * YQUI::createWidgetFactory ( )
protectedvirtual

Create the widget factory that provides all the createXY() methods for standard (mandatory, i.e.

non-optional) widgets.

Reimplemented from YUI.

Definition at line 350 of file YQUI.cc.

◆ deleteNotify()

void YQUI::deleteNotify ( YWidget *  widget)
virtual

Notification that a widget is being deleted.

Reimplemented from YUI.

Definition at line 587 of file YQUI.cc.

◆ eventsBlocked()

bool YQUI::eventsBlocked ( ) const
virtual

Returns 'true' if events are currently blocked.

Reimplemented from YUI.

Definition at line 544 of file YQUI.cc.

◆ idleLoop()

void YQUI::idleLoop ( int  fd_ycp)
protectedvirtual

Idle around until fd_ycp is readable and handle repaints.

This is only used when a separate ui thread is running.

Reimplemented from YUI.

Definition at line 429 of file YQUI.cc.

Here is the call graph for this function:

◆ initUI()

void YQUI::initUI ( )

Post-constructor initialization.

If running with threads, this has to be called in the UI thread. Any subsequent calls will do nothing.

Definition at line 122 of file YQUI.cc.

Here is the call graph for this function:

◆ makeScreenShot()

void YQUI::makeScreenShot ( std::string  filename)

Make a screen shot in .png format and save it to 'filename'.

Opens a file selection box if 'filename' is empty.

Definition at line 92 of file YQUI_builtins.cc.

Here is the call graph for this function:

◆ pendingEvent()

YEvent* YQUI::pendingEvent ( ) const
inline

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.

Definition at line 147 of file YQUI.h.

◆ probeX11Display()

void YQUI::probeX11Display ( const YCommandLine &  cmdLine)
protected

Probe the X11 display.

Throw exception upon failure. A "-display" command line argument is taken into account.

Definition at line 581 of file YQUI.cc.

◆ raiseFatalError()

void YQUI::raiseFatalError ( )
inline

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.

Definition at line 184 of file YQUI.h.

◆ runPkgSelection()

YEvent * YQUI::runPkgSelection ( YWidget *  packageSelector)
virtual

UI-specific runPkgSeleciton method: Start the package selection.

This implementation does the same as UserInput().

Reimplemented from YUI.

Definition at line 62 of file YQUI_builtins.cc.

◆ sendEvent()

void YQUI::sendEvent ( YEvent *  event)

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'.

Definition at line 468 of file YQUI.cc.

Here is the call graph for this function:

◆ uiThreadDestructor()

void YQUI::uiThreadDestructor ( )
protectedvirtual

Destroy whatever needs to be destroyed within the UI thread.

Reimplemented from YUI.

Definition at line 329 of file YQUI.cc.

◆ yqApp()

YQApplication * YQUI::yqApp ( )
static

Return the global YApplication object as YQApplication.

This will create the Y(Q)Application upon the first call and return a pointer to the one and only (singleton) Y(Q)Application upon each subsequent call. This may throw exceptions if the Y(Q)Application cannot be created.

Definition at line 256 of file YQUI.cc.


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