nftdialog::nftdialog(QWidget* parent, QString lang, QString templateDir) : QDialog(parent) { setupUi(this); setModal(true); settings = new nftsettings(lang, templateDir); setWindowIcon(loadIcon("AppIcon.png")); // context menu removeAction = new QAction(tr("&Remove"), tnailGrid); openAction = new QAction(tr("&Open"), tnailGrid); tnailGrid->addAction(removeAction); tnailGrid->addAction(openAction); setupAbout(); toolBox->setItemIcon(0, loadIcon("16/information.png")); toolBox->setItemIcon(1, loadIcon("16/image-x-generic.png")); toolBox->setItemIcon(2, loadIcon("16/help-browser.png")); tnailGrid->setIconSize(QSize(60, 60)); // Signals and Slots Connections connect(categoryList, SIGNAL(itemSelectionChanged()), this, SLOT(setTNails())); connect(tnailGrid, SIGNAL(itemSelectionChanged()), this, SLOT(setInfo())); connect(tnailGrid, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(accept())); connect(removeAction, SIGNAL(triggered()), this, SLOT(removeTemplate())); connect(openAction, SIGNAL(triggered()), this, SLOT(accept())); setupListItems(); setupCategories(); }
void nftdialog::removeTemplate() { currentDocumentTemplate->isDeleted = true; textBrowser->clear(); imageView->clear(); currentDocumentTemplate = NULL; buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); setupListItems(); setupCategories(); setTNails(); }
ResourceDock::ResourceDock(QWidget *Parrent) : QDockWidget("Resource Explorer", Parrent), fwatcher(new QFileSystemWatcher(this)) { setObjectName("Resources"); setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); setStyleSheet("QDockWidget { border: 3px solid; }"); setMinimumWidth(120); setFocusPolicy(Qt::StrongFocus); setupTree(); setupActions(); setupHTools(); setupCategories(); this->setDisabled(true); }
SATDialog::SATDialog(QWidget* parent, QString tmplName, int pageW, int pageH) : QDialog(parent) { setupUi(this); setModal(true); setWindowTitle( tr("Save as Template")); setWindowIcon(loadIcon("AppIcon.png")); readPrefs(); nameEdit->setText(tmplName); setupCategories(); setupPageSize(pageW, pageH); authorEdit->setText(author); emailEdit->setText(email); // Slots and signals connections connect(detailButton, SIGNAL(stateChanged(int)), this, SLOT(detailClicked(int))); }