Back to index

scribus-ng  1.3.4.dfsg+svn20071115
Public Slots | Public Member Functions | Public Attributes | Protected Slots | Protected Attributes
ValueDialog Class Reference

Request for response from user - lightweight modal dialog 09/24/2004 petr vanek. More...

#include <valuedialog.h>

List of all members.

Public Slots

virtual void okButton_pressed ()

Public Member Functions

 ValueDialog (QWidget *parent=0, const char *name=0, bool modal=FALSE, WFlags fl=0)
 ~ValueDialog ()

Public Attributes

QLabel * dialogLabel
QLineEdit * valueEdit
QPushButton * okButton

Protected Slots

virtual void languageChange ()

Protected Attributes

QGridLayout * ScripterValueLayout
QVBoxLayout * layout3
QVBoxLayout * layout2
QHBoxLayout * layout1

Detailed Description

Request for response from user - lightweight modal dialog 09/24/2004 petr vanek.

Definition at line 24 of file valuedialog.h.


Constructor & Destructor Documentation

ValueDialog::ValueDialog ( QWidget *  parent = 0,
const char *  name = 0,
bool  modal = FALSE,
WFlags  fl = 0 
)

Definition at line 19 of file valuedialog.cpp.

       : QDialog( parent, name, modal, fl )
{
       if ( !name )
              setName( "ValueDialog" );
       setModal( true );
       ScripterValueLayout = new QGridLayout( this, 1, 1, 11, 6, "ScripterValueLayout");

       layout3 = new QVBoxLayout( 0, 0, 6, "layout3");

       dialogLabel = new QLabel( this, "dialogLabel" );
       dialogLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)5, 0, 0, dialogLabel->sizePolicy().hasHeightForWidth() ) );
       layout3->addWidget( dialogLabel );

       layout2 = new QVBoxLayout( 0, 0, 6, "layout2");

       valueEdit = new QLineEdit( this, "valueEdit" );
       layout2->addWidget( valueEdit );

       layout1 = new QHBoxLayout( 0, 0, 6, "layout1");
       QSpacerItem* spacer = new QSpacerItem( 40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
       layout1->addItem( spacer );

       okButton = new QPushButton( this, "okButton" );
       layout1->addWidget( okButton );
       layout2->addLayout( layout1 );
       layout3->addLayout( layout2 );

       ScripterValueLayout->addLayout( layout3, 0, 0 );
       languageChange();
       //resize( QSize(315, 101).expandedTo(minimumSizeHint()) );
       clearWState( WState_Polished );

       // signals and slots connections
       connect( okButton, SIGNAL( clicked() ), this, SLOT( okButton_pressed() ) );
}

Here is the call graph for this function:

Definition at line 59 of file valuedialog.cpp.

{
       // no need to delete child widgets, Qt does it all for us
}

Member Function Documentation

void ValueDialog::languageChange ( ) [protected, virtual, slot]

Definition at line 68 of file valuedialog.cpp.

{
       setCaption( tr( "Insert value" ) );
       dialogLabel->setText( tr( "Enter a value then press OK." ) );
       QToolTip::add( valueEdit, tr( "Enter a value then press OK" ) );
       okButton->setText( CommonStrings::tr_OK );
       okButton->setAccel( QKeySequence( tr( "Alt+O" ) ) );
       QToolTip::add( okButton, tr( "Send your value to the script" ) );
}

Here is the call graph for this function:

Here is the caller graph for this function:

void ValueDialog::okButton_pressed ( ) [virtual, slot]

Definition at line 78 of file valuedialog.cpp.

{
       accept();
}

Here is the caller graph for this function:


Member Data Documentation

Definition at line 32 of file valuedialog.h.

QHBoxLayout* ValueDialog::layout1 [protected]

Definition at line 43 of file valuedialog.h.

QVBoxLayout* ValueDialog::layout2 [protected]

Definition at line 42 of file valuedialog.h.

QVBoxLayout* ValueDialog::layout3 [protected]

Definition at line 41 of file valuedialog.h.

QPushButton* ValueDialog::okButton

Definition at line 34 of file valuedialog.h.

QGridLayout* ValueDialog::ScripterValueLayout [protected]

Definition at line 40 of file valuedialog.h.

Definition at line 33 of file valuedialog.h.


The documentation for this class was generated from the following files: