KMConfigProxy::KMConfigProxy(QWidget *parent) : KMConfigPage(parent, "Proxy") { setPageName(i18n("Proxy")); setPageHeader(i18n("RLPR Proxy Server Settings")); setPagePixmap("proxy"); m_widget = new KMProxyWidget(this); QVBoxLayout *lay0 = new QVBoxLayout(this, 5, 0); lay0->addWidget(m_widget); lay0->addStretch(1); }
KMConfigFilter::KMConfigFilter(QWidget *parent, const char *name) : KMConfigPage(parent, name) { setPageName(i18n("Filter")); setPageHeader(i18n("Printer Filtering Settings")); setPagePixmap("filter"); QGroupBox *box = new QGroupBox(0, Qt::Vertical, i18n("Printer Filter"), this); m_list1 = new KListBox(box); m_list1->setSelectionMode(KListBox::Extended); m_list2 = new KListBox(box); m_list2->setSelectionMode(KListBox::Extended); m_add = new QToolButton(box); m_add->setIconSet(QApplication::reverseLayout() ? SmallIconSet("back") : SmallIconSet("forward")); m_remove = new QToolButton(box); m_remove->setIconSet(QApplication::reverseLayout() ? SmallIconSet("forward") : SmallIconSet("back")); m_locationre = new QLineEdit(box); QLabel *lab = new QLabel(box); lab->setText( i18n("The printer filtering allows you to view only a specific set of " "printers instead of all of them. This may be useful when there are a " "lot of printers available but you only use a few ones. Select the " "printers you want to see from the list on the left or enter a <b>Location</b> " "filter (ex: Group_1*). Both are cumulative and ignored if empty.")); lab->setTextFormat(Qt::RichText); QLabel *lab1 = new QLabel(i18n("Location filter:"), box); QVBoxLayout *l0 = new QVBoxLayout(this, 0, KDialog::spacingHint()); l0->addWidget(box, 1); QVBoxLayout *l1 = new QVBoxLayout(box->layout(), KDialog::spacingHint()); l1->addWidget(lab); QGridLayout *l2 = new QGridLayout(0, 4, 3, 0, KDialog::spacingHint()); l1->addLayout(l2); l2->setRowStretch(0, 1); l2->setRowStretch(3, 1); l2->setColStretch(0, 1); l2->setColStretch(2, 1); l2->addMultiCellWidget(m_list1, 0, 3, 0, 0); l2->addMultiCellWidget(m_list2, 0, 3, 2, 2); l2->addWidget(m_add, 1, 1); l2->addWidget(m_remove, 2, 1); QHBoxLayout *l3 = new QHBoxLayout(0, 0, KDialog::spacingHint()); l1->addLayout(l3, 0); l3->addWidget(lab1, 0); l3->addWidget(m_locationre, 1); connect(m_add, SIGNAL(clicked()), SLOT(slotAddClicked())); connect(m_remove, SIGNAL(clicked()), SLOT(slotRemoveClicked())); connect(m_list1, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged())); connect(m_list2, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged())); m_add->setEnabled(false); m_remove->setEnabled(false); }
KMConfigLpr::KMConfigLpr(TQWidget *parent, const char *name) : KMConfigPage(parent, name) { setPageName(i18n("Spooler")); setPageHeader(i18n("Spooler Settings")); setPagePixmap("gear"); TQGroupBox *m_modebox = new TQGroupBox(1, Qt::Vertical, i18n("Spooler"), this); m_mode = new TQComboBox(m_modebox); m_mode->insertItem("LPR (BSD compatible)"); m_mode->insertItem("LPRng"); TQVBoxLayout *l0 = new TQVBoxLayout(this, 5, 10); l0->addWidget(m_modebox); l0->addStretch(1); }
KMConfigJobs::KMConfigJobs(TQWidget *parent, const char *name) : KMConfigPage(parent, name) { setPageName(i18n("Jobs")); setPageHeader(i18n("Print Job Settings")); setPagePixmap("exec"); TQGroupBox *box = new TQGroupBox(0, Qt::Vertical, i18n("Jobs Shown"), this); m_limit = new KIntNumInput(box); m_limit->setRange(0, 9999, 1, true); m_limit->setSpecialValueText(i18n("Unlimited")); m_limit->setLabel(i18n("Maximum number of jobs shown:")); TQVBoxLayout *l0 = new TQVBoxLayout(this, 0, KDialog::spacingHint()); l0->addWidget(box, 0); l0->addStretch(1); TQVBoxLayout *l1 = new TQVBoxLayout(TQT_TQLAYOUT(box->layout()), KDialog::spacingHint()); l1->addWidget(m_limit); }
KMConfigFonts::KMConfigFonts(TQWidget *parent, const char *name) : KMConfigPage(parent, name) { setPageName(i18n("Fonts")); setPageHeader(i18n("Font Settings")); setPagePixmap("fonts"); TQGroupBox *box = new TQGroupBox(0, Qt::Vertical, i18n("Fonts Embedding"), this); TQGroupBox *box2 = new TQGroupBox(0, Qt::Vertical, i18n("Fonts Path"), this); m_embedfonts = new TQCheckBox(i18n("&Embed fonts in PostScript data when printing"), box); m_fontpath = new TDEListView(box2); m_fontpath->addColumn(""); m_fontpath->header()->setStretchEnabled(true, 0); m_fontpath->header()->hide(); m_fontpath->setSorting(-1); m_addpath = new KURLRequester(box2); m_addpath->setMode(KFile::Directory|KFile::ExistingOnly|KFile::LocalOnly); m_up = new KPushButton(KGuiItem(i18n("&Up"), "up"), box2); m_down = new KPushButton(KGuiItem(i18n("&Down"), "down"), box2); m_add = new KPushButton(KGuiItem(i18n("&Add"), "add"), box2); m_remove = new KPushButton(KGuiItem(i18n("&Remove"), "editdelete"), box2); TQLabel *lab0 = new TQLabel(i18n("Additional director&y:"), box2); lab0->setBuddy(m_addpath); TQVBoxLayout *l0 = new TQVBoxLayout(TQT_TQLAYOUT(box->layout()), KDialog::spacingHint()); l0->addWidget(m_embedfonts); TQVBoxLayout *l1 = new TQVBoxLayout(TQT_TQLAYOUT(box2->layout()), KDialog::spacingHint()); l1->addWidget(m_fontpath); TQHBoxLayout *l2 = new TQHBoxLayout(0, 0, KDialog::spacingHint()); l1->addLayout(l2); l2->addWidget(m_up); l2->addWidget(m_down); l2->addWidget(m_remove); l1->addSpacing(10); l1->addWidget(lab0); l1->addWidget(m_addpath); TQHBoxLayout *l3 = new TQHBoxLayout(0, 0, KDialog::spacingHint()); l1->addLayout(l3); l3->addStretch(1); l3->addWidget(m_add); TQVBoxLayout *l4 = new TQVBoxLayout(this, 0, KDialog::spacingHint()); l4->addWidget(box); l4->addWidget(box2); TQWhatsThis::add(m_embedfonts, i18n("These options will automatically put fonts in the PostScript file " "which are not present on the printer. Font embedding usually produces better print results " "(closer to what you see on the screen), but larger print data as well.")); TQWhatsThis::add(m_fontpath, i18n("When using font embedding you can select additional directories where " "KDE should search for embeddable font files. By default, the X server " "font path is used, so adding those directories is not needed. The default " "search path should be sufficient in most cases.")); connect(m_remove, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemove())); connect(m_add, TQT_SIGNAL(clicked()), TQT_SLOT(slotAdd())); connect(m_up, TQT_SIGNAL(clicked()), TQT_SLOT(slotUp())); connect(m_down, TQT_SIGNAL(clicked()), TQT_SLOT(slotDown())); connect(m_fontpath, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelected())); connect(m_addpath, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotTextChanged(const TQString&))); m_add->setEnabled(false); m_remove->setEnabled(false); m_up->setEnabled(false); m_down->setEnabled(false); }