CupsdFilterPage::CupsdFilterPage(TQWidget *parent, const char *name) : CupsdPage(parent, name) { setPageLabel(i18n("Filter")); setHeader(i18n("Filter Settings")); setPixmap("filter"); user_ = new TQLineEdit(this); group_ = new TQLineEdit(this); ripcache_ = new SizeWidget(this); filterlimit_ = new KIntNumInput(this); filterlimit_->setRange(0, 1000, 1, true); filterlimit_->setSpecialValueText(i18n("Unlimited")); filterlimit_->setSteps(1, 10); TQLabel *l1 = new TQLabel(i18n("User:"******"Group:"), this); TQLabel *l3 = new TQLabel(i18n("RIP cache:"), this); TQLabel *l4 = new TQLabel(i18n("Filter limit:"), this); TQGridLayout *m1 = new TQGridLayout(this, 5, 2, 10, 7); m1->setRowStretch(4, 1); m1->setColStretch(1, 1); m1->addWidget(l1, 0, 0, Qt::AlignRight); m1->addWidget(l2, 1, 0, Qt::AlignRight); m1->addWidget(l3, 2, 0, Qt::AlignRight); m1->addWidget(l4, 3, 0, Qt::AlignRight); m1->addWidget(user_, 0, 1); m1->addWidget(group_, 1, 1); m1->addWidget(ripcache_, 2, 1); m1->addWidget(filterlimit_, 3, 1); }
CupsdSplash::CupsdSplash(QWidget *parent, const char *name) : CupsdPage(parent, name) { setHeader(i18n("Welcome to the CUPS Server Configuration Tool")); setPageLabel(i18n("Welcome")); setPixmap("go"); QVBoxLayout *main_ = new QVBoxLayout(this, 10, 10); QHBoxLayout *sub_ = new QHBoxLayout(0, 0, 10); main_->addLayout(sub_); QLabel *cupslogo_ = new QLabel(this); QString logopath = locate("data", QString("kdeprint/cups_logo.png")); cupslogo_->setPixmap(logopath.isEmpty() ? QPixmap() : QPixmap(logopath)); cupslogo_->setAlignment(Qt::AlignCenter); QLabel *kupslogo_ = new QLabel(this); logopath = locate("data", QString("kdeprint/kde_logo.png")); kupslogo_->setPixmap(logopath.isEmpty() ? QPixmap() : QPixmap(logopath)); kupslogo_->setAlignment(Qt::AlignCenter); QLabel *helptxt_ = new QLabel(this); helptxt_->setText(i18n( "<p>This tool will help you to configure graphically the server of the CUPS printing system. " "The available options are grouped into sets of related topics and can be accessed " "quickly through the icon view located on the left. Each option has a default value that is " "shown if it has not been previously set. This default value should be OK in most cases.</p><br>" "<p>You can access a short help message for each option using either the '?' button in the " "the title bar, or the button at the bottom of this dialog.</p>")); sub_->addWidget(cupslogo_); sub_->addWidget(kupslogo_); main_->addWidget(helptxt_, 1); }
void KCupsOptionsPagesWidget::initPageLabel() { setPageLabel( "" ); }
CupsdNetworkPage::CupsdNetworkPage(TQWidget *parent, const char *name) : CupsdPage(parent, name) { setPageLabel(i18n("Network")); setHeader(i18n("Network Settings")); setPixmap("network"); keepalive_ = new TQCheckBox(i18n("Keep alive"), this); keepalivetimeout_ = new KIntNumInput(this); maxclients_ = new KIntNumInput(this); maxrequestsize_ = new SizeWidget(this); clienttimeout_ = new KIntNumInput(this); hostnamelookup_ = new TQComboBox(this); listen_ = new EditList(this); keepalivetimeout_->setRange(0, 10000, 1, true); keepalivetimeout_->setSteps(1, 10); keepalivetimeout_->setSpecialValueText(i18n("Unlimited")); keepalivetimeout_->setSuffix(i18n(" sec")); maxclients_->setRange(1, 1000, 1, true); maxclients_->setSteps(1, 10); clienttimeout_->setRange(0, 10000, 1, true); clienttimeout_->setSteps(1, 10); clienttimeout_->setSpecialValueText(i18n("Unlimited")); clienttimeout_->setSuffix(i18n(" sec")); hostnamelookup_->insertItem(i18n("Off")); hostnamelookup_->insertItem(i18n("On")); hostnamelookup_->insertItem(i18n("Double")); TQLabel *l1 = new TQLabel(i18n("Hostname lookups:"), this); TQLabel *l2 = new TQLabel(i18n("Keep-alive timeout:"), this); TQLabel *l3 = new TQLabel(i18n("Max clients:"), this); TQLabel *l4 = new TQLabel(i18n("Max request size:"), this); TQLabel *l5 = new TQLabel(i18n("Client timeout:"), this); TQLabel *l6 = new TQLabel(i18n("Listen to:"), this); TQGridLayout *m1 = new TQGridLayout(this, 8, 2, 10, 7); m1->setRowStretch(7, 1); m1->setColStretch(1, 1); m1->addWidget(l1, 0, 0, Qt::AlignRight); m1->addWidget(l2, 2, 0, Qt::AlignRight); m1->addWidget(l3, 3, 0, Qt::AlignRight); m1->addWidget(l4, 4, 0, Qt::AlignRight); m1->addWidget(l5, 5, 0, Qt::AlignRight); m1->addWidget(l6, 6, 0, Qt::AlignTop|Qt::AlignRight); m1->addWidget(keepalive_, 1, 1); m1->addWidget(hostnamelookup_, 0, 1); m1->addWidget(keepalivetimeout_, 2, 1); m1->addWidget(maxclients_, 3, 1); m1->addWidget(maxrequestsize_, 4, 1); m1->addWidget(clienttimeout_, 5, 1); m1->addWidget(listen_, 6, 1); connect(listen_, TQT_SIGNAL(add()), TQT_SLOT(slotAdd())); connect(listen_, TQT_SIGNAL(edit(int)), TQT_SLOT(slotEdit(int))); connect(listen_, TQT_SIGNAL(defaultList()), TQT_SLOT(slotDefaultList())); connect(keepalive_, TQT_SIGNAL(toggled(bool)), keepalivetimeout_, TQT_SLOT(setEnabled(bool))); keepalive_->setChecked(true); }