void ImageSliceIO::load ( UcharGridData& data ) { QDir sliceDataDir ( QString::fromStdString ( _dirPath ) ); QStringList filters; filters << "*.bmp" << "*.dib" << "*.jpeg" << "*.jpg" << "*.jpe" << "*.jp2" << "*.png" << "*.pbm" << "*.pgm" << "*.ppm" << "*.sr" << "*.ras" << "*.tiff" << "*.tif"; sliceDataDir.setFilter ( QDir::Files ); sliceDataDir.setNameFilters ( filters ); QStringList imageNames = sliceDataDir.entryList(); qDebug() << imageNames; QStringList imageFiles; int depth = imageNames.length(); for ( int z = 0; z < depth; z++ ) { QString imageFile = sliceDataDir.absoluteFilePath ( imageNames[z] ); imageFiles << imageFile; } initialLoad ( depth, imageFiles[0].toStdString(), data ); for ( int z = 0; z < depth; z++ ) { QString imageFile = imageFiles[z]; loadDepth ( z, imageFile.toStdString(), data ); } }
bool ImportIconsWizard::Create() { if (!initialLoad(m_strChannelname)) return false; bool foundtheme = false; // Load the theme for this screen foundtheme = LoadWindowFromXML("config-ui.xml", "iconimport", this); if (!foundtheme) return false; m_iconsList = dynamic_cast<MythUIButtonList *>(GetChild("icons")); m_manualEdit = dynamic_cast<MythUITextEdit *>(GetChild("manualsearch")); m_nameText = dynamic_cast<MythUIText *>(GetChild("name")); m_manualButton = dynamic_cast<MythUIButton *>(GetChild("search")); m_skipButton = dynamic_cast<MythUIButton *>(GetChild("skip")); m_statusText = dynamic_cast<MythUIText *>(GetChild("status")); m_preview = dynamic_cast<MythUIImage *>(GetChild("preview")); m_previewtitle = dynamic_cast<MythUIText *>(GetChild("previewtitle")); if (!m_iconsList || !m_manualEdit || !m_nameText || !m_manualButton || !m_skipButton || !m_statusText) { LOG(VB_GENERAL, LOG_ERR, "Unable to load window 'iconimport', missing required element(s)"); return false; } m_nameText->SetEnabled(false); m_nameText->SetHelpText(tr("Name of the icon file")); m_iconsList->SetHelpText(tr("List of possible icon files")); m_manualEdit->SetHelpText(tr("Enter text here for the manual search")); m_manualButton->SetHelpText(tr("Manually search for the text")); m_skipButton->SetHelpText(tr("Skip this icon")); connect(m_manualButton, SIGNAL(Clicked()), SLOT(manualSearch())); connect(m_skipButton, SIGNAL(Clicked()), SLOT(skip())); connect(m_iconsList, SIGNAL(itemClicked(MythUIButtonListItem *)), SLOT(menuSelection(MythUIButtonListItem *))); connect(m_iconsList, SIGNAL(itemSelected(MythUIButtonListItem *)), SLOT(itemChanged(MythUIButtonListItem *))); BuildFocusList(); enableControls(STATE_NORMAL); return true; }
void ImportIconsWizard::Load() { if (!initialLoad(m_strChannelname)) Close(); }