void ViewerToolBar::detectTriggerredAction(QAction *action) { QStringList parameters; if ( action == start_Action) { parameters << "startVirtDomain"; } else if ( action == pause_Action ) { parameters << "pauseVirtDomain"; } else if ( action == destroy_Action ) { parameters << "destroyVirtDomain"; } else if ( action == reset_Action ) { parameters << "resetVirtDomain"; } else if ( action == reboot_Action ) { parameters << "rebootVirtDomain"; } else if ( action == shutdown_Action ) { parameters << "shutdownVirtDomain"; } else if ( action == save_Action ) { parameters << "saveVirtDomain"; } else if ( action == restore_Action ) { parameters << "restoreVirtDomain"; } else if ( action == snapshot_Action ) { parameters << "createVirtDomainSnapshot"; } else if ( action == createSnapshot ) { parameters << "createVirtDomainSnapshot"; } else if ( action == moreSnapshot_Actions ) { parameters << "moreSnapshotActions"; } else if ( action == reconnect_Action ) { parameters << "reconnectToVirtDomain"; } else if ( action == sendKeySeq_1 ) { parameters << "sendKeySeqToVirtDomain"<< QString::number(Qt::Key_Launch1); } else if ( action == sendKeySeq_2 ) { parameters << "sendKeySeqToVirtDomain"<< QString::number(Qt::Key_Launch2); } else if ( action == sendKeySeq_3 ) { parameters << "sendKeySeqToVirtDomain"<< QString::number(Qt::Key_Launch3); } else if ( action == sendKeySeq_4 ) { parameters << "sendKeySeqToVirtDomain"<< QString::number(Qt::Key_Launch4); } else if ( action == sendKeySeq_5 ) { parameters << "sendKeySeqToVirtDomain"<< QString::number(Qt::Key_Launch5); } else if ( action == sendKeySeq_6 ) { parameters << "sendKeySeqToVirtDomain"<< QString::number(Qt::Key_Launch6); } else if ( action == sendKeySeq_7 ) { parameters << "sendKeySeqToVirtDomain"<< QString::number(Qt::Key_Launch7); } else if ( action == sendKeySeq_8 ) { parameters << "sendKeySeqToVirtDomain"<< QString::number(Qt::Key_Launch8); } else if ( action == sendKeySeq_BackSpc ) { parameters << "sendKeySeqToVirtDomain"<< QString::number(Qt::Key_LaunchB); } else if ( action == sendKeySeq_Del ) { parameters << "sendKeySeqToVirtDomain"<< QString::number(Qt::Key_LaunchD); } else if ( action == copyFiles_Action ) { parameters << "copyFilesToVirtDomain"; } else if ( action == copyToClipboard ) { parameters << "copyToClipboardFromVirtDomain"; } else if ( action == pasteClipboard ) { parameters << "pasteClipboardToVirtDomain"; } else return; emit execMethod(parameters); }
/* private slots */ void DomainToolBar::timerEvent(QTimerEvent *event) { int _timerId = event->timerId(); //qDebug()<<_timerId<<timerId; if ( _timerId && timerId==_timerId ) { QStringList parameters; parameters << "reloadVirtDomain"; emit execMethod(parameters); }; }
/* private slots */ void VirtNetToolBar::timerEvent(QTimerEvent *event) { int _timerId = event->timerId(); //qDebug()<<_timerId<<timerId; if ( _timerId && timerId==_timerId && isVisible() ) { QStringList parameters; parameters << "reloadVirtNetwork"; emit execMethod(parameters); }; }
/* private slots */ void DomainControlMenu::emitExecMethod(QAction *action) { QStringList paramList; if ( !parameters.isEmpty() ) { if ( action == start) { paramList.append( "startVirtDomain"); } else if ( action == pause ) { paramList.append("pauseVirtDomain"); } else if ( action == destroy ) { paramList.append("destroyVirtDomain"); } else if ( action == edit ) { paramList.append("editVirtDomain"); } else if ( action == reset ) { paramList.append("resetVirtDomain"); } else if ( action == reboot ) { paramList.append("rebootVirtDomain"); } else if ( action == shutdown ) { paramList.append("shutdownVirtDomain"); } else if ( action == save ) { paramList.append("saveVirtDomain"); } else if ( action == undefine ) { paramList.append("undefineVirtDomain"); } else if ( action == autoStart ) { paramList.append("setAutostartVirtDomain"); paramList.append(QString((parameters[2]=="yes")? "0" : "1")); } else if ( action == RunningData ) { paramList.append("getVirtDomainXMLDesc"); paramList.append("AS_IS"); } else if ( action == InactiveData ) { paramList.append("getVirtDomainXMLDesc"); paramList.append(""); } else if ( action == display ) { paramList.append("displayVirtDomain"); } else if ( action == addToMonitor ) { paramList.append("monitorVirtDomain"); } else if ( action == migrate ) { paramList.append("migrateVirtDomain"); } else if ( action == reload ) { paramList.append("reloadVirtDomain"); } else if ( action == createSnapshot ) { paramList.append("createVirtDomainSnapshot"); } else return; if ( action != reload ) paramList.append(parameters.first()); } else if ( action == reload ) { paramList.append("reloadVirtDomain"); } else return; //qDebug()<<paramList<<"paramList from menu"; emit execMethod(paramList); }
void VirtNetToolBar::detectTriggerredAction(QAction *action) { QStringList parameters; if ( action == start_Action) { parameters << "startVirtNetwork"; } else if ( action == destroy_Action ) { parameters << "destroyVirtNetwork"; } else if ( action == undefine_Action ) { parameters << "undefineVirtNetwork"; } else if ( action == setAutostart_Action ) { parameters << "setAutostartVirtNetwork"; } else if ( action == getXMLDesc_Action ) { parameters << "getVirtNetworkXMLDesc"; } else return; emit execMethod(parameters); }
/* private slots */ void Delete_Pool_Menu::emitExecMethod(QAction *action) { QStringList parameters; if ( action == delete_Normal ) { parameters << "deleteVirtStoragePool" << QString("%1") .arg(VIR_STORAGE_POOL_DELETE_NORMAL); } else if ( action == delete_Zeroed ) { parameters << "deleteVirtStoragePool" << QString("%1") .arg(VIR_STORAGE_POOL_DELETE_ZEROED); } else return; emit execMethod(parameters); }
void VirtSecretControlMenu::emitExecMethod(QAction *action) { QStringList paramList; if ( !parameters.isEmpty() ) { if ( action == undefine ) { paramList.append("undefineVirtSecret"); } else if ( action == getXMLDesc ) { paramList.append("getVirtSecretXMLDesc"); } else if ( action == reload ) { paramList.append("reloadVirtSecret"); } else return; if ( action != reload ) paramList.append(parameters.first()); } else if ( action == reload ) { paramList.append("reloadVirtSecret"); } else return; //qDebug()<<paramList<<"paramList from menu"; emit execMethod(paramList); }
void StoragePoolToolBar::detectTriggerredAction(QAction *action) { QStringList parameters; if ( action == start_Action) { parameters << "startVirtStoragePool"; } else if ( action == destroy_Action ) { parameters << "destroyVirtStoragePool"; } else if ( action == undefine_Action ) { parameters << "undefineVirtStoragePool"; } else if ( action == setAutostart_Action ) { parameters << "setAutostartVirtStoragePool"; } else if ( action == getXMLDesc_Action ) { parameters << "getVirtStoragePoolXMLDesc"; } else if ( action == overview_Action ) { parameters << "overviewVirtStoragePool"; } else return; emit execMethod(parameters); }
void StorageVolToolBar::detectTriggerredAction(QAction *action) { QStringList parameters; if ( action == upload_Action) { parameters << "uploadVirtStorageVol"; } else if ( action == delete_Action ) { parameters << "deleteVirtStorageVol"; } else if ( action == download_Action ) { parameters << "downloadVirtStorageVol"; } else if ( action == resize_Action ) { parameters << "resizeVirtStorageVol"; } else if ( action == wipe_Action ) { parameters << "wipeVirtStorageVol" << "0"; //} else if ( action == getXMLDesc_Action ) { // parameters << "getVirtStorageVolXMLDesc"; } else return; emit execMethod(parameters); }
void InterfaceToolBar::detectTriggerredAction(QAction *action) { QStringList parameters; if ( action == undefine_Action ) { parameters << "undefineVirtInterface"; } else if ( action == start_Action ) { parameters << "startVirtInterface"; } else if ( action == destroy_Action ) { parameters << "destroyVirtInterface"; } else if ( action == changeBegin_Action ) { parameters << "changeBeginVirtInterface"; } else if ( action == changeCommit_Action ) { parameters << "changeCommitVirtInterface"; } else if ( action == changeRollback_Action ) { parameters << "changeRollbackVirtInterface"; } else if ( action == getXMLDesc_Action ) { parameters << "getVirtInterfaceXMLDesc"; } else return; emit execMethod(parameters); }
void DomainToolBar::detectTriggerredAction(QAction *action) { QStringList parameters; if ( action == start_Action) { parameters << "startVirtDomain"; } else if ( action == pause_Action ) { parameters << "pauseVirtDomain"; } else if ( action == destroy_Action ) { parameters << "destroyVirtDomain"; } else if ( action == reset_Action ) { parameters << "resetVirtDomain"; } else if ( action == reboot_Action ) { parameters << "rebootVirtDomain"; } else if ( action == shutdown_Action ) { parameters << "shutdownVirtDomain"; } else if ( action == save_Action ) { parameters << "saveVirtDomain"; } else if ( action == restore_Action ) { parameters << "restoreVirtDomain"; } else if ( action == undefine_Action ) { parameters << "undefineVirtDomain"; } else if ( action == setAutostart_Action ) { parameters << "setAutostartVirtDomain"; } else if ( action == getXMLDesc_Action ) { parameters << "getVirtDomainXMLDesc"; } else if ( action == migrate_Action ) { parameters << "migrateVirtDomain"; } else if ( action == snapshot_Action ) { parameters << "createVirtDomainSnapshot"; } else if ( action == createSnapshot ) { parameters << "createVirtDomainSnapshot"; } else if ( action == moreSnapshot_Actions ) { parameters << "moreSnapshotActions"; } else return; emit execMethod(parameters); }
void ViewerToolBar::detectTriggeredAction(QAction *action) { Act_Param parameters; //if ( action == start_Action) { // parameters << "startVirtDomain"; //} else if ( action == pause_Action ) { parameters.method = Methods::pauseEntity; } else if ( action == destroy_Action ) { parameters.method = Methods::destroyEntity; } else if ( action == reset_Action ) { parameters.method = Methods::resetVirtDomain; } else if ( action == reboot_Action ) { parameters.method = Methods::rebootVirtDomain; } else if ( action == shutdown_Action ) { parameters.method = Methods::shutdownVirtDomain; } else if ( action == save_Action ) { parameters.method = Methods::saveVirtDomain; } else if ( action == restore_Action ) { parameters.method = Methods::restoreVirtDomain; } else if ( action == snapshot_Action ) { parameters.method = Methods::createVirtDomainSnapshot; } else if ( action == createSnapshot ) { parameters.method = Methods::createVirtDomainSnapshot; } else if ( action == moreSnapshot_Actions ) { parameters.method = Methods::moreSnapshotActions; } else if ( action == reconnect_Action ) { parameters.method = Methods::reconnectToVirtDomain; } else if ( action == sendKeySeq_1 ) { parameters.method = Methods::sendKeySeqToVirtDomain; parameters.path = QString::number(Qt::Key_Launch1); } else if ( action == sendKeySeq_2 ) { parameters.method = Methods::sendKeySeqToVirtDomain; parameters.path = QString::number(Qt::Key_Launch2); } else if ( action == sendKeySeq_3 ) { parameters.method = Methods::sendKeySeqToVirtDomain; parameters.path = QString::number(Qt::Key_Launch3); } else if ( action == sendKeySeq_4 ) { parameters.method = Methods::sendKeySeqToVirtDomain; parameters.path = QString::number(Qt::Key_Launch4); } else if ( action == sendKeySeq_5 ) { parameters.method = Methods::sendKeySeqToVirtDomain; parameters.path = QString::number(Qt::Key_Launch5); } else if ( action == sendKeySeq_6 ) { parameters.method = Methods::sendKeySeqToVirtDomain; parameters.path = QString::number(Qt::Key_Launch6); } else if ( action == sendKeySeq_7 ) { parameters.method = Methods::sendKeySeqToVirtDomain; parameters.path = QString::number(Qt::Key_Launch7); } else if ( action == sendKeySeq_8 ) { parameters.method = Methods::sendKeySeqToVirtDomain; parameters.path = QString::number(Qt::Key_Launch8); } else if ( action == getScreenshot ) { parameters.method = Methods::getScreenshotFromVirtDomain; } else if ( action == sendKeySeq_BackSpc ) { parameters.method = Methods::sendKeySeqToVirtDomain; parameters.path = QString::number(Qt::Key_LaunchB); } else if ( action == sendKeySeq_Del ) { parameters.method = Methods::sendKeySeqToVirtDomain; parameters.path = QString::number(Qt::Key_LaunchD); } else if ( action == copyFiles_Action ) { if ( downloadIsCompleted ) { downloadIsCompleted = false; copyFiles_Action->setToolTip( "Cancel Copying Files to Guest"); copyFiles_Action->setIcon( QIcon::fromTheme("delete")); parameters.method = Methods::copyFilesToVirtDomain; } else { parameters.method = Methods::cancelCopyFilesToVirtDomain; }; } else if ( action == copyToClipboard ) { parameters.method = Methods::copyToClipboardFromVirtDomain; } else if ( action == pasteClipboard ) { parameters.method = Methods::pasteClipboardToVirtDomain; } else if ( action == fullScreen ) { parameters.method = Methods::fullScreenVirtDomain; } else if ( action == scaled_to ) { parameters.method = Methods::scaleScreenVirtDomain; } else return; emit execMethod(parameters); }