00001
00002
00003
00004
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
00035 connect( PushButton_Cancel, SIGNAL( released() ),this, SLOT( onCancel() ) );
00036 connect( PushButton_Apply, SIGNAL( released() ), this, SLOT( onApply() ) );
00037 }
00038
00039
00040
00041
00042 Edit_Title::~Edit_Title()
00043 {
00044
00045 }
00046
00047 void Edit_Title::onCancel() {
00048 reject();
00049 }
00050
00051 void Edit_Title::onApply() {
00052 newTitle= LineEdit1->text();
00053 accept();
00054 }