Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

editTitle.cpp

Go to the documentation of this file.
00001 /****************************************************************************
00002 ** Created: Thu Jan 24 08:47:37 2002
00003     copyright            : (C) 2000 -2004 by llornkcor
00004     email                : ljp@llornkcor.com
00005 ****************************************************************************/
00006 #include "editTitle.h"
00007 
00008 #include <qlineedit.h>
00009 #include <qpushbutton.h>
00010 
00011 Edit_Title::Edit_Title( QWidget* parent,  const char* name, bool modal, WFlags fl)
00012     : QDialog( parent, name, modal, fl )
00013 {
00014     if ( !name )
00015   setName( "Edit_Title" );
00016     resize( 240, 110 ); 
00017     setMaximumSize( QSize( 240, 110 ) );
00018     setCaption( tr( "Edit Title" ) );
00019 
00020     LineEdit1 = new QLineEdit( this, "LineEdit1" );
00021     LineEdit1->setGeometry( QRect( 5, 22, 230, 22 ) );
00022     newTitle=name;
00023     LineEdit1->setText(newTitle);
00024     
00025     PushButton_Cancel = new QPushButton( this, "PushButton_Cancel" );
00026     PushButton_Cancel->setGeometry( QRect( 180, 80, 50, 20 ) ); 
00027     PushButton_Cancel->setText( tr( "Cancel" ) );
00028 
00029     PushButton_Apply = new QPushButton( this, "PushButton_Apply" );
00030     PushButton_Apply->setGeometry( QRect( 120, 80, 50, 20 ) );
00031     
00032     PushButton_Apply->setText( tr( "Apply" ) );
00033 
00034     // signals and slots connections
00035     connect( PushButton_Cancel, SIGNAL( released() ),this, SLOT( onCancel() ) );
00036     connect( PushButton_Apply, SIGNAL( released() ), this, SLOT( onApply() ) );
00037 }
00038 
00039 /*  
00040  *  Destroys the object and frees any allocated resources
00041  */
00042 Edit_Title::~Edit_Title()
00043 {
00044     // no need to delete child widgets, Qt does it all for us
00045 }
00046 
00047 void Edit_Title::onCancel() {
00048     reject();
00049 }
00050 
00051 void Edit_Title::onApply() {
00052   newTitle= LineEdit1->text();
00053   accept();
00054 }

Generated on Sat Nov 5 16:16:51 2005 for OPIE by  doxygen 1.4.2