Source Code (Use browser search to find items of interest.)

Class Index

kghostview'Zoom (./kdegraphics/kghostview/zoom.h:8)

class Zoom : public QDialog {
      Q_OBJECT
      
public:
      Zoom( int *mag, QWidget *parent = 0, const char *name = 0 );
      QSpinBox *sbMag;
      int *mag;
      
public slots:
      void acceptMag();
      
};

kghostview'Zoom::Zoom() (./kdegraphics/kghostview/zoom.cpp:26)

Zoom::Zoom( int *m, QWidget *parent, const char *name )
      : QDialog( parent, name, TRUE )
{
      setFocusPolicy(QWidget::StrongFocus);
      
      mag = m;
      
      int border = 10;
      
      QBoxLayout *topLayout = new QVBoxLayout( this, border );
      
      topLayout->addStretch( 10 );

      sbMag = new QSpinBox(10,30,10, this );
      sbMag->setValue( *mag );
      
      QLabel* tmpQLabel;
      tmpQLabel = new QLabel( sbMag, i18n("&Magnification"), this );
      tmpQLabel->setMinimumSize( tmpQLabel->sizeHint() );
      
      topLayout->addWidget( tmpQLabel );
      topLayout->addWidget( sbMag );
      
      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 );
      bbox->addStretch( 10 );
              
      QButton *ok = bbox->addButton( i18n("&OK") );
      connect( ok, SIGNAL(clicked()), SLOT(acceptMag()) );
      
      QButton *cancel = bbox->addButton( i18n("&Cancel") );
      connect( cancel, SIGNAL(clicked()), SLOT(reject()) );
               
      bbox->layout();
      topLayout->addWidget( bbox );

      topLayout->activate();
      
      resize( 200,0 );
}


kghostview'Zoom::acceptMag() (./kdegraphics/kghostview/zoom.cpp:75)

void Zoom::acceptMag()
{
      *mag = sbMag->value();
      accept();
}