QX::QX(QWidget *parent, Qt::WFlags f) : QWidget(parent) { Q_UNUSED(f); BuildMenu(); favouritesAction->setChecked(true); lineEdit = new QLineEdit("terminal.sh", this); bOk = new QPushButton(this); bOk->setMinimumWidth(100); bOk->setText("Run"); connect(bOk, SIGNAL(clicked()), this, SLOT(okClicked())); lw = new QListWidget(this); connect(lw, SIGNAL(clicked(QModelIndex)), this, SLOT(listClicked())); lAppname = new QLabel(this); bResume = new QPushButton(this); bTerminate = new QPushButton(this); lAppname->setVisible(false); lAppname->setAlignment(Qt::AlignCenter); bResume->setVisible(false); bTerminate->setVisible(false); connect(bResume, SIGNAL(clicked()), this, SLOT(resumeClicked())); connect(bTerminate, SIGNAL(clicked()), this, SLOT(terminateClicked())); //------------------------------------------ grid=new QGridLayout(this); grid->addWidget(lineEdit,0,0); grid->addWidget(bOk,0,1); grid->addWidget(lw,1,0,1,2); grid->addWidget(lAppname,2,0,1,2); grid->addWidget(bResume,3,0,1,2); grid->addWidget(bTerminate,4,0,1,2); LoadFavourites(); scanner = new DesktopScanner(); FillApps(favouritesAction->isChecked()); //========================================== appRunScr = new AppRunningScreen(); process = NULL; xprocess = NULL; screen = QX::ScreenMain; #if QTOPIA powerConstraint = QtopiaApplication::Disable; // Start the "QX" service that handles application switching. new QxService(this); #endif showScreen(QX::ScreenMain); }
DccRenameDialog::DccRenameDialog(DccBroker * br, DccDescriptor * dcc, const QString & text, bool bDisableResume) : QWidget(nullptr), DccDialog(br, dcc) { setObjectName("dcc_rename_box"); //QVBoxLayout * vb = new QVBoxLayout(this,4,4); QVBoxLayout * vb = new QVBoxLayout(this); vb->setMargin(4); vb->setSpacing(4); QLabel * l = new QLabel(text, this); l->setWordWrap(true); vb->addWidget(l); //QHBoxLayout *hb = new QHBoxLayout(4); QHBoxLayout * hb = new QHBoxLayout(); hb->setSpacing(4); vb->addLayout(hb, Qt::AlignCenter); QPushButton * btn = new QPushButton(__tr2qs_ctx("&Rename", "dcc"), this); hb->addWidget(btn); connect(btn, SIGNAL(clicked()), this, SLOT(renameClicked())); btn = new QPushButton(__tr2qs_ctx("Over&write", "dcc"), this); hb->addWidget(btn); connect(btn, SIGNAL(clicked()), this, SLOT(overwriteClicked())); btn = new QPushButton(__tr2qs_ctx("Re&sume", "dcc"), this); hb->addWidget(btn); connect(btn, SIGNAL(clicked()), this, SLOT(resumeClicked())); if(bDisableResume) btn->setEnabled(false); btn = new QPushButton(__tr2qs_ctx("Cancel", "dcc"), this); hb->addWidget(btn); connect(btn, SIGNAL(clicked()), this, SLOT(cancelClicked())); btn->setDefault(true); //btn->setFocus(); setWindowIcon(QIcon(*(g_pIconManager->getSmallIcon(KviIconManager::DccMsg)))); setWindowTitle(__tr2qs_ctx("File Already Exists - KVIrc", "dcc")); }