void NewGalleryWizard::setupUi() { setWindowTitle(tr("Create a new gallery")); setDefaultProperty("QComboBox", "currentText", "currentIndexChanged()"); setOption(QWizard::DisabledBackButtonOnLastPage); addPage(new GWidgets::GWizard::WelcomePage); m_selectionPage = addPage(new GWidgets::GWizard::SelectionPage); addPage(new GWidgets::GWizard::SummaryPage); m_copyPage = addPage(new GWidgets::GWizard::CopyPage); addPage(new GWidgets::GWizard::FinishPage); setPixmap(QWizard::LogoPixmap, QPixmap(":/images/galerist.png").scaled(55, 55, Qt::KeepAspectRatio)); setPixmap(QWizard::BannerPixmap, QPixmap(":/images/newgallerywizard-banner.png")); setPixmap(QWizard::BackgroundPixmap, QPixmap(":/images/galerist-big.png")); #ifdef Q_WS_X11 setWizardStyle(QWizard::ModernStyle); #endif if (wizardStyle() == QWizard::MacStyle) setFixedSize(770, 570); else setFixedSize(580, 570); }
crmaccountMerge::crmaccountMerge(QWidget* parent, const char* name, Qt::WFlags fl) : QWizard(parent, fl) { setupUi(this); if (name) setObjectName(name); _data = new crmaccountMergePrivate(this); QPixmap *pixmap = new QPixmap(":/images/icon128x32.png"); if (pixmap) { #ifdef Q_WS_MAC setPixmap(BackgroundPixmap, *pixmap); #else setPixmap(BannerPixmap, *pixmap); #endif } QWizardPage *picktaskpage = new CrmaccountMergePickTaskPage(this); QWizardPage *pickacctpage = new CrmaccountMergePickAccountsPage(this); QWizardPage *pickdatapage = new CrmaccountMergePickDataPage(this); QWizardPage *mergerespage = new CrmaccountMergeResultPage(this); QWizardPage *mergeprgpage = new CrmaccountMergePurgePage(this); setPage(Page_PickTask, picktaskpage); setPage(Page_PickAccounts, pickacctpage); setPage(Page_PickData, pickdatapage); setPage(Page_Result, mergerespage); setPage(Page_Purge, mergeprgpage); setButtonText(CancelButton, tr("Close")); setDefaultProperty("XComboBox", "text", SIGNAL(currentIndexChanged(QString))); connect(mergeprgpage, SIGNAL(mergeSetChanged()), picktaskpage, SLOT(sUpdateComboBoxes())); connect(mergeprgpage, SIGNAL(mergeSetChanged()), mergerespage, SLOT(clearIfPurged())); }
PackThemeDialog::PackThemeDialog(QWidget * pParent, KviPointerList<KviThemeInfo> * pThemeInfoList) : QWizard(pParent) { setWindowTitle(__tr2qs_ctx("Export Theme - KVIrc","theme")); setMinimumSize(400,350); setDefaultProperty("QTextEdit","plainText",SIGNAL(textChanged())); m_pThemeInfoList = pThemeInfoList; QPixmap * pSide = g_pIconManager->getBigIcon("kvi_setup_label.png"); QPixmap * pLogo = g_pIconManager->getBigIcon("kvi_bigicon_addons.png"); #if defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW) #if (_WIN32_WINNT >= 0x0600) // We are on a Windows Vista / Seven // It will fallback to XP if alpha compositing is disabled setWizardStyle(QWizard::AeroStyle); #else // Windows XP setWizardStyle(QWizard::ModernStyle); setPixmap(QWizard::WatermarkPixmap,*pSide); setPixmap(QWizard::LogoPixmap,*pLogo); #endif #elif defined(COMPILE_ON_MAC) setWizardStyle(QWizard::MacStyle); setPixmap(QWizard::BackgroundPixmap,*pSide); #else // All other systems setWizardStyle(QWizard::ClassicStyle); setPixmap(QWizard::WatermarkPixmap,*pSide); setPixmap(QWizard::LogoPixmap,*pLogo); #endif // Add a default property for file selectors setDefaultProperty("KviFileSelector","tmpFile",SIGNAL(selectionChanged(const QString &))); // Welcome page QWizardPage * pPage = new QWizardPage(this); QVBoxLayout * pLayout = new QVBoxLayout(pPage); pPage->setLayout(pLayout); pPage->setTitle(__tr2qs_ctx("Welcome","theme")); QString szText = "<p>"; szText += __tr2qs_ctx("This procedure allows you to export the selected themes to a single package. It is useful when you want to distribute your themes to the public.","theme"); szText += "</p><p>"; szText += __tr2qs_ctx("You will be asked to provide a package name, a description and, if you want, an icon/screenshot.","theme"); szText += "</p><p>"; szText += __tr2qs_ctx("Hit the \"Next\" button to begin.","theme"); szText += "<p>"; QLabel * pLabel = new QLabel(pPage); pLabel->setWordWrap(true); pLabel->setText(szText); pLayout->addWidget(pLabel); addPage(pPage); // Theme data m_pPackThemeDataWidget = new PackThemeDataWidget(this); addPage(m_pPackThemeDataWidget); // Packager information m_pPackThemeInfoWidget = new PackThemeInfoWidget(this); addPage(m_pPackThemeInfoWidget); // Screenshot/logo/icon m_pPackThemeImageWidget = new PackThemeImageWidget(this); addPage(m_pPackThemeImageWidget); // Save file name m_pPackThemeSaveWidget = new PackThemeSaveWidget(this); addPage(m_pPackThemeSaveWidget); //last thing to do before starting m_pPackThemeDataWidget->parseThemes(m_pThemeInfoList); }