void editorChanged()
{
	reloadMenu();
	for(int *p=toolEditItems; p<endA(toolEditItems); p++){
		SendMessage(toolbar, TB_HIDEBUTTON, *p, MAKELONG(editor ? FALSE : TRUE, 0));
	}
	SetWindowText(hWin, editor ? titleEdit : title);
}
示例#2
0
  TrayIcon::TrayIcon() {

    trayIconMenu = new QMenu( this );
    trayIcon = new QSystemTrayIcon( this );

    createMenu();

    trayIcon->setContextMenu( trayIconMenu );
    trayIcon->setIcon( QIcon( QString::fromUtf8( ":/dboxfe_image" ) ) );
    trayIcon->setToolTip( "DBoxFE - TrayIcon " + getAppVersion() );
    trayIcon->show();

    setWindowIcon( QIcon( QString::fromUtf8( ":/dboxfe_image" ) ) );
    setWindowTitle( getAppTitel() );

    update = new QTimer( this );
    connect( update, SIGNAL( timeout() ), this, SLOT( reloadMenu() ) );
    update->thread()->setPriority( QThread::NormalPriority );
    update->start( 15000 );
  }
int TCST::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QDialog::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0:
            button1Clicked();
            break;
        case 1:
            registerButtonClicked();
            break;
        case 2:
            browseForLocation();
            break;
        case 3:
            browseForFile();
            break;
        case 4:
            connectToServer();
            break;
        case 5:
            sendRequest();
            break;
        case 6:
            sendFile();
            break;
        case 7:
            updateLabels();
            break;
        case 8:
            confirmFile();
            break;
        case 9:
            displayError((*reinterpret_cast< QAbstractSocket::SocketError(*)>(_a[1])));
            break;
        case 10:
            connectionClosedByServer();
            break;
        case 11:
            sessionOpened();
            break;
        case 12:
            reloadMenu();
            break;
        case 13:
            registerWithServer();
            break;
        case 14:
            printStatus();
            break;
        case 15:
            reconnect();
            break;
        default:
            ;
        }
        _id -= 16;
    }
    return _id;
}
void langChanged()
{
	reloadMenu();
}