QEMUGUI::QEMUGUI(QWidget *parent) : QMainWindow(parent), currentVM(NULL), runningVM(NULL), ui(new Ui::mainWindow) { ui->setupUi(this); this->isSaveRetrace = false; connect(ui->confTree, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), this, SLOT(changeConfigurations(QTreeWidgetItem*,QTreeWidgetItem*))); connect(ui->actionExit, SIGNAL(triggered()), this, SLOT(close())); connect(ui->actionStart, SIGNAL(triggered()), this, SLOT(onExecuteAction())); connect(ui->actionRecord, SIGNAL(triggered()), this, SLOT(onRecordAction())); connect(ui->actionCreate, SIGNAL(triggered()), this, SLOT(on_addConfButton_clicked())); connect(ui->actionDelete, SIGNAL(triggered()), this, SLOT(on_deleteConfButton_clicked())); connect(ui->actionEdit, SIGNAL(triggered()), this, SLOT(on_editButton_clicked())); connect(ui->actionOptions, SIGNAL(triggered()), this, SLOT(showGlobalOptions())); // update totalOptionsLineEdit connect(ui->logFileName, SIGNAL(editingFinished()), this, SLOT(updateControlsState())); connect(ui->snapshotCheckBox, SIGNAL(clicked()), this, SLOT(updateControlsState())); connect(ui->logOptions, SIGNAL(clicked(QModelIndex)), this, SLOT(updateControlsState())); connect(ui->additionalOptions, SIGNAL(editingFinished()), this, SLOT(updateControlsState())); connect(&monitorSocket, SIGNAL(readyRead()), this, SLOT(terminalRead())); connect(ui->terminalInput->lineEdit(), SIGNAL(returnPressed()), this, SLOT(terminalWrite())); loadConfList(); }
void PasswordControl::setCryptedPassword(const char *cryptedPass) { releaseCryptedPassword(); m_cryptedPassword = new char[8]; memcpy(m_cryptedPassword, cryptedPass, 8); updateControlsState(); }
void PasswordControl::unsetPassword(bool promtUser, HWND parentWindow) { if (promtUser) { if (MessageBox(parentWindow, StringTable::getString(IDS_UNSET_PASSWORD_PROMT), StringTable::getString(IDS_MBC_TVNCONTROL), MB_YESNO | MB_ICONQUESTION) == IDNO) { return; } } releaseCryptedPassword(); updateControlsState(); }
void PasswordControl::setPassword(const TCHAR *plainText) { char plainTextInANSI[9]; memset(plainTextInANSI, 0, sizeof(plainTextInANSI)); StringStorage plainTextStorage(plainText); plainTextStorage.toAnsiString(plainTextInANSI, 9); UINT8 cryptedPassword[8]; memset(cryptedPassword, 0, 8); VncPassCrypt::getEncryptedPass(cryptedPassword, (const UINT8 *)plainTextInANSI); setCryptedPassword((char *)cryptedPassword); updateControlsState(); }
void PasswordControl::setEnabled(bool enabled) { m_enabled = enabled; updateControlsState(); }
PasswordControl::PasswordControl(Control *changeButton, Control *unsetButton) : m_enabled(true), m_changeButton(changeButton), m_unsetButton(unsetButton), m_cryptedPassword(0) { updateControlsState(); }