author | benmeyer <benmeyer> | 2002-10-02 18:53:13 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-10-02 18:53:13 (UTC) |
commit | c997983c6917885f6c487b942a9b294fa50ae618 (patch) (side-by-side diff) | |
tree | aa876ae8bd51e11e4e0e943f961702c88fba1c8c | |
parent | 56a0a990842a5b57b961c064809aae27f087562d (diff) | |
download | opie-c997983c6917885f6c487b942a9b294fa50ae618.zip opie-c997983c6917885f6c487b942a9b294fa50ae618.tar.gz opie-c997983c6917885f6c487b942a9b294fa50ae618.tar.bz2 |
initial commit
-rw-r--r-- | noncore/net/networksetup/namedialog.cpp | 61 | ||||
-rw-r--r-- | noncore/net/networksetup/namedialog.h | 36 | ||||
-rw-r--r-- | noncore/settings/networksettings/namedialog.cpp | 61 | ||||
-rw-r--r-- | noncore/settings/networksettings/namedialog.h | 36 |
4 files changed, 194 insertions, 0 deletions
diff --git a/noncore/net/networksetup/namedialog.cpp b/noncore/net/networksetup/namedialog.cpp new file mode 100644 index 0000000..c5efa37 --- a/dev/null +++ b/noncore/net/networksetup/namedialog.cpp @@ -0,0 +1,61 @@ +/**************************************************************************** +** Form implementation generated from reading ui file 'namedialog.ui' +** +** Created: Sat Dec 15 04:36:20 2001 +** by: The User Interface Compiler (uic) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ +#include "namedialog.h" + +#include <qlineedit.h> +#include <qpushbutton.h> +#include <qlayout.h> +#include <qvariant.h> +#include <qtooltip.h> +#include <qwhatsthis.h> + +/* + * Constructs a NameDialog which is a child of 'parent', with the + * name 'name' and widget flags set to 'f' + * + * The dialog will by default be modeless, unless you set 'modal' to + * TRUE to construct a modal dialog. + */ +NameDialog::NameDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) + : QDialog( parent, name, modal, fl ) +{ + if ( !name ) + setName( "NameDialog" ); + resize( 176, 65 ); + setCaption( tr( "Enter A Name" ) ); + NameDialogLayout = new QGridLayout( this ); + NameDialogLayout->setSpacing( 6 ); + NameDialogLayout->setMargin( 5 ); + + Name = new QLineEdit( this, "Name" ); + + NameDialogLayout->addMultiCellWidget( Name, 0, 0, 0, 1 ); + + cancel = new QPushButton( this, "Cancel" ); + cancel->setText( tr( "&Cancel" ) ); + + NameDialogLayout->addWidget( cancel, 1, 1 ); + + ok = new QPushButton( this, "ok" ); + ok->setText( tr( "&Ok" ) ); + + NameDialogLayout->addWidget( ok, 1, 0 ); + + connect( ok, SIGNAL( clicked() ), this, SLOT( accept() ) ); + connect( cancel, SIGNAL( clicked() ), this, SLOT( reject() ) ); + connect( Name, SIGNAL(returnPressed () ), this, SLOT(accept() ) ); +} + +QString NameDialog::go(){ + if( exec() ) //pressed OK + return (Name->text()); + else //pressed cancel + return QString(); +} + diff --git a/noncore/net/networksetup/namedialog.h b/noncore/net/networksetup/namedialog.h new file mode 100644 index 0000000..4c4e149 --- a/dev/null +++ b/noncore/net/networksetup/namedialog.h @@ -0,0 +1,36 @@ +/**************************************************************************** +** Form interface generated from reading ui file 'namedialog.ui' +** +** Created: Sat Dec 15 04:36:14 2001 +** by: The User Interface Compiler (uic) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ +#ifndef NAMEDIALOG_H +#define NAMEDIALOG_H + +#include <qvariant.h> +#include <qdialog.h> +class QVBoxLayout; +class QHBoxLayout; +class QGridLayout; +class QLineEdit; +class QPushButton; + +class NameDialog : public QDialog +{ + Q_OBJECT + +public: + NameDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + + QLineEdit* Name; + QPushButton* cancel; + QPushButton* ok; + QString go(); + +protected: + QGridLayout* NameDialogLayout; +}; + +#endif // NAMEDIALOG_H diff --git a/noncore/settings/networksettings/namedialog.cpp b/noncore/settings/networksettings/namedialog.cpp new file mode 100644 index 0000000..c5efa37 --- a/dev/null +++ b/noncore/settings/networksettings/namedialog.cpp @@ -0,0 +1,61 @@ +/**************************************************************************** +** Form implementation generated from reading ui file 'namedialog.ui' +** +** Created: Sat Dec 15 04:36:20 2001 +** by: The User Interface Compiler (uic) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ +#include "namedialog.h" + +#include <qlineedit.h> +#include <qpushbutton.h> +#include <qlayout.h> +#include <qvariant.h> +#include <qtooltip.h> +#include <qwhatsthis.h> + +/* + * Constructs a NameDialog which is a child of 'parent', with the + * name 'name' and widget flags set to 'f' + * + * The dialog will by default be modeless, unless you set 'modal' to + * TRUE to construct a modal dialog. + */ +NameDialog::NameDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) + : QDialog( parent, name, modal, fl ) +{ + if ( !name ) + setName( "NameDialog" ); + resize( 176, 65 ); + setCaption( tr( "Enter A Name" ) ); + NameDialogLayout = new QGridLayout( this ); + NameDialogLayout->setSpacing( 6 ); + NameDialogLayout->setMargin( 5 ); + + Name = new QLineEdit( this, "Name" ); + + NameDialogLayout->addMultiCellWidget( Name, 0, 0, 0, 1 ); + + cancel = new QPushButton( this, "Cancel" ); + cancel->setText( tr( "&Cancel" ) ); + + NameDialogLayout->addWidget( cancel, 1, 1 ); + + ok = new QPushButton( this, "ok" ); + ok->setText( tr( "&Ok" ) ); + + NameDialogLayout->addWidget( ok, 1, 0 ); + + connect( ok, SIGNAL( clicked() ), this, SLOT( accept() ) ); + connect( cancel, SIGNAL( clicked() ), this, SLOT( reject() ) ); + connect( Name, SIGNAL(returnPressed () ), this, SLOT(accept() ) ); +} + +QString NameDialog::go(){ + if( exec() ) //pressed OK + return (Name->text()); + else //pressed cancel + return QString(); +} + diff --git a/noncore/settings/networksettings/namedialog.h b/noncore/settings/networksettings/namedialog.h new file mode 100644 index 0000000..4c4e149 --- a/dev/null +++ b/noncore/settings/networksettings/namedialog.h @@ -0,0 +1,36 @@ +/**************************************************************************** +** Form interface generated from reading ui file 'namedialog.ui' +** +** Created: Sat Dec 15 04:36:14 2001 +** by: The User Interface Compiler (uic) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ +#ifndef NAMEDIALOG_H +#define NAMEDIALOG_H + +#include <qvariant.h> +#include <qdialog.h> +class QVBoxLayout; +class QHBoxLayout; +class QGridLayout; +class QLineEdit; +class QPushButton; + +class NameDialog : public QDialog +{ + Q_OBJECT + +public: + NameDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + + QLineEdit* Name; + QPushButton* cancel; + QPushButton* ok; + QString go(); + +protected: + QGridLayout* NameDialogLayout; +}; + +#endif // NAMEDIALOG_H |