summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-gutenbrowser/editTitle.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-gutenbrowser/editTitle.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-gutenbrowser/editTitle.cpp54
1 files changed, 54 insertions, 0 deletions
diff --git a/noncore/apps/opie-gutenbrowser/editTitle.cpp b/noncore/apps/opie-gutenbrowser/editTitle.cpp
new file mode 100644
index 0000000..100370c
--- a/dev/null
+++ b/noncore/apps/opie-gutenbrowser/editTitle.cpp
@@ -0,0 +1,54 @@
1/****************************************************************************
2** Created: Thu Jan 24 08:47:37 2002
3 copyright : (C) 2000 -2004 by llornkcor
4 email : ljp@llornkcor.com
5****************************************************************************/
6#include "editTitle.h"
7
8#include <qlineedit.h>
9#include <qpushbutton.h>
10
11Edit_Title::Edit_Title( QWidget* parent, const char* name, bool modal, WFlags fl)
12 : QDialog( parent, name, modal, fl )
13{
14 if ( !name )
15 setName( "Edit_Title" );
16 resize( 240, 110 );
17 setMaximumSize( QSize( 240, 110 ) );
18 setCaption( tr( "Edit Title" ) );
19
20 LineEdit1 = new QLineEdit( this, "LineEdit1" );
21 LineEdit1->setGeometry( QRect( 5, 22, 230, 22 ) );
22 newTitle=name;
23 LineEdit1->setText(newTitle);
24
25 PushButton_Cancel = new QPushButton( this, "PushButton_Cancel" );
26 PushButton_Cancel->setGeometry( QRect( 180, 80, 50, 20 ) );
27 PushButton_Cancel->setText( tr( "Cancel" ) );
28
29 PushButton_Apply = new QPushButton( this, "PushButton_Apply" );
30 PushButton_Apply->setGeometry( QRect( 120, 80, 50, 20 ) );
31
32 PushButton_Apply->setText( tr( "Apply" ) );
33
34 // signals and slots connections
35 connect( PushButton_Cancel, SIGNAL( released() ),this, SLOT( onCancel() ) );
36 connect( PushButton_Apply, SIGNAL( released() ), this, SLOT( onApply() ) );
37}
38
39/*
40 * Destroys the object and frees any allocated resources
41 */
42Edit_Title::~Edit_Title()
43{
44 // no need to delete child widgets, Qt does it all for us
45}
46
47void Edit_Title::onCancel() {
48 reject();
49}
50
51void Edit_Title::onApply() {
52 newTitle= LineEdit1->text();
53 accept();
54}