Esempio n. 1
0
Q3GroupBox::Q3GroupBox(int strips, Qt::Orientation orientation,
                    QWidget *parent, const char *name)
    : QGroupBox(parent, name)
{
    init();
    setColumnLayout(strips, orientation);
}
QGroupBox::QGroupBox( int strips, Orientation orientation,
                      const QString &title, QWidget *parent,
                      const char *name )
    : QFrame( parent, name )
{
    init();
    setTitle( title );
    setColumnLayout( strips, orientation );
}
Esempio n. 3
0
DomainListView::DomainListView(KConfig *config,const QString &title,
		QWidget *parent,const char *name) :
	QGroupBox(title, parent, name), config(config) {
  setColumnLayout(0, Qt::Vertical);
  layout()->setSpacing(0);
  layout()->setMargin(0);
  QGridLayout* thisLayout = new QGridLayout(layout());
  thisLayout->setAlignment(Qt::AlignTop);
  thisLayout->setSpacing(KDialog::spacingHint());
  thisLayout->setMargin(KDialog::marginHint());

  domainSpecificLV = new KListView(this);
  domainSpecificLV->addColumn(i18n("Host/Domain"));
  domainSpecificLV->addColumn(i18n("Policy"), 100);
  connect(domainSpecificLV,SIGNAL(doubleClicked(QListViewItem *)), SLOT(changePressed()));
  connect(domainSpecificLV,SIGNAL(returnPressed(QListViewItem *)), SLOT(changePressed()));
  connect(domainSpecificLV, SIGNAL( executed( QListViewItem *)), SLOT( updateButton()));
  connect(domainSpecificLV, SIGNAL(selectionChanged()), SLOT(updateButton()));
  thisLayout->addMultiCellWidget(domainSpecificLV, 0, 5, 0, 0);

  addDomainPB = new QPushButton(i18n("&New..."), this);
  thisLayout->addWidget(addDomainPB, 0, 1);
  connect(addDomainPB, SIGNAL(clicked()), SLOT(addPressed()));

  changeDomainPB = new QPushButton( i18n("Chan&ge..."), this);
  thisLayout->addWidget(changeDomainPB, 1, 1);
  connect(changeDomainPB, SIGNAL(clicked()), this, SLOT(changePressed()));

  deleteDomainPB = new QPushButton(i18n("De&lete"), this);
  thisLayout->addWidget(deleteDomainPB, 2, 1);
  connect(deleteDomainPB, SIGNAL(clicked()), this, SLOT(deletePressed()));

  importDomainPB = new QPushButton(i18n("&Import..."), this);
  thisLayout->addWidget(importDomainPB, 3, 1);
  connect(importDomainPB, SIGNAL(clicked()), this, SLOT(importPressed()));
  importDomainPB->setEnabled(false);
  importDomainPB->hide();

  exportDomainPB = new QPushButton(i18n("&Export..."), this);
  thisLayout->addWidget(exportDomainPB, 4, 1);
  connect(exportDomainPB, SIGNAL(clicked()), this, SLOT(exportPressed()));
  exportDomainPB->setEnabled(false);
  exportDomainPB->hide();

  QSpacerItem* spacer = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding);
  thisLayout->addItem(spacer, 5, 1);

  QWhatsThis::add( addDomainPB, i18n("Click on this button to manually add a host or domain "
                                       "specific policy.") );
  QWhatsThis::add( changeDomainPB, i18n("Click on this button to change the policy for the "
                                          "host or domain selected in the list box.") );
  QWhatsThis::add( deleteDomainPB, i18n("Click on this button to delete the policy for the "
                                          "host or domain selected in the list box.") );
  updateButton();
}
Esempio n. 4
0
DrOptionView::DrOptionView(TQWidget *parent, const char *name)
: TQGroupBox(parent,name)
{
	m_stack = new TQWidgetStack(this);

	OptionBaseView	*w = new OptionListView(m_stack);
	connect(w,TQT_SIGNAL(valueChanged(const TQString&)),TQT_SLOT(slotValueChanged(const TQString&)));
	m_stack->addWidget(w,DrBase::List);

	w = new OptionStringView(m_stack);
	connect(w,TQT_SIGNAL(valueChanged(const TQString&)),TQT_SLOT(slotValueChanged(const TQString&)));
	m_stack->addWidget(w,DrBase::String);

	w = new OptionNumericView(m_stack);
	connect(w,TQT_SIGNAL(valueChanged(const TQString&)),TQT_SLOT(slotValueChanged(const TQString&)));
	m_stack->addWidget(w,DrBase::Integer);

	w = new OptionBooleanView(m_stack);
	connect(w,TQT_SIGNAL(valueChanged(const TQString&)),TQT_SLOT(slotValueChanged(const TQString&)));
	m_stack->addWidget(w,DrBase::Boolean);

	w = new OptionBaseView(m_stack);
	connect(w,TQT_SIGNAL(valueChanged(const TQString&)),TQT_SLOT(slotValueChanged(const TQString&)));
	m_stack->addWidget(w,0);	// empty widget

	m_stack->raiseWidget(w);
	setTitle(i18n("No Option Selected"));

	setColumnLayout(0, Qt::Vertical );
	layout()->setSpacing( KDialog::spacingHint() );
	layout()->setMargin( KDialog::marginHint() );
	TQVBoxLayout	*main_ = new TQVBoxLayout(TQT_TQLAYOUT(layout()), KDialog::marginHint());
	main_->addWidget(m_stack);

	m_item = 0;
	m_block = false;
	m_allowfixed = true;
}
Esempio n. 5
0
/*!
    \property Q3GroupBox::orientation
    \brief the group box's orientation

    A horizontal group box arranges its children in columns, while a
    vertical group box arranges them in rows.

    Usually it is not a good idea to set this property because it is
    slow (it does a complete layout). It is better to set the
    orientation directly in the constructor.
*/
void Q3GroupBox::setOrientation(Qt::Orientation o)
{
    setColumnLayout(columns(), o);
}
Esempio n. 6
0
/*!
    Sets the width of the empty space between each of the items in
    the group to \a s pixels.

    \sa insideSpacing()
*/
void Q3GroupBox::setInsideSpacing(int s)
{
    d->spac = s;
    setColumnLayout(columns(), d->dir);
}
Esempio n. 7
0
/*!
    Sets the the width of the inside margin to \a m pixels.

    \sa insideMargin()
*/
void Q3GroupBox::setInsideMargin(int m)
{
    d->marg = m;
    setColumnLayout(columns(), d->dir);
}
Esempio n. 8
0
void Q3GroupBox::setColumns(int c)
{
    setColumnLayout(c, d->dir);
}