KPImagePage::KPImagePage(DrMain *driver, QWidget *parent, const char *name) : KPrintDialogPage(parent, name) { // WhatsThis strings.... (added by [email protected]) QString whatsThisBrightnessImagePage = i18n( " <qt> " " <p><b>Brightness:</b> Slider to control the brightness value of all colors used.</p>" " <p> The brightness value can range from 0 to 200. Values greater than 100 will " " lighten the print. Values less than 100 will darken the print. </p> " " <br> " " <hr> " " <p><em><b>Additional hint for power users:</b> This KDEPrint GUI element matches " " with the CUPS commandline job option parameter:</em> " " <pre>" " -o brightness=... # use range from \"0\" to \"200\" " " </pre> " " </p> " " </qt>"); QString whatsThisHueImagePage = i18n( " <qt> " " <p><b>Hue (Tint):</b> Slider to control the hue value for color rotation.</p>" " <p> The hue value is a number from -360 to 360 and represents the color hue rotation. " " The following table summarizes the change you will see for the base colors: " " <center> " " <table border=\"1\" width=\"70%\"> " " <tr><th><b>Original</b></th> <th><b>hue=-45</b></th> <th><b>hue=45</b></th> </tr> " " <tr><td>Red</td> <td>Purple</td> <td>Yellow-orange</td> </tr> " " <tr><td>Green</td> <td>Yellow-green</td> <td>Blue-green</td> </tr> " " <tr><td>Yellow</td> <td>Orange</td> <td>Green-yellow</td> </tr> " " <tr><td>Blue</td> <td>Sky-blue</td> <td>Purple</td> </tr> " " <tr><td>Magenta</td> <td>Indigo</td> <td>Crimson</td> </tr> " " <tr><td>Cyan</td> <td>Blue-green</td> <td>Light-navy-blue</td> </tr> " " </table> " " </center> " " <br> " " <hr> " " <p><em><b>Additional hint for power users:</b> This KDEPrint GUI element matches " " with the CUPS commandline job option parameter:</em> " " <pre>" " -o hue=... # use range from \"-360\" to \"360\" " " </pre>" " </p> " " </qt>"); QString whatsThisSaturationImagePage = i18n( " <qt> " " <p><b>Saturation:</b> Slider to control the saturation value for all colors used.</p>" " <p> The saturation value adjusts the saturation of the colors in an image, similar to " " the color knob on your television. The color saturation value.can range from 0 to 200." " On inkjet printers, a higher saturation value uses more ink. On laserjet printers, a " " higher saturation uses more toner. " " A color saturation of 0 produces a black-and-white print, while a value of 200 will " " make the colors extremely intense. </p>" " <br> " " <hr> " " <p><em><b>Additional hint for power users:</b> This KDEPrint GUI element matches " " with the CUPS commandline job option parameter:</em> " " <pre>" " -o saturation=... # use range from \"0\" to \"200\" " " </pre>" " </p> " " </qt>"); QString whatsThisGammaImagePage = i18n( " <qt> " " <p><b>Gamma:</b> Slider to control the gamma value for color correction.</p>" " <p> The gamma value can range from 1 to 3000. " " A gamma values greater than 1000 lightens the print. A gamma value less than 1000 " " darken the print. The default gamma is 1000. </p>" " <p><b>Note:</b></p> the gamma value adjustment is not visible in the thumbnail " " preview. </p> " " <br> " " <hr> " " <p><em><b>Additional hint for power users:</b> This KDEPrint GUI element matches " " with the CUPS commandline job option parameter:</em> " " <pre>" " -o gamma=... # use range from \"1\" to \"3000\" " " </pre>" " </p> " " </qt>"); QString whatsThisImagePage = i18n( " <qt> " " <p><b>Image Printing Options</b></p> " " <p>All options controlled on this page only apply to printing images. " " Most image file formats are supported. To name a few: JPEG, TIFF, PNG, GIF, " " PNM (PBM/PGM/PNM/PPM), Sun Raster, SGI RGB, Windows BMP." " Options to influence color output of image printouts are: " " <ul> " " <li> Brightness </li>" " <li> Hue </li>" " <li> Saturation </li>" " <li> Gamma </li>" " </ul> " " <p>For a more detailed explanation about Brightness, Hue, Saturation and Gamma settings, please " " look at the 'WhatsThis' items provided for these controls. " " </p> " " </p> " " </qt>"); QString whatsThisColorationPreviewImagePage = i18n( " <qt> " " <p><b>Coloration Preview Thumbnail</b></p> " " <p>The coloration preview thumbnail indicates change of image coloration by different settings. " " Options to influence output are: " " <ul> " " <li> Brightness </li>" " <li> Hue (Tint) </li>" " <li> Saturation </li>" " <li> Gamma </li>" " </ul> " " </p> " " <p>For a more detailed explanation about Brightness, Hue, Saturation and Gamma settings, please " " look at the 'WhatsThis' items provided for these controls. " " </p> " " </qt>"); QString whatsThisSizeImagePage = i18n( " <qt> " " <p><b>Image Size:</b> Dropdown menu to control the image size on the printed paper. Dropdown " " works in conjunction with slider below. Dropdown options are:.</p>" " <ul> " " <li> <b>Natural Image Size:</b> Image prints in its natural image size. If it does not fit onto " " one sheet, the printout will be spread across multiple sheets. Note, that the slider is disabled " " when selecting 'natural image size' in the dropdown menu. </li>" " <li> <b>Resolution (ppi):</b> The resolution value slider covers a number range from 1 to 1200. " " It specifies the resolution of the image in Pixels Per Inch (PPI). An image that is 3000x2400 pixels " " will print 10x8 inches at 300 pixels per inch, for example, but 5x4 inches at 600 pixels per inch." " If the specified resolution makes the image larger than the page, multiple pages will be printed. " " Resolution defaults to 72 ppi. " " </li>" " <li> <b>% of Page Size:</b> The percent value slider covers numbers from 1 to 800. It specifies the size " " in relation to the page (not the image). A scaling of 100 percent will fill the page as completely " " as the image aspect ratio allows (doing auto-rotation of the image as needed). " " A scaling of more than 100 will print the image across multiple " " sheets. A scaling of 200 percent will print on up to 4 pages. </li>" " Scaling in % of page size defaults to 100 %. " " <li> <b>% of Natural Image Size:</b> The percent value slider moves from 1 to 800. It specifies " " the printout size in relation " " to the natural image size. A scaling of 100 percent will print the image at its natural size, while a " " scaling of 50 percent will print the image at half its natural size. If the specified scaling makes " " the image larger than the page, multiple pages will be printed. " " Scaling in % of natural image size defaults to 100 %. " " </ul> " " <br> " " <hr> " " <p><em><b>Additional hint for power users:</b> This KDEPrint GUI element matches " " with the CUPS commandline job option parameter:</em> " " <pre>" " -o natural-scaling=... # range in % is 1....800 " " <br> " " -o scaling=... # range in % is 1....800 " " <br> " " -o ppi=... # range in ppi is 1...1200 " " </pre>" " </p> " " </qt>"); QString whatsThisPreviewPositionImagePage = i18n( " <qt> " " <p><b>Position Preview Thumbnail</b></p> " " <p>This position preview thumbnail indicates the position of the image on the paper sheet. " " <p>Click on horizontal and vertical radio buttons to move image alignment on paper around. Options are: " " <ul> " " <li> center </li>" " <li> top </li>" " <li> top-left </li>" " <li> left </li>" " <li> bottom-left </li>" " <li> bottom </li>" " <li> bottom-right</li>" " <li> right </li>" " <li> top-right </li>" " </ul> " " </p> " " </qt>"); QString whatsThisResetButtonImagePage = i18n( " <qt> " " <p><b>Reset to Default Values</b> </p> " " <p> Reset all coloration settings to default values. Default values are: " " <ul> " " <li> Brightness: 100 </li>" " <li> Hue (Tint). 0 </li>" " <li> Saturation: 100 </li>" " <li> Gamma: 1000 </li>" " </ul> " " </p> " " </qt>"); QString whatsThisPositionImagePage = i18n( " <qt> " " <p><b>Image Positioning:</b></p> " " <p>Select a pair of radiobuttons to " " move image to the position you want on the paper printout. Default " " is 'center'. </p> " " <br> " " <hr> " " <p><em><b>Additional hint for power users:</b> This KDEPrint GUI element matches " " with the CUPS commandline job option parameter:</em> " " <pre>" " -o position=... # examples: \"top-left\" or \"bottom\" " " </pre>" " </p> " " </qt>"); setTitle(i18n("Image")); QGroupBox *colorbox = new QGroupBox(0, Qt::Vertical, i18n("Color Settings"), this); QWhatsThis::add(this, whatsThisImagePage); QGroupBox *sizebox = new QGroupBox(0, Qt::Vertical, i18n("Image Size"), this); QWhatsThis::add(sizebox, whatsThisSizeImagePage); QGroupBox *positionbox = new QGroupBox(0, Qt::Vertical, i18n("Image Position"), this); QWhatsThis::add(positionbox, whatsThisPositionImagePage); m_brightness = new KIntNumInput(100, colorbox); m_brightness->setLabel(i18n("&Brightness:")); m_brightness->setRange(0, 200, 20, true); QWhatsThis::add(m_brightness, whatsThisBrightnessImagePage); m_hue = new KIntNumInput(m_brightness, 0, colorbox); m_hue->setLabel(i18n("&Hue (Color rotation):")); m_hue->setRange(-360, 360, 36, true); QWhatsThis::add(m_hue, whatsThisHueImagePage); m_saturation = new KIntNumInput(m_brightness, 100, colorbox); m_saturation->setLabel(i18n("&Saturation:")); m_saturation->setRange(0, 200, 20, true); QWhatsThis::add(m_saturation, whatsThisSaturationImagePage); m_gamma = new KIntNumInput(m_saturation, 1000, colorbox); m_gamma->setLabel(i18n("&Gamma (Color correction):")); m_gamma->setRange(1, 3000, 100, true); QWhatsThis::add(m_gamma, whatsThisGammaImagePage); connect(m_brightness, SIGNAL(valueChanged(int)), SLOT(slotImageSettingsChanged())); connect(m_hue, SIGNAL(valueChanged(int)), SLOT(slotImageSettingsChanged())); connect(m_saturation, SIGNAL(valueChanged(int)), SLOT(slotImageSettingsChanged())); // connect(m_gamma, SIGNAL(valueChanged(int)), SLOT(slotImageSettingsChanged())); m_preview = new ImagePreview(colorbox); bool useColor = (driver ? driver->get("colordevice") == "1" : true); m_preview->setBlackAndWhite(!useColor); QWhatsThis::add(m_preview, whatsThisColorationPreviewImagePage); m_hue->setEnabled(useColor); m_saturation->setEnabled(useColor); QImage img(locate("data", "kdeprint/preview.png")); m_preview->setImage(img); KSeparator *sep = new KSeparator(Qt::Horizontal, colorbox); QPushButton *defbtn = new QPushButton(i18n("&Default Settings"), colorbox); QWhatsThis::add(defbtn, whatsThisResetButtonImagePage); connect(defbtn, SIGNAL(clicked()), SLOT(slotDefaultClicked())); slotDefaultClicked(); m_sizetype = new QComboBox(sizebox); m_sizetype->insertItem(i18n("Natural Image Size")); m_sizetype->insertItem(i18n("Resolution (ppi)")); // xgettext:no-c-format m_sizetype->insertItem(i18n("% of Page")); // xgettext:no-c-format m_sizetype->insertItem(i18n("% of Natural Image Size")); m_size = new KIntNumInput(sizebox); m_size->setRange(1, 1200, 20, true); m_size->setValue(72); connect(m_sizetype, SIGNAL(activated(int)), SLOT(slotSizeTypeChanged(int))); m_sizetype->setCurrentItem(0); slotSizeTypeChanged(0); QLabel *lab = new QLabel(i18n("&Image size type:"), sizebox); lab->setBuddy(m_sizetype); m_position = new ImagePosition(positionbox); QWhatsThis::add(m_position, whatsThisPreviewPositionImagePage); QRadioButton *bottom = new QRadioButton(positionbox); QRadioButton *top = new QRadioButton(positionbox); QRadioButton *vcenter = new QRadioButton(positionbox); QRadioButton *left = new QRadioButton(positionbox); QRadioButton *right = new QRadioButton(positionbox); QRadioButton *hcenter = new QRadioButton(positionbox); QSize sz = bottom->sizeHint(); bottom->setFixedSize(sz); vcenter->setFixedSize(sz); top->setFixedSize(sz); left->setFixedSize(sz); hcenter->setFixedSize(sz); right->setFixedSize(sz); m_vertgrp = new QButtonGroup(positionbox); m_vertgrp->hide(); m_horizgrp = new QButtonGroup(positionbox); m_horizgrp->hide(); m_vertgrp->insert(top, 0); m_vertgrp->insert(vcenter, 1); m_vertgrp->insert(bottom, 2); if(QApplication::reverseLayout()) { m_horizgrp->insert(left, 2); m_horizgrp->insert(hcenter, 1); m_horizgrp->insert(right, 0); } else { m_horizgrp->insert(left, 0); m_horizgrp->insert(hcenter, 1); m_horizgrp->insert(right, 2); } connect(m_vertgrp, SIGNAL(clicked(int)), SLOT(slotPositionChanged())); connect(m_horizgrp, SIGNAL(clicked(int)), SLOT(slotPositionChanged())); m_vertgrp->setButton(1); m_horizgrp->setButton(1); slotPositionChanged(); QGridLayout *l0 = new QGridLayout(this, 2, 2, 0, 10); l0->addMultiCellWidget(colorbox, 0, 0, 0, 1); l0->addWidget(sizebox, 1, 0); l0->addWidget(positionbox, 1, 1); l0->setColStretch(0, 1); QGridLayout *l1 = new QGridLayout(colorbox->layout(), 5, 2, 10); l1->addWidget(m_brightness, 0, 0); l1->addWidget(m_hue, 1, 0); l1->addWidget(m_saturation, 2, 0); l1->addWidget(sep, 3, 0); l1->addWidget(m_gamma, 4, 0); l1->addMultiCellWidget(m_preview, 0, 3, 1, 1); l1->addWidget(defbtn, 4, 1); QVBoxLayout *l2 = new QVBoxLayout(sizebox->layout(), 3); l2->addStretch(1); l2->addWidget(lab); l2->addWidget(m_sizetype); l2->addSpacing(10); l2->addWidget(m_size); l2->addStretch(1); QGridLayout *l3 = new QGridLayout(positionbox->layout(), 2, 2, 10); QHBoxLayout *l4 = new QHBoxLayout(0, 0, 10); QVBoxLayout *l5 = new QVBoxLayout(0, 0, 10); l3->addLayout(l4, 0, 1); l3->addLayout(l5, 1, 0); l3->addWidget(m_position, 1, 1); l4->addWidget(left, Qt::AlignLeft); l4->addWidget(hcenter, Qt::AlignCenter); l4->addWidget(right, Qt::AlignRight); l5->addWidget(top, Qt::AlignTop); l5->addWidget(vcenter, Qt::AlignVCenter); l5->addWidget(bottom, Qt::AlignBottom); }
void PathStrokeControls::createCommonControls(QWidget* parent) { m_capGroup = new QGroupBox(parent); m_capGroup->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); QRadioButton *flatCap = new QRadioButton(m_capGroup); QRadioButton *squareCap = new QRadioButton(m_capGroup); QRadioButton *roundCap = new QRadioButton(m_capGroup); m_capGroup->setTitle(tr("Cap Style")); flatCap->setText(tr("Flat")); squareCap->setText(tr("Square")); roundCap->setText(tr("Round")); flatCap->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); squareCap->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); roundCap->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); m_joinGroup = new QGroupBox(parent); m_joinGroup->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); QRadioButton *bevelJoin = new QRadioButton(m_joinGroup); QRadioButton *miterJoin = new QRadioButton(m_joinGroup); QRadioButton *roundJoin = new QRadioButton(m_joinGroup); m_joinGroup->setTitle(tr("Join Style")); bevelJoin->setText(tr("Bevel")); miterJoin->setText(tr("Miter")); roundJoin->setText(tr("Round")); m_styleGroup = new QGroupBox(parent); m_styleGroup->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); QRadioButton *solidLine = new QRadioButton(m_styleGroup); QRadioButton *dashLine = new QRadioButton(m_styleGroup); QRadioButton *dotLine = new QRadioButton(m_styleGroup); QRadioButton *dashDotLine = new QRadioButton(m_styleGroup); QRadioButton *dashDotDotLine = new QRadioButton(m_styleGroup); QRadioButton *customDashLine = new QRadioButton(m_styleGroup); m_styleGroup->setTitle(tr("Pen Style")); QPixmap line_solid(":res/images/line_solid.png"); solidLine->setIcon(line_solid); solidLine->setIconSize(line_solid.size()); QPixmap line_dashed(":res/images/line_dashed.png"); dashLine->setIcon(line_dashed); dashLine->setIconSize(line_dashed.size()); QPixmap line_dotted(":res/images/line_dotted.png"); dotLine->setIcon(line_dotted); dotLine->setIconSize(line_dotted.size()); QPixmap line_dash_dot(":res/images/line_dash_dot.png"); dashDotLine->setIcon(line_dash_dot); dashDotLine->setIconSize(line_dash_dot.size()); QPixmap line_dash_dot_dot(":res/images/line_dash_dot_dot.png"); dashDotDotLine->setIcon(line_dash_dot_dot); dashDotDotLine->setIconSize(line_dash_dot_dot.size()); customDashLine->setText(tr("Custom")); int fixedHeight = bevelJoin->sizeHint().height(); solidLine->setFixedHeight(fixedHeight); dashLine->setFixedHeight(fixedHeight); dotLine->setFixedHeight(fixedHeight); dashDotLine->setFixedHeight(fixedHeight); dashDotDotLine->setFixedHeight(fixedHeight); m_pathModeGroup = new QGroupBox(parent); m_pathModeGroup->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); QRadioButton *curveMode = new QRadioButton(m_pathModeGroup); QRadioButton *lineMode = new QRadioButton(m_pathModeGroup); m_pathModeGroup->setTitle(tr("Line Style")); curveMode->setText(tr("Curves")); lineMode->setText(tr("Lines")); // Layouts QVBoxLayout *capGroupLayout = new QVBoxLayout(m_capGroup); capGroupLayout->addWidget(flatCap); capGroupLayout->addWidget(squareCap); capGroupLayout->addWidget(roundCap); QVBoxLayout *joinGroupLayout = new QVBoxLayout(m_joinGroup); joinGroupLayout->addWidget(bevelJoin); joinGroupLayout->addWidget(miterJoin); joinGroupLayout->addWidget(roundJoin); QVBoxLayout *styleGroupLayout = new QVBoxLayout(m_styleGroup); styleGroupLayout->addWidget(solidLine); styleGroupLayout->addWidget(dashLine); styleGroupLayout->addWidget(dotLine); styleGroupLayout->addWidget(dashDotLine); styleGroupLayout->addWidget(dashDotDotLine); styleGroupLayout->addWidget(customDashLine); QVBoxLayout *pathModeGroupLayout = new QVBoxLayout(m_pathModeGroup); pathModeGroupLayout->addWidget(curveMode); pathModeGroupLayout->addWidget(lineMode); // Connections connect(flatCap, SIGNAL(clicked()), m_renderer, SLOT(setFlatCap())); connect(squareCap, SIGNAL(clicked()), m_renderer, SLOT(setSquareCap())); connect(roundCap, SIGNAL(clicked()), m_renderer, SLOT(setRoundCap())); connect(bevelJoin, SIGNAL(clicked()), m_renderer, SLOT(setBevelJoin())); connect(miterJoin, SIGNAL(clicked()), m_renderer, SLOT(setMiterJoin())); connect(roundJoin, SIGNAL(clicked()), m_renderer, SLOT(setRoundJoin())); connect(curveMode, SIGNAL(clicked()), m_renderer, SLOT(setCurveMode())); connect(lineMode, SIGNAL(clicked()), m_renderer, SLOT(setLineMode())); connect(solidLine, SIGNAL(clicked()), m_renderer, SLOT(setSolidLine())); connect(dashLine, SIGNAL(clicked()), m_renderer, SLOT(setDashLine())); connect(dotLine, SIGNAL(clicked()), m_renderer, SLOT(setDotLine())); connect(dashDotLine, SIGNAL(clicked()), m_renderer, SLOT(setDashDotLine())); connect(dashDotDotLine, SIGNAL(clicked()), m_renderer, SLOT(setDashDotDotLine())); connect(customDashLine, SIGNAL(clicked()), m_renderer, SLOT(setCustomDashLine())); // Set the defaults: flatCap->setChecked(true); bevelJoin->setChecked(true); curveMode->setChecked(true); solidLine->setChecked(true); }
PrintDialog::PrintDialog( QWidget *parent, const char *name, int maxPages, bool marked ) : QDialog( parent, name, TRUE ) { setFocusPolicy(QWidget::StrongFocus); pgMode = All; /* printerName.sprintf( "" ); // default printer will be chosen. spoolerCommand.sprintf( "lpr" ); printerVariable.sprintf( "PRINTER" ); */ KConfig *config = KApplication::getKApplication()->getConfig(); /* Read in the default options. */ config->setGroup( "Print" ); printerName=config->readEntry ("Name",""); spoolerCommand=config->readEntry ("Spool","lpr"); printerVariable=config->readEntry ("Variable","PRINTER"); pgMax = maxPages; pgStart=0; pgEnd=0; int border = 10; QBoxLayout *topLayout = new QVBoxLayout( this, border ); cbFile = new QCheckBox( i18n("Print to file"), this ); cbFile->setFixedHeight( cbFile->sizeHint().height() ); topLayout->addWidget( cbFile ); QGroupBox *group = new QGroupBox( i18n( "Pages" ), this ); topLayout->addWidget( group, 10 ); QGridLayout *grid = new QGridLayout( group, 5, 7, 5 ); grid->setRowStretch( 0, 10 ); grid->setRowStretch( 1, 100 ); grid->setRowStretch( 2, 0 ); grid->setRowStretch( 3, 100 ); grid->setRowStretch( 4, 10 ); grid->setColStretch( 0, 0 ); grid->setColStretch( 1, 100 ); grid->setColStretch( 2, 100 ); grid->setColStretch( 3, 100 ); grid->setColStretch( 4, 0 ); grid->setColStretch( 5, 100 ); grid->setColStretch( 6, 0 ); pgGroup = new QButtonGroup( group ); pgGroup->hide(); pgGroup->setExclusive( true ); connect( pgGroup, SIGNAL( clicked( int ) ), SLOT( slotPageMode( int ) ) ); int widest = 0; QRadioButton *arb = new QRadioButton( i18n("&All"), group ); arb->setFixedHeight( arb->sizeHint().height()+6 ); arb->setChecked( true ); pgGroup->insert( arb, All ); grid->addWidget( arb, 1, 1 ); if ( arb->sizeHint().width() > widest ) widest = arb->sizeHint().width(); QRadioButton *rb = new QRadioButton( i18n("&Current"), group ); rb->setFixedHeight( rb->sizeHint().height()+6 ); pgGroup->insert( rb, Current ); grid->addWidget( rb, 1, 2 ); if ( rb->sizeHint().width() > widest ) widest = rb->sizeHint().width(); rb = new QRadioButton( i18n("&Marked"), group ); rb->setFixedHeight( rb->sizeHint().height()+6 ); if ( !marked ) rb->setEnabled( false ); else { arb->setChecked ( false ); rb->setChecked ( true ); } pgGroup->insert( rb, Marked ); grid->addWidget( rb, 3, 1 ); if ( rb->sizeHint().width() > widest ) widest = rb->sizeHint().width(); rb = new QRadioButton( i18n("&Range"), group ); rb->setFixedHeight( rb->sizeHint().height()+6 ); pgGroup->insert( rb, Range ); grid->addWidget( rb, 3, 2 ); if ( rb->sizeHint().width() > widest ) widest = rb->sizeHint().width(); leStart = new QLineEdit( group ); leStart->setFixedHeight( rb->sizeHint().height()+6 ); grid->addWidget( leStart, 3, 3 ); lTo = new QLabel( group ); lTo->setText( i18n("to") ); lTo->setAlignment( AlignCenter ); lTo->setMinimumSize( lTo->sizeHint() ); grid->addWidget( lTo, 3, 4 ); leEnd = new QLineEdit( group ); leEnd->setFixedHeight( rb->sizeHint().height()+6 ); grid->addWidget( leEnd, 3, 5 ); group->setMinimumSize( QSize( 4*widest+25, 4*(rb->sizeHint().height()+6) ) ); cbOrder = new QCheckBox( i18n("Print document in re&verse order"), this ); cbOrder->setFixedHeight( cbOrder->sizeHint().height() ); topLayout->addWidget( cbOrder ); QFrame* tmpQFrame; tmpQFrame = new QFrame( this ); tmpQFrame->setFrameStyle( QFrame::HLine | QFrame::Sunken ); tmpQFrame->setMinimumHeight( tmpQFrame->sizeHint().height() ); topLayout->addWidget( tmpQFrame ); // CREATE BUTTONS KButtonBox *bbox = new KButtonBox( this ); QPushButton* setup = bbox->addButton( i18n("&Setup ...") ); connect( setup, SIGNAL(clicked()), SLOT( setup()) ); bbox->addStretch( 10 ); QPushButton* ok = bbox->addButton( i18n("&OK") ); connect( ok, SIGNAL(clicked()), SLOT( checkRange() ) ); QPushButton* cancel = bbox->addButton( i18n("&Cancel") ); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); bbox->layout(); topLayout->addWidget( bbox ); topLayout->activate(); if ( marked ) slotPageMode( Marked ); else slotPageMode( All ); resize( 250, 0 ); }