Пример #1
0
Window::Window()
    : mUI( new Ui::Window )
{
    mUI->setupUi( this );

    setWindowTitle( qApp->applicationName() );

    CreateActions();
    CreateTrayIcon();

    connect( mTrayIcon, SIGNAL( activated(QSystemTrayIcon::ActivationReason) ), this, SLOT( TrayIconActivated(QSystemTrayIcon::ActivationReason) ) );
    connect( &mCore, SIGNAL( HandleGameClientRestartRequired(bool) ), this, SLOT( HandleGameClientRestartRequired(bool) ) );

#ifdef Q_WS_WIN
    // Notify user the first time that the app runs in the taskbar
    QSettings settings;
    if( !settings.contains("taskbarHint") ) {
        settings.setValue( "taskbarHint", true );
        mTrayIcon->showMessage( tr( "Heads up!" ), "Track-o-Bot runs in your taskbar! Right click the icon for more options." );
    }
#endif
}
Пример #2
0
Window::Window()
  : mUI( new Ui::Window )
{
  mUI->setupUi( this );

  setWindowTitle( qApp->applicationName() );

  CreateActions();
  CreateTrayIcon();

  connect( mTrayIcon, SIGNAL( activated(QSystemTrayIcon::ActivationReason) ), this, SLOT( TrayIconActivated(QSystemTrayIcon::ActivationReason) ) );
  connect( &mCore, SIGNAL( HandleGameClientRestartRequired(bool) ), this, SLOT( HandleGameClientRestartRequired(bool) ) );

  QTimer::singleShot( 1000, this, SLOT(HandleFirstStartCheck()) );
}