MacroDialog::MacroDialog(QWidget *parent) : QDialog(parent), ui(new Ui::MacroDialog) { ui->setupUi(this); macroSettings = MacroSettings::Instance(); saveTime = false; this->loadSettings(); this->loadSequenceTime(); connect(ui->okButton, SIGNAL(clicked()), this, SLOT(okPressed())); connect(ui->cancelButton, SIGNAL(clicked()), this, SLOT(cancelPressed())); connect(ui->applyButton, SIGNAL(clicked()), this, SLOT(applyPressed())); connect(ui->altTable, SIGNAL(currentItemChanged(QTableWidgetItem*, QTableWidgetItem*)), this, SLOT(altCommandChanged(QTableWidgetItem*, QTableWidgetItem*))); connect(ui->ctrlTable, SIGNAL(currentItemChanged(QTableWidgetItem*, QTableWidgetItem*)), this, SLOT(ctrlCommandChanged(QTableWidgetItem*, QTableWidgetItem*))); connect(ui->functionTable, SIGNAL(currentItemChanged(QTableWidgetItem*, QTableWidgetItem*)), this, SLOT(functionCommandChanged(QTableWidgetItem*, QTableWidgetItem*))); connect(ui->keypadTable, SIGNAL(currentItemChanged(QTableWidgetItem*, QTableWidgetItem*)), this, SLOT(keypadCommandChanged(QTableWidgetItem*, QTableWidgetItem*))); connect(ui->sequenceTime, SIGNAL(textChanged(const QString&)), this, SLOT(sequenceTimeChanged(const QString&))); ui->altTable->setFocus(); }
// ------------------------------------------------------------------------ void DicomParser::setUpDisplay() { parseDicom(); loadImages(); QWidget * w1 = new QWidget(this); QHBoxLayout * l1 = new QHBoxLayout; l1->addWidget(createTable()); l1->addWidget(createViewer()); w1->setLayout(l1); okButton = new QPushButton("OK", this); connect(okButton, SIGNAL(clicked()), this, SLOT(okPressed())); cancelButton = new QPushButton("Cancel", this); connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancelPressed())); QHBoxLayout * l2 = new QHBoxLayout; l2->addWidget(cancelButton); l2->addWidget(okButton); QWidget * w2 = new QWidget(this); w2->setLayout(l2); QVBoxLayout * l3 = new QVBoxLayout; l3->addWidget(w1); l3->addWidget(w2); this->setLayout(l3); }
DISABLE_COMPILER_WARNINGS #include <QCloseEvent> #include <QMessageBox> RESTORE_COMPILER_WARNINGS CDeleteProgressDialog::CDeleteProgressDialog(std::vector<CFileSystemObject> source, QString destination, CMainWindow *mainWindow) : QWidget(0, Qt::Window), ui(new Ui::CDeleteProgressDialog), _performer(new COperationPerformer(operationDelete, source, destination)), _mainWindow(mainWindow) { ui->setupUi(this); ui->_progress->linkToWidgetstaskbarButton(this); assert(mainWindow); ui->_lblNumFiles->clear(); ui->_lblFileName->clear(); connect (ui->_btnCancel, SIGNAL(clicked()), SLOT(cancelPressed())); connect (ui->_btnBackground, SIGNAL(clicked()), SLOT(background())); connect (ui->_btnPause, SIGNAL(clicked()), SLOT(pauseResume())); setWindowTitle(tr("Deleting...")); _eventsProcessTimer.setInterval(100); _eventsProcessTimer.start(); connect(&_eventsProcessTimer, SIGNAL(timeout()), SLOT(processEvents())); _performer->setWatcher(this); _performer->start(); }
MickeyCalibration::MickeyCalibration() { ui.setupUi(this); timer.setSingleShot(false); QObject::connect(ui.CancelButton, SIGNAL(pressed()), this, SLOT(cancelPressed())); QObject::connect(&timer, SIGNAL(timeout()), this, SLOT(timeout())); setModal(true); }
void KornSubjectsDlg::removeStep2Subjects(KMailDrop *drop) { disconnect(drop, SIGNAL(readSubject(KornMailSubject *)), this, SLOT(subjectAvailable(KornMailSubject *))); disconnect(drop, SIGNAL(readSubjectsReady(bool)), this, SLOT(subjectsReady(bool))); disconnect(drop, SIGNAL(readSubjectsTotalSteps(int)), _subjects->progress, SLOT(setNumberOfSteps(int))); disconnect(drop, SIGNAL(readSubjectsProgress(int)), _subjects->progress, SLOT(setProgress(int))); disconnect(_subjects->progress, SIGNAL(cancelPressed()), drop, SLOT(readSubjectsCanceled())); }
bool ArchiveFileSelector::Create(void) { bool foundtheme = false; // Load the theme for this screen foundtheme = LoadWindowFromXML("mythnative-ui.xml", "archivefile_selector", this); if (!foundtheme) return false; bool err = false; UIUtilW::Assign(this, m_titleText, "title"); UIUtilE::Assign(this, m_fileButtonList, "filelist", &err); UIUtilE::Assign(this, m_locationEdit, "location_edit", &err); UIUtilE::Assign(this, m_backButton, "back_button", &err); UIUtilE::Assign(this, m_homeButton, "home_button", &err); UIUtilE::Assign(this, m_nextButton, "next_button", &err); UIUtilE::Assign(this, m_prevButton, "prev_button", &err); UIUtilE::Assign(this, m_cancelButton, "cancel_button", &err); UIUtilE::Assign(this, m_progTitle, "title_text", &err); UIUtilE::Assign(this, m_progSubtitle, "subtitle_text", &err); UIUtilE::Assign(this, m_progStartTime, "starttime_text", &err); if (err) { LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'archivefile_selector'"); return false; } if (m_titleText) m_titleText->SetText(tr("Find File To Import")); connect(m_nextButton, SIGNAL(Clicked()), this, SLOT(nextPressed())); connect(m_cancelButton, SIGNAL(Clicked()), this, SLOT(cancelPressed())); connect(m_prevButton, SIGNAL(Clicked()), this, SLOT(prevPressed())); connect(m_locationEdit, SIGNAL(LosingFocus()), this, SLOT(locationEditLostFocus())); m_locationEdit->SetText(m_curDirectory); connect(m_backButton, SIGNAL(Clicked()), this, SLOT(backPressed())); connect(m_homeButton, SIGNAL(Clicked()), this, SLOT(homePressed())); connect(m_fileButtonList, SIGNAL(itemSelected(MythUIButtonListItem *)), this, SLOT(itemSelected(MythUIButtonListItem *))); connect(m_fileButtonList, SIGNAL(itemClicked(MythUIButtonListItem *)), this, SLOT(itemClicked(MythUIButtonListItem *))); BuildFocusList(); SetFocusWidget(m_fileButtonList); updateSelectedList(); updateFileList(); return true; }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { central = new QWidget(this); central->setContextMenuPolicy(Qt::NoContextMenu); // explicitly forbid usage of context menu so actions item is not shown menu setCentralWidget(central); // Create text editor and set softkeys to it textEditor= new QTextEdit(tr("Navigate in UI to see context sensitive softkeys in action"), this); QAction* clear = new QAction(tr("Clear"), this); clear->setSoftKeyRole(QAction::NegativeSoftKey); textEditor->addAction(clear); ok = new QAction(tr("Ok"), this); ok->setSoftKeyRole(QAction::PositiveSoftKey); connect(ok, SIGNAL(triggered()), this, SLOT(okPressed())); cancel = new QAction(tr("Cancel"), this); cancel->setSoftKeyRole(QAction::NegativeSoftKey); connect(cancel, SIGNAL(triggered()), this, SLOT(cancelPressed())); infoLabel = new QLabel(tr(""), this); infoLabel->setContextMenuPolicy(Qt::NoContextMenu); toggleButton = new QPushButton(tr("Custom"), this); toggleButton->setContextMenuPolicy(Qt::NoContextMenu); toggleButton->setCheckable(true); pushButton = new QPushButton(tr("File Dialog"), this); pushButton->setContextMenuPolicy(Qt::NoContextMenu); QComboBox* comboBox = new QComboBox(this); comboBox->setContextMenuPolicy(Qt::NoContextMenu); comboBox->insertItems(0, QStringList() << QApplication::translate("MainWindow", "Selection1", 0, QApplication::UnicodeUTF8) << QApplication::translate("MainWindow", "Selection2", 0, QApplication::UnicodeUTF8) << QApplication::translate("MainWindow", "Selection3", 0, QApplication::UnicodeUTF8) ); layout = new QGridLayout; layout->addWidget(textEditor, 0, 0, 1, 2); layout->addWidget(infoLabel, 1, 0, 1, 2); layout->addWidget(toggleButton, 2, 0); layout->addWidget(pushButton, 2, 1); layout->addWidget(comboBox, 3, 0, 1, 2); central->setLayout(layout); fileMenu = menuBar()->addMenu(tr("&File")); exit = new QAction(tr("&Exit"), this); fileMenu->addAction(exit); connect(clear, SIGNAL(triggered()), this, SLOT(clearTextEditor())); connect(pushButton, SIGNAL(clicked()), this, SLOT(openDialog())); connect(exit, SIGNAL(triggered()), this, SLOT(exitApplication())); connect(toggleButton, SIGNAL(clicked()), this, SLOT(setCustomSoftKeys())); pushButton->setFocus(); }
//-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- QStringList RicFileHierarchyDialog::buildDirectoryListRecursive(const QString& currentDir, int level) { QStringList allDirs; if (cancelPressed()) return allDirs; QString currPathFilter = pathFilter(); bool subStringFilter = false; // Optimizing for speed by a refined match at first directory level if (level == 1) { QString pathFilter = this->pathFilter(); if (!pathFilter.startsWith("*")) { int wildcardIndex = pathFilter.indexOf(QRegExp(QString("[*%1]").arg(SEPARATOR))); if (wildcardIndex >= 0) { currPathFilter = pathFilter.left(wildcardIndex + 1); subStringFilter = true; } } } QString currRelPath = RiaFilePathTools::relativePath(rootDir(), currentDir); if (pathFilterMatch(currPathFilter, currRelPath)) { allDirs.push_back(currentDir); } else if(level == 1 && subStringFilter) { return QStringList(); } QDir qdir(currentDir); QStringList subDirs = qdir.entryList(QDir::Dirs | QDir::NoDotAndDotDot); for (QString subDir : subDirs) { QString subDirFullPath = qdir.absoluteFilePath(subDir); updateStatus(SEARCHING_FOR_DIRS, subDirFullPath); QApplication::processEvents(); allDirs += buildDirectoryListRecursive(subDirFullPath, level + 1); } return cancelPressed() ? QStringList() : allDirs; }
/** * Class constructor. */ FileNameDialog::FileNameDialog(QWidget *parent): QDialog(parent), ui(new Ui::FileNameDialog), success(false) { ui->setupUi(this); connect(ui->cancelButton, SIGNAL(pressed()), this, SLOT(cancelPressed())); connect(ui->okButton, SIGNAL(pressed()), this, SLOT(okPressed())); }
void PropertyWidget::slotCancel() { // generate a focus out event for the child windows if (!hasFocus()) setFocus(); cancelPressed(); emit signalCancel(); }
EditGain::EditGain(QWidget* parent, int initGainValue) : QDialog(parent) { setupUi(this); sliderGain->setValue(sliderGain->maximum() - initGainValue); connect(buttonReset, SIGNAL(pressed()), this, SLOT(resetPressed())); connect(buttonApply, SIGNAL(pressed()), this, SLOT(applyPressed())); connect(buttonCancel, SIGNAL(pressed()), this, SLOT(cancelPressed())); connect(sliderGain, SIGNAL(valueChanged(int)), this, SLOT(gainChanged(int))); if (sliderGain->value() != 100) buttonReset->setEnabled(true); }
HighlightEditDialog::HighlightEditDialog(HighlightTextTab *textTab, QWidget *parent) : QDialog(parent), ui(new Ui::HighlightEditDialog) { ui->setupUi(this); parentDialog = (QDialog*)parent; settings = new HighlightSettings(); this->textTab = textTab; connect(ui->cancelButton, SIGNAL(clicked()), this, SLOT(cancelPressed())); connect(ui->okButton, SIGNAL(clicked()), this, SLOT(okPressed())); }
void ThumbFinder::ShowMenu() { MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); MythDialogBox *menuPopup = new MythDialogBox(tr("Menu"), popupStack, "actionmenu"); if (menuPopup->Create()) popupStack->AddScreen(menuPopup); menuPopup->SetReturnEvent(this, "action"); menuPopup->AddButton(tr("Exit, Save Thumbnails"), SLOT(savePressed())); menuPopup->AddButton(tr("Exit, Don't Save Thumbnails"), SLOT(cancelPressed())); }
bool RecordingSelector::Create(void) { bool foundtheme = false; // Load the theme for this screen foundtheme = LoadWindowFromXML("mytharchive-ui.xml", "recording_selector", this); if (!foundtheme) return false; bool err = false; UIUtilE::Assign(this, m_okButton, "ok_button", &err); UIUtilE::Assign(this, m_cancelButton, "cancel_button", &err); UIUtilE::Assign(this, m_categorySelector, "category_selector", &err); UIUtilE::Assign(this, m_recordingButtonList, "recordinglist", &err); UIUtilW::Assign(this, m_titleText, "progtitle", &err); UIUtilW::Assign(this, m_datetimeText, "progdatetime", &err); UIUtilW::Assign(this, m_descriptionText, "progdescription", &err); UIUtilW::Assign(this, m_filesizeText, "filesize", &err); UIUtilW::Assign(this, m_previewImage, "preview_image", &err); UIUtilW::Assign(this, m_cutlistImage, "cutlist_image", &err); if (err) { LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'recording_selector'"); return false; } connect(m_okButton, SIGNAL(Clicked()), this, SLOT(OKPressed())); connect(m_cancelButton, SIGNAL(Clicked()), this, SLOT(cancelPressed())); new MythUIButtonListItem(m_categorySelector, tr("All Recordings")); connect(m_categorySelector, SIGNAL(itemSelected(MythUIButtonListItem *)), this, SLOT(setCategory(MythUIButtonListItem *))); connect(m_recordingButtonList, SIGNAL(itemSelected(MythUIButtonListItem *)), this, SLOT(titleChanged(MythUIButtonListItem *))); connect(m_recordingButtonList, SIGNAL(itemClicked(MythUIButtonListItem *)), this, SLOT(toggleSelected(MythUIButtonListItem *))); if (m_cutlistImage) m_cutlistImage->Hide(); BuildFocusList(); SetFocusWidget(m_recordingButtonList); return true; }
void PProgress::setWidget(QObject *_f) /*FOLD00*/ { // debug("PProgress setWidget called"); if(_f != 0 && _f->inherits("KSProgress") == FALSE) throw(errorInvalidSet(_f, className())); ksp = (KSProgress *) _f; if(widget() != 0){ connect(widget(), SIGNAL(cancel()), this, SLOT(cancelPressed())); } PWidget::setWidget(ksp); }
HighlightDialog::HighlightDialog(QWidget *parent) : QDialog(parent), ui(new Ui::HighlightDialog) { ui->setupUi(this); mainWindow = (MainWindow*)qobject_cast<QObject *>(parent); settings = ClientSettings::Instance(); generalTab = new HighlightGeneralTab(this); textTab = new HighlightTextTab(this); alertTab = new HighlightAlertTab(this); connect(ui->okButton, SIGNAL(clicked()), this, SLOT(okPressed())); connect(ui->cancelButton, SIGNAL(clicked()), this, SLOT(cancelPressed())); connect(ui->applyButton, SIGNAL(clicked()), this, SLOT(applyPressed())); }
CaptchaDialog::CaptchaDialog(const QString& id, QWidget *p) : QDialog(p) , id_(id) { setAttribute(Qt::WA_DeleteOnClose); ui_.setupUi(this); toggleTEVisible(false); connect(ui_.buttonBox, SIGNAL(accepted()), SLOT(okPressed())); connect(ui_.buttonBox, SIGNAL(rejected()), SLOT(cancelPressed())); connect(ui_.cb_message, SIGNAL(toggled(bool)), SLOT(toggleTEVisible(bool))); ui_.le_answer->installEventFilter(this); }
void KornSubjectsDlg::deleteSubjectsStruct() { if(!_subjects) return; disconnect(_subjects->progress, SIGNAL(cancelPressed()), this, SLOT(slotSubjectsCanceled())); this->unsetCursor(); delete _subjects->progress; delete _subjects->subjects; delete _subjects->it; delete _subjects; _subjects = 0; }
bool KornSubjectsDlg::makeSubjectsStruct() { if(_subjects) //Subjects are already being checked return false; _subjects = new SubjectsData; _subjects->it = new QPtrListIterator< KMailDrop >(*_mailDrop); _subjects->subjects = new QValueVector< KornMailSubject >; _subjects->progress = new DoubleProgressDialog(this, "progress"); _subjects->atRechecking = true; connect(_subjects->progress, SIGNAL(cancelPressed()), this, SLOT(slotSubjectsCanceled())); return true; }
AppearanceDialog::AppearanceDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AppearanceDialog) { ui->setupUi(this); mainWindow = (MainWindow*)parent; windowFacade = mainWindow->getWindowFacade(); settings = new GeneralSettings(); this->populateMainBox(); this->populateDockBox(); this->loadSettings(); connect(ui->okButton, SIGNAL(clicked()), this, SLOT(okPressed())); connect(ui->applyButton, SIGNAL(clicked()), this, SLOT(applyPressed())); connect(ui->cancelButton, SIGNAL(clicked()), this, SLOT(cancelPressed())); }
bool CaptchaDialog::eventFilter(QObject *o, QEvent *e) { if(o == ui_.le_answer && e->type() == QEvent::KeyPress) { QKeyEvent *ke = static_cast<QKeyEvent*>(e); if(ke->key() == Qt::Key_Escape) { cancelPressed(); return true; } else if(ke->key() == Qt::Key_Enter) { okPressed(); return true; } } return QDialog::eventFilter(o,e); }
void KornSubjectsDlg::prepareStep2Subjects(KMailDrop *drop) { _subjects->progress->setText(i18n("Fetching messages...")); _subjects->atRechecking = false; connect(drop, SIGNAL(readSubject(KornMailSubject *)), this, SLOT(subjectAvailable(KornMailSubject *))); connect(drop, SIGNAL(readSubjectsReady(bool)), this, SLOT(subjectsReady(bool))); connect(drop, SIGNAL(readSubjectsTotalSteps(int)), _subjects->progress, SLOT(setNumberOfSteps(int))); connect(drop, SIGNAL(readSubjectsProgress(int)), _subjects->progress, SLOT(setProgress(int))); connect(_subjects->progress, SIGNAL(cancelPressed()), drop, SLOT(readSubjectsCanceled())); if(_subjects->it->current()->canReadSubjects()) _subjects->it->current()->readSubjects(0); else subjectsReady(true); }
FunctionDialog::FunctionDialog(QWidget *parent) : QDialog(parent), m_ui(new Ui::FunctionDialog) { m_ui->setupUi(this); m_numParam = -1; m_prototype = new QString(); m_ui->funcType->setFocus(); connect(m_ui->addParam, SIGNAL(clicked()), this, SLOT(addParam())); connect(m_ui->removeParam, SIGNAL(clicked()), this, SLOT(removeParam())); connect(m_ui->buttonBox, SIGNAL(accepted()), this, SLOT(okPressed())); connect(m_ui->buttonBox, SIGNAL(rejected()), this, SLOT(cancelPressed())); }
ConfigurationDialog::ConfigurationDialog(const CFGManager *cfg, QWidget *parent) : Dialog("Configuration", "", parent) { this->cfg = cfg; setFixedSize(350, 500); text->hide(); connect(cfg, SIGNAL(errorMessage(QString)), this, SLOT(showMessage(QString))); connect(this, SIGNAL(okPressed()), this, SLOT(accept())); connect(this, SIGNAL(okPressed()), cfg, SLOT(saveDoc())); connect(this, SIGNAL(cancelPressed()), cfg, SLOT(undoDoc())); tabs = new QTabWidget(); mainLayout->addWidget(tabs, 4, 0, 1, 4); createDatabaseTab(); createSpreadSheetTab(); createSecurityTab(); }
AppearanceDialog::AppearanceDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AppearanceDialog) { ui->setupUi(this); mainWindow = (MainWindow*)parent; windowFacade = mainWindow->getWindowFacade(); commandLine = mainWindow->getCommandLine(); roundTimeDisplay = commandLine->getRoundtimeDisplay(); settings = GeneralSettings::getInstance(); this->populateMainBox(); this->populateDockBox(); this->populateCmdBox(); this->loadSettings(); connect(ui->okButton, SIGNAL(clicked()), this, SLOT(okPressed())); connect(ui->applyButton, SIGNAL(clicked()), this, SLOT(applyPressed())); connect(ui->cancelButton, SIGNAL(clicked()), this, SLOT(cancelPressed())); }
ScriptEditDialog::ScriptEditDialog(QWidget *parent) : QDialog(parent), ui(new Ui::ScriptEditDialog) { ui->setupUi(this); completer = new QCompleter(this); model = new QStringListModel(); scriptPath.setPath(QApplication::applicationDirPath() + "/scripts"); #ifdef Q_OS_WIN notepadPath.setPath("notepad"); #elif defined(Q_OS_LINUX) notepadPath.setPath("gedit"); #elif defined(Q_OS_MAC) notepadPath.setPath("open -t"); #endif connect(ui->okButton, SIGNAL(clicked()), this, SLOT(okPressed())); connect(ui->cancelButton, SIGNAL(clicked()), this, SLOT(cancelPressed())); }
bool MythUIFileBrowser::Create() { if (!CopyWindowFromBase(m_widgetName, this)) return false; m_fileList = dynamic_cast<MythUIButtonList *>(GetChild("filelist")); m_locationEdit = dynamic_cast<MythUITextEdit *>(GetChild("location")); m_okButton = dynamic_cast<MythUIButton *>(GetChild("ok")); m_cancelButton = dynamic_cast<MythUIButton *>(GetChild("cancel")); m_backButton = dynamic_cast<MythUIButton *>(GetChild("back")); m_homeButton = dynamic_cast<MythUIButton *>(GetChild("home")); m_previewImage = dynamic_cast<MythUIImage *>(GetChild("preview")); m_infoText = dynamic_cast<MythUIText *>(GetChild("info")); m_filenameText = dynamic_cast<MythUIText *>(GetChild("filename")); m_fullpathText = dynamic_cast<MythUIText *>(GetChild("fullpath")); if (!m_fileList || !m_locationEdit || !m_okButton || !m_cancelButton) { LOG(VB_GENERAL, LOG_ERR, "MythUIFileBrowser: Your theme is missing" " some UI elements! Bailing out."); return false; } connect(m_fileList, SIGNAL(itemClicked(MythUIButtonListItem *)), SLOT(PathClicked(MythUIButtonListItem *))); connect(m_fileList, SIGNAL(itemSelected(MythUIButtonListItem *)), SLOT(PathSelected(MythUIButtonListItem *))); connect(m_locationEdit, SIGNAL(LosingFocus()), SLOT(editLostFocus())); connect(m_okButton, SIGNAL(Clicked()), SLOT(OKPressed())); connect(m_cancelButton, SIGNAL(Clicked()), SLOT(cancelPressed())); if (m_backButton) connect(m_backButton, SIGNAL(Clicked()), SLOT(backPressed())); if (m_homeButton) connect(m_homeButton, SIGNAL(Clicked()), SLOT(homePressed())); BuildFocusList(); updateFileList(); return true; }
NewCHEInfoDialog::NewCHEInfoDialog() { okButton = new QPushButton("OK"); connect(okButton, SIGNAL(clicked()), this, SLOT(okPressed())); backButton = new QPushButton("Back"); connect(backButton, SIGNAL(clicked()), this, SLOT(backPressed())); cancelButton = new QPushButton("Cancel"); connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancelPressed())); mHBox->addWidget(okButton, 0, Qt::AlignRight); mHBox->addWidget(backButton, 0, Qt::AlignRight); mHBox->addWidget(cancelButton, 0, Qt::AlignRight); mVBox->addLayout(mGrid); mVBox->addLayout(mHBox); mDialog->setLayout(mVBox); mDialog->setMinimumWidth(350); mDialog->adjustSize(); }
bool ThumbFinder::Create(void) { bool foundtheme = false; // Load the theme for this screen foundtheme = LoadWindowFromXML("mythburn-ui.xml", "thumbfinder", this); if (!foundtheme) return false; bool err = false; UIUtilE::Assign(this, m_frameImage, "frameimage", &err); UIUtilE::Assign(this, m_positionImage, "positionimage", &err); UIUtilE::Assign(this, m_imageGrid, "thumblist", &err); UIUtilE::Assign(this, m_saveButton, "save_button", &err); UIUtilE::Assign(this, m_cancelButton, "cancel_button", &err); UIUtilE::Assign(this, m_frameButton, "frame_button", &err); UIUtilE::Assign(this, m_seekAmountText, "seekamount", &err); UIUtilE::Assign(this, m_currentPosText, "currentpos", &err); if (err) { VERBOSE(VB_IMPORTANT, "Cannot load screen 'mythburn'"); return false; } connect(m_imageGrid, SIGNAL(itemSelected(MythUIButtonListItem *)), this, SLOT(gridItemChanged(MythUIButtonListItem *))); connect(m_saveButton, SIGNAL(Clicked()), this, SLOT(savePressed())); connect(m_cancelButton, SIGNAL(Clicked()), this, SLOT(cancelPressed())); connect(m_frameButton, SIGNAL(Clicked()), this, SLOT(updateThumb())); BuildFocusList(); SetFocusWidget(m_imageGrid); return true; }
bool EditMetadataDialog::Create(void) { bool foundtheme = false; // Load the theme for this screen foundtheme = LoadWindowFromXML("mythburn-ui.xml", "edit_metadata", this); if (!foundtheme) return false; bool err = false; UIUtilE::Assign(this, m_titleEdit, "title_edit", &err); UIUtilE::Assign(this, m_subtitleEdit, "subtitle_edit", &err); UIUtilE::Assign(this, m_descriptionEdit, "description_edit", &err); UIUtilE::Assign(this, m_starttimeEdit, "starttime_edit", &err); UIUtilE::Assign(this, m_startdateEdit, "startdate_edit", &err); UIUtilE::Assign(this, m_okButton, "ok_button", &err); UIUtilE::Assign(this, m_cancelButton, "cancel_button", &err); if (err) { LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'edit_metadata'"); return false; } connect(m_okButton, SIGNAL(Clicked()), this, SLOT(okPressed())); connect(m_cancelButton, SIGNAL(Clicked()), this, SLOT(cancelPressed())); m_titleEdit->SetText(m_sourceMetadata->title); m_subtitleEdit->SetText(m_sourceMetadata->subtitle); m_descriptionEdit->SetText(m_sourceMetadata->description); m_startdateEdit->SetText(m_sourceMetadata->startDate); m_starttimeEdit->SetText(m_sourceMetadata->startTime); BuildFocusList(); SetFocusWidget(m_titleEdit); return true; }