libyui-qt  2.50.2
YQUI.cc
1 /*
2  Copyright (C) 2000-2012 Novell, Inc
3  This library is free software; you can redistribute it and/or modify
4  it under the terms of the GNU Lesser General Public License as
5  published by the Free Software Foundation; either version 2.1 of the
6  License, or (at your option) version 3.0 of the License. This library
7  is distributed in the hope that it will be useful, but WITHOUT ANY
8  WARRANTY; without even the implied warranty of MERCHANTABILITY or
9  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10  License for more details. You should have received a copy of the GNU
11  Lesser General Public License along with this library; if not, write
12  to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13  Floor, Boston, MA 02110-1301 USA
14 */
15 
16 
17 /*-/
18 
19  File: YQUI.cc
20 
21  Author: Stefan Hundhammer <sh@suse.de>
22 
23 /-*/
24 
25 #include <sys/param.h> // MAXHOSTNAMELEN
26 #include <dlfcn.h>
27 #include <libintl.h>
28 #include <algorithm>
29 #include <stdio.h>
30 
31 #include <QWidget>
32 #include <QThread>
33 #include <QSocketNotifier>
34 #include <QDesktopWidget>
35 #include <QEvent>
36 #include <QCursor>
37 #include <QLocale>
38 #include <QMessageLogContext>
39 #include <QMessageBox>
40 #include <QScreen>
41 #include <QInputDialog>
42 
43 
44 #define YUILogComponent "qt-ui"
45 #include <yui/YUILog.h>
46 #include <yui/Libyui_config.h>
47 
48 #include "YQUI.h"
49 
50 #include <yui/YEvent.h>
51 #include <yui/YCommandLine.h>
52 #include <yui/YButtonBox.h>
53 #include <yui/YUISymbols.h>
54 
55 #include "QY2Styler.h"
56 #include "YQApplication.h"
57 #include "YQDialog.h"
58 #include "YQWidgetFactory.h"
59 #include "YQOptionalWidgetFactory.h"
60 
61 #include "YQWizardButton.h"
62 
63 #include "YQi18n.h"
64 #include "utf8.h"
65 
66 // Include low-level X headers AFTER Qt headers:
67 // X.h pollutes the global namespace (!!!) with pretty useless #defines
68 // like "Above", "Below" etc. that clash with some Qt headers.
69 #include <X11/Xlib.h>
70 
71 
72 using std::max;
73 
74 #define BUSY_CURSOR_TIMEOUT 200 // milliseconds
75 #define VERBOSE_EVENT_LOOP 0
76 
77 
78 
79 static void qMessageHandler( QtMsgType type, const QMessageLogContext &, const QString & msg );
80 YQUI * YQUI::_ui = 0;
81 
82 
83 YUI * createUI( bool withThreads )
84 {
85  if ( ! YQUI::ui() )
86  {
87  YQUI * ui = new YQUI( withThreads );
88 
89  if ( ui && ! withThreads )
90  ui->initUI();
91  }
92 
93  return YQUI::ui();
94 }
95 
96 
97 YQUI::YQUI( bool withThreads, bool topmostConstructor )
98  : YUI( withThreads )
99 #if 0
100  , _main_win( NULL )
101 #endif
102  , _do_exit_loop( false )
103 {
104  yuiDebug() << "YQUI constructor start" << std::endl;
105  yuiMilestone() << "This is libyui-qt " << VERSION << std::endl;
106 
107  _ui = this;
108  _uiInitialized = false;
109  _fatalError = false;
110  _fullscreen = false;
111  _noborder = false;
112  screenShotNameTemplate = "";
113  _blockedLevel = 0;
114 
115  qInstallMessageHandler( qMessageHandler );
116 
117  yuiDebug() << "YQUI constructor finished" << std::endl;
118  if ( topmostConstructor ) {
119  yuiDebug() << "YQUI is the top most constructor" << std::endl;
120  topmostConstructorHasFinished();
121  }
122 }
123 
124 
126 {
127  if ( _uiInitialized )
128  return;
129 
130  _uiInitialized = true;
131  yuiDebug() << "Initializing Qt part" << std::endl;
132 
133  YCommandLine cmdLine; // Retrieve command line args from /proc/<pid>/cmdline
134  std::string progName;
135 
136  if ( cmdLine.argc() > 0 )
137  {
138  progName = cmdLine[0];
139  std::size_t lastSlashPos = progName.find_last_of( '/' );
140 
141  if ( lastSlashPos != std::string::npos )
142  progName = progName.substr( lastSlashPos+1 );
143 
144  // Qt will display argv[0] as the window manager title.
145  // For YaST2, display "YaST2" instead of "y2base".
146  // For other applications, leave argv[0] alone.
147 
148  if ( progName == "y2base" )
149  cmdLine.replace( 0, "YaST2" );
150  }
151 
152  _ui_argc = cmdLine.argc();
153  char ** argv = cmdLine.argv();
154 
155  yuiDebug() << "Creating QApplication" << std::endl;
156  QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
157  new QApplication( _ui_argc, argv );
158  Q_CHECK_PTR( qApp );
159  // Qt keeps track to a global QApplication in qApp.
160 
161  _signalReceiver = new YQUISignalReceiver();
162  _busyCursorTimer = new QTimer( _signalReceiver );
163  _busyCursorTimer->setSingleShot( true );
164 
165  (void) QY2Styler::styler(); // Make sure QY2Styler singleton is created
166 
167  setButtonOrderFromEnvironment();
168  processCommandLineArgs( _ui_argc, argv );
169  calcDefaultSize();
170 
171  _do_exit_loop = false;
172 
173 #if 0
174  // Create main window for `opt(`defaultsize) dialogs.
175  //
176  // We have to use something else than QWidgetStack since QWidgetStack
177  // doesn't accept a WFlags arg which we badly need here.
178 
179  _main_win = new QWidget( 0, Qt::Window ); // parent, wflags
180  _main_win->setFocusPolicy( Qt::StrongFocus );
181  _main_win->setObjectName( "main_window" );
182 
183  _main_win->resize( _defaultSize );
184 
185  if ( _fullscreen )
186  _main_win->move( 0, 0 );
187 #endif
188 
189 
190  //
191  // Set application title (used by YQDialog and YQWizard)
192  //
193 
194  // for YaST2, display "YaST2" instead of "y2base"
195  if ( progName == "y2base" )
196  _applicationTitle = QString( "YaST2" );
197  else
198  _applicationTitle = fromUTF8( progName );
199 
200  // read x11 display from commandline or environment variable
201  int displayArgPos = cmdLine.find( "-display" );
202  QString displayName;
203 
204  if ( displayArgPos > 0 && displayArgPos+1 < cmdLine.argc() )
205  displayName = cmdLine[ displayArgPos+1 ].c_str();
206  else
207  displayName = getenv( "DISPLAY" );
208 
209  // identify hostname
210  char hostname[ MAXHOSTNAMELEN+1 ];
211  if ( gethostname( hostname, sizeof( hostname )-1 ) == 0 )
212  hostname[ sizeof( hostname ) -1 ] = '\0'; // make sure it's terminated
213  else
214  hostname[0] = '\0';
215 
216  // add hostname to the window title if it's not a local display
217  if ( !displayName.startsWith( ":" ) && strlen( hostname ) > 0 )
218  {
219  _applicationTitle += QString( "@" );
220  _applicationTitle += fromUTF8( hostname );
221  }
222 
223 
224 #if 0
225  // Hide the main window for now. The first call to UI::OpenDialog() on an
226  // `opt(`defaultSize) dialog will trigger a dialog->open() call that shows
227  // the main window - there is nothing to display yet.
228 
229  _main_win->hide();
230 #endif
231 
232  YButtonBoxMargins buttonBoxMargins;
233  buttonBoxMargins.left = 8;
234  buttonBoxMargins.right = 8;
235  buttonBoxMargins.top = 6;
236  buttonBoxMargins.bottom = 6;
237 
238  buttonBoxMargins.spacing = 4;
239  buttonBoxMargins.helpButtonExtraSpacing = 16;
240  YButtonBox::setDefaultMargins( buttonBoxMargins );
241 
242  // Init other stuff
243 
244  qApp->setFont( yqApp()->currentFont() );
245  busyCursor();
246 
247 
248  QObject::connect( _busyCursorTimer, &pclass(_busyCursorTimer)::timeout,
249  _signalReceiver, &pclass(_signalReceiver)::slotBusyCursor );
250 
251  yuiMilestone() << "YQUI initialized. Thread ID: 0x"
252  << hex << QThread::currentThreadId () << dec
253  << std::endl;
254 
255  qApp->processEvents();
256 }
257 
258 
261 {
262  return static_cast<YQApplication *>( app() );
263 }
264 
265 
266 void YQUI::processCommandLineArgs( int argc, char **argv )
267 {
268  if ( argv )
269  {
270  for( int i=0; i < argc; i++ )
271  {
272  QString opt = argv[i];
273 
274  yuiMilestone() << "Qt argument: " << argv[i] << std::endl;
275 
276  // Normalize command line option - accept "--xy" as well as "-xy"
277 
278  if ( opt.startsWith( "--" ) )
279  opt.remove(0, 1);
280 
281  if ( opt == QString( "-fullscreen" ) ) _fullscreen = true;
282  else if ( opt == QString( "-noborder" ) ) _noborder = true;
283  else if ( opt == QString( "-auto-font" ) ) yqApp()->setAutoFonts( true );
284  else if ( opt == QString( "-auto-fonts" ) ) yqApp()->setAutoFonts( true );
285  else if ( opt == QString( "-gnome-button-order" ) ) YButtonBox::setLayoutPolicy( YButtonBox::gnomeLayoutPolicy() );
286  else if ( opt == QString( "-kde-button-order" ) ) YButtonBox::setLayoutPolicy( YButtonBox::kdeLayoutPolicy() );
287  // --macro is handled by YUI_component
288  else if ( opt == QString( "-help" ) )
289  {
290  fprintf( stderr,
291  "Command line options for the YaST2 Qt UI:\n"
292  "\n"
293  "--nothreads run without additional UI threads\n"
294  "--fullscreen use full screen for `opt(`defaultsize) dialogs\n"
295  "--noborder no window manager border for `opt(`defaultsize) dialogs\n"
296  "--auto-fonts automatically pick fonts, disregard Qt standard settings\n"
297  "--help this help text\n"
298  "\n"
299  "--macro <macro-file> play a macro right on startup\n"
300  "\n"
301  "-no-wm, -noborder etc. are accepted as well as --no-wm, --noborder\n"
302  "to maintain backwards compatibility.\n"
303  "\n"
304  );
305 
306  raiseFatalError();
307  }
308  }
309  }
310 
311  // Qt handles command line option "-reverse" for Arabic / Hebrew
312 }
313 
314 
316 {
317  yuiMilestone() <<"Closing down Qt UI." << std::endl;
318 
319  // Intentionally NOT calling dlclose() to libqt-mt
320  // (see constructor for explanation)
321 
322  if ( qApp ) // might already be reset to 0 internally from Qt
323  {
324  qApp->exit();
325  qApp->deleteLater();
326  }
327 
328  delete _signalReceiver;
329 }
330 
331 
332 void
334 {
335  yuiMilestone() <<"Destroying UI thread" << std::endl;
336 
337  if ( qApp ) // might already be reset to 0 internally from Qt
338  {
339  if ( YDialog::openDialogsCount() > 0 )
340  {
341  yuiError() << YDialog::openDialogsCount() << " open dialogs left over" << endl;
342  yuiError() << "Topmost dialog:" << endl;
343  YDialog::topmostDialog()->dumpWidgetTree();
344  }
345 
346  YDialog::deleteAllDialogs();
347  qApp->exit();
348  qApp->deleteLater();
349  }
350 }
351 
352 
353 YWidgetFactory *
355 {
356  YQWidgetFactory * factory = new YQWidgetFactory();
357  YUI_CHECK_NEW( factory );
358 
359  return factory;
360 }
361 
362 
363 YOptionalWidgetFactory *
365 {
367  YUI_CHECK_NEW( factory );
368 
369  return factory;
370 }
371 
372 
373 YApplication *
374 YQUI::createApplication()
375 {
376  YQApplication * app = new YQApplication();
377  YUI_CHECK_NEW( app );
378 
379  return app;
380 }
381 
382 
384 {
385  QScreen * screen = qApp->primaryScreen();
386  QSize primaryScreenSize = screen->size();
387  QSize availableSize = screen->availableSize();
388 
389  if ( _fullscreen )
390  {
391  _defaultSize = availableSize;
392 
393  yuiMilestone() << "-fullscreen: using "
394  << _defaultSize.width() << " x " << _defaultSize.height()
395  << "for `opt(`defaultsize)"
396  << std::endl;
397  }
398  else
399  {
400  // Get _defaultSize via -geometry command line option (if set)
401 
402  // Set min defaultsize or figure one out if -geometry was not used
403 
404  if ( _defaultSize.width() < 800 ||
405  _defaultSize.height() < 600 )
406  {
407  if ( primaryScreenSize.width() >= 1024 && primaryScreenSize.height() >= 768 )
408  {
409  // Scale down to 70% of screen size
410 
411  _defaultSize.setWidth ( max( (int) (availableSize.width() * 0.7), 800 ) );
412  _defaultSize.setHeight( max( (int) (availableSize.height() * 0.7), 600 ) );
413  }
414  else
415  {
416  _defaultSize = availableSize;
417  }
418  }
419  else
420  {
421  yuiMilestone() << "Forced size (via -geometry): "
422  << _defaultSize.width() << " x " << _defaultSize.height()
423  << std::endl;
424  }
425  }
426 
427  yuiMilestone() << "Default size: "
428  << _defaultSize.width() << " x " << _defaultSize.height()
429  << std::endl;
430 }
431 
432 
433 void YQUI::idleLoop( int fd_ycp )
434 {
435  initUI();
436 
437  _received_ycp_command = false;
438  QSocketNotifier * notifier = new QSocketNotifier( fd_ycp, QSocketNotifier::Read );
439  QObject::connect( notifier, &pclass(notifier)::activated,
440  _signalReceiver, &pclass(_signalReceiver)::slotReceivedYCPCommand );
441 
442  notifier->setEnabled( true );
443 
444 
445  //
446  // Process Qt events until fd_ycp is readable
447  //
448 
449 #if VERBOSE_EVENT_LOOP
450  yuiDebug() << "Entering idle loop" << std::endl;
451 #endif
452 
453  QEventLoop eventLoop( qApp );
454 
455  while ( !_received_ycp_command )
456  eventLoop.processEvents( QEventLoop::ExcludeUserInputEvents | QEventLoop::WaitForMoreEvents );
457 
458 #if VERBOSE_EVENT_LOOP
459  yuiDebug() << "Leaving idle loop" << std::endl;
460 #endif
461 
462  delete notifier;
463 }
464 
465 
467 {
468  _received_ycp_command = true;
469 }
470 
471 
472 void YQUI::sendEvent( YEvent * event )
473 {
474  if ( event )
475  {
476  _eventHandler.sendEvent( event );
477  YQDialog * dialog = (YQDialog *) YDialog::currentDialog( false ); // don't throw
478 
479  if ( dialog )
480  {
481  if ( dialog->eventLoop()->isRunning() )
482  dialog->eventLoop()->exit( 0 );
483  }
484  else
485  {
486  yuiError() << "No dialog" << std::endl;
487  }
488  }
489 }
490 
491 
492 void YQUI::setTextdomain( const char * domain )
493 {
494  bindtextdomain( domain, YSettings::localeDir().c_str() );
495  bind_textdomain_codeset( domain, "utf8" );
496  textdomain( domain );
497 
498  // Make change known.
499  {
500  extern int _nl_msg_cat_cntr;
501  ++_nl_msg_cat_cntr;
502  }
503 }
504 
505 
506 void YQUI::blockEvents( bool block )
507 {
508  initUI();
509 
510  if ( block )
511  {
512  if ( ++_blockedLevel == 1 )
513  {
514  _eventHandler.blockEvents( true );
515 
516  YQDialog * dialog = (YQDialog *) YDialog::currentDialog( false ); // don't throw
517 
518  if ( dialog && dialog->eventLoop()->isRunning() )
519  {
520  yuiWarning() << "blocking events in active event loop of " << dialog << std::endl;
521  dialog->eventLoop()->exit();
522  }
523  }
524  }
525  else
526  {
527  if ( --_blockedLevel == 0 )
528  {
529  _eventHandler.blockEvents( false );
530 
531  YQDialog * dialog = (YQDialog *) YDialog::currentDialog( false ); // don't throw
532 
533  if ( dialog )
534  dialog->eventLoop()->wakeUp();
535  }
536  }
537 }
538 
539 
541 {
542  initUI();
543  _blockedLevel = 0;
544  _eventHandler.blockEvents( false );
545 }
546 
547 
549 {
550  return _eventHandler.eventsBlocked();
551 }
552 
553 
555 {
556  qApp->setOverrideCursor( Qt::BusyCursor );
557 }
558 
559 
561 {
562  if ( _busyCursorTimer->isActive() )
563  _busyCursorTimer->stop();
564 
565  while ( qApp->overrideCursor() )
566  qApp->restoreOverrideCursor();
567 }
568 
569 
571 {
572  // Display a busy cursor, but only if there is no other activity within
573  // BUSY_CURSOR_TIMEOUT milliseconds: Avoid cursor flicker.
574 
575  _busyCursorTimer->start( BUSY_CURSOR_TIMEOUT ); // single shot
576 }
577 
578 
579 int YQUI::defaultSize(YUIDimension dim) const
580 {
581  return dim == YD_HORIZ ? _defaultSize.width() : _defaultSize.height();
582 }
583 
584 
585 void YQUI::probeX11Display( const YCommandLine & cmdLine )
586 {
587  // obsolete, see https://bugzilla.suse.com/show_bug.cgi?id=1072411
588 }
589 
590 
591 void YQUI::deleteNotify( YWidget * widget )
592 {
593  _eventHandler.deletePendingEventsFor( widget );
594 }
595 
596 
598 {
599  yuiMilestone() << "Closing application" << std::endl;
600  sendEvent( new YCancelEvent() );
601  return true;
602 }
603 
604 
606 {
607  QWidget * parent = 0;
608  YDialog * dialog = YDialog::currentDialog( false ); // doThrow
609 
610  if ( dialog )
611  parent = (QWidget *) dialog->widgetRep();
612 
613  QString id = QInputDialog::getText( parent,
614  _( "Widget ID" ), // dialog title
615  _( "Enter Widget ID:" ) // label
616  );
617  if ( ! id.isEmpty() )
618  {
619  try
620  {
621  YWidget * widget = sendWidgetID( toUTF8( id ) );
622  YQGenericButton * yqButton = dynamic_cast<YQGenericButton *>( widget );
623 
624  if ( yqButton )
625  {
626  yuiMilestone() << "Activating " << widget << endl;
627  yqButton->activate();
628  }
629  }
630  catch ( YUIWidgetNotFoundException & ex )
631  {
632  YUI_CAUGHT( ex );
633  QMessageBox::warning( parent,
634  _( "Error" ), // title
635  _( "No widget with ID \"%1\"" ).arg( id ) );
636  }
637  }
638 }
639 
640 
641 
642 
643 
644 YQUISignalReceiver::YQUISignalReceiver()
645  : QObject()
646 {
647 }
648 
649 
650 void YQUISignalReceiver::slotBusyCursor()
651 {
652  YQUI::ui()->busyCursor();
653 }
654 
655 
656 void YQUISignalReceiver::slotReceivedYCPCommand()
657 {
659 }
660 
661 
662 
663 static void
664 qMessageHandler( QtMsgType type, const QMessageLogContext &, const QString & msg )
665 {
666  switch (type)
667  {
668  case QtDebugMsg:
669  yuiMilestone() << "<libqt-debug> " << msg << std::endl;
670  break;
671 
672 #if QT_VERSION >= 0x050500
673  case QtInfoMsg:
674  yuiMilestone() << "<libqt-info> " << msg << std::endl;
675  break;
676 #endif
677 
678  case QtWarningMsg:
679  yuiWarning() << "<libqt-warning> " << msg << std::endl;
680  break;
681 
682  case QtCriticalMsg:
683  yuiError() << "<libqt-critical>" << msg << std::endl;
684  break;
685 
686  case QtFatalMsg:
687  yuiError() << "<libqt-fatal> " << msg << std::endl;
688  abort();
689  exit(1); // Qt does the same
690  }
691 
692  if ( QString( msg ).contains( "Fatal IO error", Qt::CaseInsensitive ) &&
693  QString( msg ).contains( "client killed", Qt::CaseInsensitive ) )
694  yuiError() << "Client killed. Possibly caused by X server shutdown or crash." << std::endl;
695 }
696 
697 
698 QIcon YQUI::loadIcon( const string & iconName ) const
699 {
700  QIcon icon;
701  const QString resource = ":/";
702 
703  if ( QIcon::hasThemeIcon( iconName.c_str() ) )
704  {
705  yuiDebug() << "Trying theme icon from: " << iconName << std::endl;
706  icon = QIcon::fromTheme( iconName.c_str() );
707  }
708 
709  if ( icon.isNull() )
710  {
711  yuiDebug() << "Trying icon from resource: " << iconName << std::endl;
712  icon = QIcon( resource + iconName.c_str() );
713  }
714 
715  if ( icon.isNull() )
716  {
717  yuiDebug() << "Trying icon from path: " << iconName << std::endl;
718  icon = QIcon( iconName.c_str() );
719  }
720 
721  if ( icon.isNull() )
722  yuiWarning() << "Couldn't load icon: " << iconName << std::endl;
723 
724  return icon;
725 }
int defaultSize(YUIDimension dim) const
Returns size for opt(defaultsize) dialogs (in one dimension).
Definition: YQUI.cc:579
void receivedYCPCommand()
Notification that a YCP command has been received on fd_ycp to leave idleLoop()
Definition: YQUI.cc:466
void activate()
Activate (animated) this button.
static YQApplication * yqApp()
Return the global YApplication object as YQApplication.
Definition: YQUI.cc:260
void forceUnblockEvents()
Force unblocking all events, no matter how many times blockEvents() has This returns 0 if there is no...
Definition: YQUI.cc:540
void setAutoFonts(bool useAutoFonts)
Set whether or not fonts should automatically be picked.
virtual YOptionalWidgetFactory * createOptionalWidgetFactory()
Create the widget factory that provides all the createXY() methods for optional ("special") widgets a...
Definition: YQUI.cc:364
void askSendWidgetID()
Open a pop-up dialog to ask the user for a widget ID and then send it with sendWidgetID().
Definition: YQUI.cc:605
void calcDefaultSize()
Calculate size of opt(defaultsize) dialogs.
Definition: YQUI.cc:383
QEventLoop * eventLoop()
Access to this dialog&#39;s event loop.
Definition: YQDialog.h:201
QIcon loadIcon(const string &iconName) const
Load an icon.
Definition: YQUI.cc:698
Helper class that acts as a Qt signal receiver for YQUI.
Definition: YQUI.h:396
Abstract base class for push button and similar widgets - all that can become a YQDialog&#39;s "default b...
void sendEvent(YEvent *event)
Widget event handlers (slots) call this when an event occured that should be the answer to a UserInpu...
Definition: YQUI.cc:472
virtual void idleLoop(int fd_ycp)
Idle around until fd_ycp is readable and handle repaints.
Definition: YQUI.cc:433
void probeX11Display(const YCommandLine &cmdLine)
Probe the X11 display.
Definition: YQUI.cc:585
virtual void deleteNotify(YWidget *widget)
Notification that a widget is being deleted.
Definition: YQUI.cc:591
void busyCursor()
Show mouse cursor indicating busy state.
Definition: YQUI.cc:554
Definition: YQUI.h:62
void processCommandLineArgs(int argc, char **argv)
Handle command line args.
Definition: YQUI.cc:266
YQUI(bool withThreads, bool topmostConstructor=true)
Constructors.
Definition: YQUI.cc:97
Concrete widget factory for mandatory widgets.
virtual void uiThreadDestructor()
Destroy whatever needs to be destroyed within the UI thread.
Definition: YQUI.cc:333
virtual void blockEvents(bool block=true)
Block (or unblock) events.
Definition: YQUI.cc:506
void timeoutBusyCursor()
Show mouse cursor indicating busy state if the UI is unable to respond to user input for more than a ...
Definition: YQUI.cc:570
bool close()
Application shutdown.
Definition: YQUI.cc:597
void normalCursor()
Show normal mouse cursor not indicating busy status.
Definition: YQUI.cc:560
virtual void initUI()
Post-constructor initialization.
Definition: YQUI.cc:125
virtual ~YQUI()
Destructor.
Definition: YQUI.cc:315
void raiseFatalError()
Raise a fatal UI error.
Definition: YQUI.h:187
static void setTextdomain(const char *domain)
Initialize and set a textdomain for gettext()
Definition: YQUI.cc:492
static YQUI * ui()
Access the global Qt-UI.
Definition: YQUI.h:83
Widget factory for optional ("special") widgets.
virtual bool eventsBlocked() const
Returns &#39;true&#39; if events are currently blocked.
Definition: YQUI.cc:548
virtual YWidgetFactory * createWidgetFactory()
Create the widget factory that provides all the createXY() methods for standard (mandatory, i.e.
Definition: YQUI.cc:354