Beispiel #1
0
IrcConnectionWizard::IrcConnectionWizard(QWidget *parent, Qt::WindowFlags flags)
    : QWizard(parent, flags),
    _introductionPage(0),
    _identityPage(0),
    _networkPage(0)
{
    _introductionPage = createIntroductionPage(this);
    _identityPage = new IdentityPage(this);
    _networkPage = new NetworkPage(this);

    addPage(_introductionPage);
    addPage(_identityPage);
    addPage(_networkPage);

    setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);

    setOptions(options() | (QWizard::WizardOptions)(QWizard::NoDefaultButton | QWizard::CancelButtonOnLeft));
    setOption(QWizard::NoCancelButton, false);

    connect(button(QWizard::FinishButton), SIGNAL(clicked()), this, SLOT(finishClicked()));
    setButtonText(QWizard::FinishButton, tr("Save && Connect"));
}
Beispiel #2
0
ICQSearchResult::ICQSearchResult(QWidget *parent, ICQClient *client)
        : ICQSearchResultBase(parent)
{
    m_id1 = SEARCH_DONE;
    m_id2 = SEARCH_DONE;
    m_nFound = 0;
    m_client = client;
    int wChar = QFontMetrics(font()).width('0');
    tblUser->addColumn("", -10*wChar);
    tblUser->setColumnAlignment(0, AlignRight);
    tblUser->addColumn(i18n("Alias"), 20*wChar);
    tblUser->addColumn(i18n("Name"));
    tblUser->setExpandingColumn(COL_NAME);
    tblUser->setSorting(COL_SCREEN);
    tblUser->setMenu(MenuSearchResult);
    tblUser->header()->hide();
    connect(tblUser, SIGNAL(dragStart()), this, SLOT(dragStart()));
    connect(tblUser, SIGNAL(doubleClicked(QListViewItem*)), this, SLOT(doubleClicked(QListViewItem*)));
	connect(tblUser, SIGNAL(selectionChanged()), this, SLOT(selectChanged()));
    QWizard *wizard = static_cast<QWizard*>(topLevelWidget());
    wizard->setFinishEnabled(this, false);
	connect(wizard->finishButton(), SIGNAL(clicked()), this, SLOT(finishClicked()));
}
ConnectionWizard::ConnectionWizard(bool o, StrGlobal *g, RouteInfo *r)
	: ConnectionWizardBase()
{
	out = o;
	global = g;
	route = *r;
	rptr = r;
	
	rtype = None;
	pto = NULL;
	
	RSItemIO *io = r->getToIO();
	
	if (io)
	{
		RSItemBaseWithType *owner = (RSItemBaseWithType *)io->getOwner();
		switch (owner->type())
		{
			case RSItemBaseWithType::In:
				rtype = In;
				break;
			case RSItemBaseWithType::Out:
				rtype = Out;
				break;
			case RSItemBaseWithType::FX:
				rtype = FX;
				break;
			case RSItemBaseWithType::Patch:
				if (io->isOutput())
					rtype = POut;
				else
					rtype = PIn;
				pto = (StrPatch *)owner;
				break;
			default:
				break;
		}
	}

	if (!out)
	{
		rbOutput->hide();
	}
	else
	{
		rbFX->hide();
		rbInput->hide();
	}
	
	StrPatch *patch;
	
	lbPatch->clear();
	for(patch = global->Patches.first(); patch; patch = global->Patches.next() )
	{
		lbPatch->insertItem(patch->name());
		patchList.append(patch);
	}
	
	connect(rbNone, SIGNAL(clicked()), this, SLOT(noneClicked()));
	connect(rbFX, SIGNAL(clicked()), this, SLOT(fxClicked()));
	connect(rbInput, SIGNAL(clicked()), this, SLOT(inClicked()));
	connect(rbOutput, SIGNAL(clicked()), this, SLOT(outClicked()));
	connect(rbPatch, SIGNAL(clicked()), this, SLOT(patchClicked()));
	
	connect(lbPatch, SIGNAL(clicked(QListBoxItem *)), this, SLOT(patchListClicked(QListBoxItem *)));
	connect(lbEnd, SIGNAL(clicked(QListBoxItem *)), this, SLOT(endListClicked(QListBoxItem *)));
	
	connect(finishButton(), SIGNAL(clicked()), this, SLOT(finishClicked()));
	
	connect(this, SIGNAL(selected(const QString &)), this, SLOT(selected(const QString &)));
	helpButton()->hide();
	
	setFinishEnabled(pageType, true);
	setNextEnabled(pageType, true);
	setFinishEnabled(pagePatch, true);
	setNextEnabled(pagePatch, true);
	setFinishEnabled(pageEnd, true);
	setNextEnabled(pageEnd, true);
}