From fc42c7317c956e5bc6e74bfbb1ec185d2faa79f4 Mon Sep 17 00:00:00 2001 From: llornkcor Date: Wed, 07 Apr 2004 13:07:42 +0000 Subject: add gutenbrowser --- (limited to 'noncore/apps/opie-gutenbrowser/editTitle.cpp') 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 @@ +/**************************************************************************** +** Created: Thu Jan 24 08:47:37 2002 + copyright : (C) 2000 -2004 by llornkcor + email : ljp@llornkcor.com +****************************************************************************/ +#include "editTitle.h" + +#include +#include + +Edit_Title::Edit_Title( QWidget* parent, const char* name, bool modal, WFlags fl) + : QDialog( parent, name, modal, fl ) +{ + if ( !name ) + setName( "Edit_Title" ); + resize( 240, 110 ); + setMaximumSize( QSize( 240, 110 ) ); + setCaption( tr( "Edit Title" ) ); + + LineEdit1 = new QLineEdit( this, "LineEdit1" ); + LineEdit1->setGeometry( QRect( 5, 22, 230, 22 ) ); + newTitle=name; + LineEdit1->setText(newTitle); + + PushButton_Cancel = new QPushButton( this, "PushButton_Cancel" ); + PushButton_Cancel->setGeometry( QRect( 180, 80, 50, 20 ) ); + PushButton_Cancel->setText( tr( "Cancel" ) ); + + PushButton_Apply = new QPushButton( this, "PushButton_Apply" ); + PushButton_Apply->setGeometry( QRect( 120, 80, 50, 20 ) ); + + PushButton_Apply->setText( tr( "Apply" ) ); + + // signals and slots connections + connect( PushButton_Cancel, SIGNAL( released() ),this, SLOT( onCancel() ) ); + connect( PushButton_Apply, SIGNAL( released() ), this, SLOT( onApply() ) ); +} + +/* + * Destroys the object and frees any allocated resources + */ +Edit_Title::~Edit_Title() +{ + // no need to delete child widgets, Qt does it all for us +} + +void Edit_Title::onCancel() { + reject(); +} + +void Edit_Title::onApply() { + newTitle= LineEdit1->text(); + accept(); +} -- cgit v0.9.0.2