void FavoriteDirsPage::handleDoubleClick() { if(directories->hasSelected()) { handleRenameClicked(); } else { handleAddClicked(); } }
QtAffiliationEditor::QtAffiliationEditor(QWidget* parent) : QDialog(parent){ ui_.setupUi(this); setAttribute(Qt::WA_DeleteOnClose); connect(ui_.affiliation, SIGNAL(currentIndexChanged(int)), this, SLOT(handleCurrentIndexChanged(int))); connect(ui_.addJID, SIGNAL(clicked()), this, SLOT(handleAddClicked())); connect(ui_.removeJID, SIGNAL(clicked()), this, SLOT(handleRemoveClicked())); }
bool FavoriteDirsPage::handleKeyDown(int c) { switch(c) { case VK_INSERT: handleAddClicked(); return true; case VK_DELETE: handleRemoveClicked(); return true; } return false; }