예제 #1
0
ComboboxFieldWizard::ComboboxFieldWizard(const QString &fieldName,
                                         QWidget *parent,
                                         AbstractFieldWizard::EditMode editMode) :
    AbstractFieldWizard(fieldName, parent, editMode),
    ui(new Ui::ComboboxFieldWizard),
    m_default(-1)
{
    ui->setupUi(this);

    connect(ui->backButton, SIGNAL(clicked()),
            this, SIGNAL(backSignal()));
    connect(ui->finishButton, SIGNAL(clicked()),
            this, SLOT(finishButtonClicked()));
    connect(ui->addItemButton, SIGNAL(clicked()),
            this, SLOT(addItemButtonClicked()));
    connect(ui->renameItemButton, SIGNAL(clicked()),
            this, SLOT(renameItemButtonClicked()));
    connect(ui->removeItemButton, SIGNAL(clicked()),
            this, SLOT(removeItemButtonClicked()));
    connect(ui->itemsListWidget, SIGNAL(itemSelectionChanged()),
            this, SLOT(updateListButtons()));
    connect(ui->itemsListWidget, SIGNAL(itemChanged(QListWidgetItem*)),
            this, SLOT(updateFinishButton()));
    connect(ui->itemsListWidget, SIGNAL(itemChanged(QListWidgetItem*)),
            this, SLOT(updateDefaultComboBox()));
    connect(ui->defaultCombo, SIGNAL(activated(int)),
            this, SLOT(defaultItemChanged()));
    connect(ui->clearDefaultButton, SIGNAL(clicked()),
            this, SLOT(clearDefaultItemSlot()));
}
예제 #2
0
AddFeedWizard::AddFeedWizard(QWidget *parent, int curFolderId)
  : QWizard(parent),
    curFolderId_(curFolderId)
{
  setWindowFlags (windowFlags() & ~Qt::WindowContextHelpButtonHint);
  setWindowTitle(tr("Add Feed"));
  setWizardStyle(QWizard::ModernStyle);
  setOptions(QWizard::HaveFinishButtonOnEarlyPages |
             QWizard::NoBackButtonOnStartPage);

  addPage(createUrlFeedPage());
  addPage(createNameFeedPage());

  updateFeeds_ = new UpdateFeeds(this, true);

  connect(button(QWizard::BackButton), SIGNAL(clicked()),
          this, SLOT(backButtonClicked()));
  connect(button(QWizard::NextButton), SIGNAL(clicked()),
          this, SLOT(nextButtonClicked()));
  connect(button(QWizard::FinishButton), SIGNAL(clicked()),
          this, SLOT(finishButtonClicked()));
  connect(this, SIGNAL(currentIdChanged(int)),
          SLOT(slotCurrentIdChanged(int)),
          Qt::QueuedConnection);
  resize(400, 300);

  Settings settings;
  restoreGeometry(settings.value("addFeedWizard/geometry").toByteArray());
}
예제 #3
0
KviTalWizard::KviTalWizard(QWidget * pParent)
: QDialog(pParent)
{
	m_p = new KviTalWizardPrivate;
	m_p->pPageList = new KviPointerList<KviTalWizardPageData>;
	m_p->pPageList->setAutoDelete(true);
	m_p->pCurrentPage = NULL;
	m_p->iEnabledPageCount = 0;
	m_p->pLayout = new QGridLayout(this);

	m_p->pTitleLabel = new QLabel(this);
	m_p->pLayout->addWidget(m_p->pTitleLabel,0,0,1,3);

	m_p->pStepsLabel = new QLabel(this);
	m_p->pStepsLabel->setMinimumWidth(80);
	m_p->pStepsLabel->setAlignment(Qt::AlignRight);
	m_p->pLayout->addWidget(m_p->pStepsLabel,0,4,1,3);

	QFrame * f1 = new QFrame(this);
	f1->setFrameStyle(QFrame::Sunken | QFrame::HLine);
	m_p->pLayout->addWidget(f1,1,0,1,7);

	m_p->pWidgetStack = new QStackedWidget(this);
	m_p->pLayout->addWidget(m_p->pWidgetStack,2,0,1,7);

	QFrame * f2 = new QFrame(this);
	f2->setFrameStyle(QFrame::Sunken | QFrame::HLine);
	m_p->pLayout->addWidget(f2,3,0,1,7);

	KviTalHBox * pButtonBox = new KviTalHBox(this);
	m_p->pLayout->addWidget(pButtonBox,4,0,1,7);

	pButtonBox->setMargin(0);
	pButtonBox->setSpacing(0);


	m_p->pCancelButton = new QPushButton(__tr("Cancel"),pButtonBox);
	m_p->pCancelButton->setMinimumWidth(80);
	QObject::connect(
			m_p->pCancelButton,
			SIGNAL(clicked()),
			this,
			SLOT(cancelButtonClicked())
		);

	QWidget * pSpacer = new QWidget(pButtonBox);
	pSpacer->setFixedWidth(4);

	m_p->pHelpButton = new QPushButton(__tr("Help"),pButtonBox);
	m_p->pHelpButton->setMinimumWidth(80);
	QObject::connect(
			m_p->pHelpButton,
			SIGNAL(clicked()),
			this,
			SLOT(helpButtonClicked())
		);

	QWidget * pLargeSpacer = new QWidget(pButtonBox);
	pLargeSpacer->setMinimumWidth(50);
	pButtonBox->setStretchFactor(pLargeSpacer,100);

	QString szText = "< ";
	szText += __tr("Back");
	m_p->pBackButton = new QPushButton(szText,pButtonBox);
	m_p->pBackButton->setMinimumWidth(80);
	QObject::connect(
			m_p->pBackButton,
			SIGNAL(clicked()),
			this,
			SLOT(backButtonClicked())
		);

	m_p->pNextSpacer = new QWidget(pButtonBox);
	m_p->pNextSpacer->setFixedWidth(4);

	szText = __tr("Next");
	szText += " >";
	m_p->pNextButton = new QPushButton(szText,pButtonBox);
	m_p->pNextButton->setMinimumWidth(80);
	QObject::connect(
			m_p->pNextButton,
			SIGNAL(clicked()),
			this,
			SLOT(nextButtonClicked())
		);

	m_p->pFinishSpacer = new QWidget(pButtonBox);
	m_p->pFinishSpacer->setFixedWidth(4);

	m_p->pFinishButton = new QPushButton(__tr("Finish"),pButtonBox);
	m_p->pFinishButton->setMinimumWidth(80);
	QObject::connect(
			m_p->pFinishButton,
			SIGNAL(clicked()),
			this,
			SLOT(finishButtonClicked())
		);

	m_p->pLayout->setMargin(8);
	m_p->pLayout->setSpacing(4);
	m_p->pLayout->setRowStretch(2,1);
	m_p->pLayout->setColumnStretch(0,1);
}