libyui-qt  2.43.5
 All Classes Functions Variables
YQUI Class Reference
Inheritance diagram for YQUI:

Public Member Functions

 YQUI (bool withThreads)
 
virtual ~YQUI ()
 
void initUI ()
 
void sendEvent (YEvent *event)
 
bool eventPendingFor (YWidget *widget) const
 
YEvent * pendingEvent () const
 
YEvent * consumePendingEvent ()
 
virtual void deleteNotify (YWidget *widget)
 
bool fullscreen () const
 
bool noBorder () const
 
bool fatalError () const
 
void raiseFatalError ()
 
int defaultSize (YUIDimension dim) const
 
void makeScreenShot (std::string filename)
 
virtual YEvent * runPkgSelection (YWidget *packageSelector)
 
void toggleRecordMacro ()
 
void askPlayMacro ()
 
virtual void blockEvents (bool block=true)
 
virtual bool eventsBlocked () const
 
void forceUnblockEvents ()
 
void busyCursor ()
 
void normalCursor ()
 
void timeoutBusyCursor ()
 
void askSaveLogs ()
 
void askConfigureLogging ()
 
QPalette normalPalette () const
 
void toggleVisionImpairedPalette ()
 
bool usingVisionImpairedPalette () const
 
QString applicationTitle ()
 
void setApplicationTitle (const QString &title)
 

Static Public Member Functions

static YQUIui ()
 
static YQApplicationyqApp ()
 
static void setTextdomain (const char *domain)
 
static QPalette visionImpairedPalette ()
 

Protected Member Functions

virtual YWidgetFactory * createWidgetFactory ()
 
virtual YOptionalWidgetFactory * createOptionalWidgetFactory ()
 
virtual YApplication * createApplication ()
 
void processCommandLineArgs (int argc, char **argv)
 
void probeX11Display (const YCommandLine &cmdLine)
 
void calcDefaultSize ()
 
virtual void idleLoop (int fd_ycp)
 
void receivedYCPCommand ()
 
bool close ()
 

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
 
QPalette _normalPalette
 
bool _usingVisionImpairedPalette
 
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 55 of file YQUI.h.

Constructor & Destructor Documentation

YQUI::YQUI ( bool  withThreads)

Constructor.

Definition at line 91 of file YQUI.cc.

YQUI::~YQUI ( )
virtual

Destructor.

Definition at line 339 of file YQUI.cc.

Member Function Documentation

QString YQUI::applicationTitle ( )
inline

Returns the application name for the window title (e.g. "YaST2@hostname")

Definition at line 291 of file YQUI.h.

void YQUI::askConfigureLogging ( )

Open dialog to configure logging. (Shift-F7)

Definition at line 265 of file YQUI_builtins.cc.

void YQUI::askPlayMacro ( )

Open file selection box and ask for a macro file to play (activated by Ctrl-Shift-Alt-P)

Definition at line 335 of file YQUI_builtins.cc.

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.

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 510 of file YQUI.cc.

void YQUI::busyCursor ( )

Show mouse cursor indicating busy state.

Definition at line 558 of file YQUI.cc.

void YQUI::calcDefaultSize ( )
protected

Calculate size of opt(defaultsize) dialogs

Definition at line 388 of file YQUI.cc.

bool YQUI::close ( )
protected

Application shutdown

Definition at line 676 of file YQUI.cc.

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 148 of file YQUI.h.

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 369 of file YQUI.cc.

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 358 of file YQUI.cc.

int YQUI::defaultSize ( YUIDimension  dim) const

Returns size for opt(defaultsize) dialogs (in one dimension).

Definition at line 583 of file YQUI.cc.

void YQUI::deleteNotify ( YWidget *  widget)
virtual

Notification that a widget is being deleted.

Reimplemented from YUI.

Definition at line 616 of file YQUI.cc.

bool YQUI::eventPendingFor ( YWidget *  widget) const
inline

Returns 'true' if there is any event pending for the specified widget.

Definition at line 133 of file YQUI.h.

bool YQUI::eventsBlocked ( ) const
virtual

Returns 'true' if events are currently blocked.

Reimplemented from YUI.

Definition at line 552 of file YQUI.cc.

bool YQUI::fatalError ( ) const
inline

Returns 'true' if the UI had a fatal error that requires the application to abort.

Definition at line 171 of file YQUI.h.

void YQUI::forceUnblockEvents ( )

Force unblocking all events, no matter how many times blockEvents() has This returns 0 if there is no pending eventbeen called before.

Definition at line 544 of file YQUI.cc.

bool YQUI::fullscreen ( ) const
inline

Return 'true' if defaultsize windows should use the full screen.

Definition at line 160 of file YQUI.h.

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 437 of file YQUI.cc.

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 118 of file YQUI.cc.

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.

bool YQUI::noBorder ( ) const
inline

Return 'true' if defaultsize windows should not get window manager borders / frames.

Definition at line 166 of file YQUI.h.

void YQUI::normalCursor ( )

Show normal mouse cursor not indicating busy status.

Definition at line 564 of file YQUI.cc.

QPalette YQUI::normalPalette ( ) const
inline

Returns the normal color palette

Definition at line 275 of file YQUI.h.

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 141 of file YQUI.h.

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 589 of file YQUI.cc.

void YQUI::processCommandLineArgs ( int  argc,
char **  argv 
)
protected

Handle command line args

Definition at line 289 of file YQUI.cc.

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 178 of file YQUI.h.

void YQUI::receivedYCPCommand ( )
protected

Notification that a YCP command has been received on fd_ycp to leave idleLoop()

Definition at line 470 of file YQUI.cc.

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.

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 476 of file YQUI.cc.

void YQUI::setApplicationTitle ( const QString &  title)
inline

Sets the application name for the window title

Definition at line 296 of file YQUI.h.

void YQUI::setTextdomain ( const char *  domain)
static

Initialize and set a textdomain for gettext()

Definition at line 496 of file YQUI.cc.

void YQUI::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).

Definition at line 574 of file YQUI.cc.

void YQUI::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.

Definition at line 293 of file YQUI_builtins.cc.

void YQUI::toggleVisionImpairedPalette ( )

Toggle between the vision impaired and the normal color palette.

Definition at line 622 of file YQUI.cc.

static YQUI* YQUI::ui ( )
inlinestatic

Access the global Qt-UI.

Definition at line 74 of file YQUI.h.

bool YQUI::usingVisionImpairedPalette ( ) const
inline

Returns 'true' if high-contrast colors for vision impaired users is in use. This should be queried at other places before using custom colors.

Definition at line 286 of file YQUI.h.

QPalette YQUI::visionImpairedPalette ( )
static

Returns a high-contrast color palette suitable for vision impaired users.

Definition at line 640 of file YQUI.cc.

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 283 of file YQUI.cc.


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