void AttachmentClickAtionDialog::keyPressEvent(QKeyEvent *event) { const int key_code = event->key(); // switch( key_code ) { case Qt::Key_Escape: onClickCancel(); return; default: break; }; // QDialog::keyPressEvent(event); }
AttachmentClickAtionDialog::AttachmentClickAtionDialog(bool b_rename_enabled, QWidget *parent) : QDialog(parent), ui(new Ui::AttachmentClickAtionDialog) { ui->setupUi(this); // reset(); // QObject::connect( this->ui->pushButtonOpen, SIGNAL(clicked()), this, SLOT( onClickOpen () ) ); QObject::connect( this->ui->pushButtonDownload, SIGNAL(clicked()), this, SLOT( onClickDownload() ) ); QObject::connect( this->ui->pushButtonRename, SIGNAL(clicked()), this, SLOT( onClickRename () ) ); QObject::connect( this->ui->pushButtonCancel, SIGNAL(clicked()), this, SLOT( onClickCancel () ) ); //TODO: make it optional in settings this->ui->pushButtonOpen->setFocus(); //# this->ui->pushButtonRename->setEnabled(b_rename_enabled); }
ModuleFilterDialog::ModuleFilterDialog(std::shared_ptr<cxlProfileDataReader> pProfDataRdr, TableDisplaySettings* pDisplaySettings, CPUSessionTreeItemData* pSessionData, bool isDisplaySysModEn, QWidget* pParent): acDialog(pParent), m_pProfDataRdr(pProfDataRdr), m_pTableDisplaySettings(pDisplaySettings), m_pSessionData(pSessionData), m_isDisplaySysModEn(isDisplaySysModEn) { setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint); intializeLayout(); intializeData(); QObject::connect(m_pPbOk, SIGNAL(clicked()), this, SLOT(onClickOk())); QObject::connect(m_pPbCancel, SIGNAL(clicked()), this, SLOT(onClickCancel())); QObject::connect(m_pSelectAllModules, SIGNAL(stateChanged(int)), this, SLOT(onCheckSelectALL(int))); QObject::connect(m_pDisplaySystemDLL, SIGNAL(stateChanged(int)), this, SLOT(onCheckSystemDLL(int))); resize(QSize(600, 350)); setWindowTitle(str_DialogCaption); afLoadTitleBarIcon(this); }