Ejemplo n.º 1
0
void TB_TeamBody::restoreAdvancedState()
{
    QSettings settings;

    if (settings.value("advanced_open").toBool()) {
        advancedClicked(0, settings.value("advanced_separate_window").toBool());
    }
}
Ejemplo n.º 2
0
JIDSearch::JIDSearch(QWidget *parent, JabberClient *client, const QString &jid,
                     const QString &node, const char *type)
        : JIDSearchBase(parent)
{
    m_client = client;
    m_jid    = jid;
    m_node	 = node;
    if (type)
        m_type	 = type;
    connect(btnBrowser, SIGNAL(clicked()), this, SLOT(browserClicked()));
    connect(btnAdvanced, SIGNAL(clicked()), this, SLOT(advancedClicked()));
    const QIconSet *is = Icon("1rightarrow");
    if (is){
        btnBrowser->setIconSet(*is);
        btnAdvanced->setIconSet(*is);
    }
    m_bInit = false;
    m_adv = new JIDAdvSearch(this);
    jidSearch->setAdvanced(m_adv);
    m_bAdv = false;
}
NovellVpnSettingWidget::NovellVpnSettingWidget(Knm::Connection * connection, QWidget * parent)
: SettingWidget(connection, parent), d(new Private)
{
    setValid(false);
    d->ui.setupUi(this);
    d->ui.x509Cert->setMode(KFile::LocalOnly);
    d->setting = static_cast<Knm::VpnSetting *>(connection->setting(Knm::Setting::Vpn));

    connect(d->ui.leGateway, SIGNAL(textChanged(QString)), this, SLOT(validate()));
    connect(d->ui.cbShowPasswords, SIGNAL(toggled(bool)), this, SLOT(showPasswordsChanged(bool)));

    connect(d->ui.cmbGwType, SIGNAL(currentIndexChanged(int)), this, SLOT(gatewayTypeChanged(int)));

    connect(d->ui.btnAdvanced, SIGNAL(clicked()), this, SLOT(advancedClicked()));

    d->advancedDialog = new KDialog(this);
    d->advancedDialog->setButtons(KDialog::Ok);
    d->advancedDialog->setCaption(i18nc("@window:title NovellVPN advanced connection options", "NovellVPN advanced options"));
    QWidget * advWid = new QWidget(d->advancedDialog);
    d->advUi.setupUi(advWid);
    d->advancedDialog->setMainWidget(advWid);
}
Ejemplo n.º 4
0
void TB_TeamBody::advancedClicked(bool separateWindow)
{
    advancedClicked(body->currentWidget()->property("num").toInt(), separateWindow);
}
Ejemplo n.º 5
0
CustomToolBarPropertiesDialog::CustomToolBarPropertiesDialog(QWidget * p,const QString &szText,const QString &szId,const QString &szLabel,const QString &szIconId)
: QDialog(p)
{
	m_szId = szId;
	m_szOriginalId = szId;
	m_szLabel = szLabel;

	setWindowTitle(__tr2qs_ctx("ToolBar Properties","editor"));
	setWindowIcon(QIcon(*(g_pIconManager->getSmallIcon(KviIconManager::ToolBar))));
	setModal(true);

	QGridLayout * g = new QGridLayout(this);

	QLabel * l = new QLabel(szText,this);
	g->addWidget(l,0,0,1,6);

	l = new QLabel(__tr2qs_ctx("Label","editor") + ":",this);
	g->addWidget(l,1,0);

	m_pLabelEdit = new QLineEdit(this);
	g->addWidget(m_pLabelEdit,1,1,1,5);
	m_pLabelEdit->setText(szLabel);
	connect(m_pLabelEdit,SIGNAL(textChanged(const QString &)),this,SLOT(labelTextChanged(const QString &)));

	l = new QLabel(__tr2qs_ctx("Icon","editor") + ":",this);
	g->addWidget(l,2,0);

	m_pIconEdit = new QLineEdit(this);
	m_pIconEdit->setReadOnly(true);
	g->addWidget(m_pIconEdit,2,1,1,4);

	m_pIconButton = new QPushButton(this);
	g->addWidget(m_pIconButton,2,5,1,1);
	connect(m_pIconButton,SIGNAL(clicked()),this,SLOT(iconButtonClicked()));

	iconSelected(szIconId);

	m_pAdvanced = new QWidget(this);
	QGridLayout * ag = new QGridLayout(m_pAdvanced);

	l = new QLabel(__tr2qs_ctx("Id","editor") + ":",m_pAdvanced);
	l->setMinimumWidth(100);
	ag->addWidget(l,0,0);

	m_pIdEdit = new QLineEdit(m_pAdvanced);
	ag->addWidget(m_pIdEdit,0,1);
	ag->setRowStretch(0,1);

	m_pIdEdit->setText(szId);

	g->addWidget(m_pAdvanced,3,0,1,6);
	m_pAdvanced->hide();

	m_pLabelEdit->setFocus();

	QPushButton * pb = new QPushButton(__tr2qs_ctx("OK","editor"),this);
	connect(pb,SIGNAL(clicked()),this,SLOT(okClicked()));
	pb->setMinimumWidth(80);
	g->addWidget(pb,4,4,1,2);

	pb = new QPushButton(__tr2qs_ctx("Cancel","editor"),this);
	connect(pb,SIGNAL(clicked()),this,SLOT(reject()));
	pb->setMinimumWidth(80);
	g->addWidget(pb,4,3);

	m_pAdvancedButton = new QPushButton(__tr2qs_ctx("Advanced...","editor"),this);
	connect(m_pAdvancedButton,SIGNAL(clicked()),this,SLOT(advancedClicked()));
	m_pAdvancedButton->setMinimumWidth(100);
	g->addWidget(m_pAdvancedButton,4,0,1,2);

	g->setRowStretch(0,1);
	g->setColumnStretch(2,1);
}