diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-19 18:17:02 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-19 18:17:02 +0000 |
commit | f867212c1762e156553d039319b904a17f7b563d (patch) | |
tree | 461c1a743b3ff8291e03360742dbbfb4cc0087e4 /src/knutrwvar.h | |
download | knutclient-f867212c1762e156553d039319b904a17f7b563d.tar.gz knutclient-f867212c1762e156553d039319b904a17f7b563d.zip |
Added KDE3 version of knutclient
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/knutclient@1092914 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/knutrwvar.h')
-rwxr-xr-x | src/knutrwvar.h | 140 |
1 files changed, 140 insertions, 0 deletions
diff --git a/src/knutrwvar.h b/src/knutrwvar.h new file mode 100755 index 0000000..4cef64c --- /dev/null +++ b/src/knutrwvar.h @@ -0,0 +1,140 @@ +/*************************************************************************** + knutrwvar.h - description + ------------------- + begin : So ríj 26 2002 + copyright : (C) 2002 by Daniel Prynych + email : Daniel.Prynych@alo.cz + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef KNUTRWVAR_H +#define KNUTRWVAR_H + +#include "knutnet.h" + +#include <kdialogbase.h> +#include <klineedit.h> +#include <klocale.h> +#include <kcombobox.h> + + +class QString; +class QGridLayout; + +/** + * This class is graphics interface for changes of RW variables. + * Tato trida je graficke rozhrani pro zmenu RW promennych. + * + * @author Daniel Prynych + * @short RW promenne + * @version 0.2 +*/ +class KNutRWVar : public KDialogBase { + Q_OBJECT + public: +/** + * Constructor - makes window for change of RW variable. + * Konstruktor - vytvori okno pro zmenu RW promene. + * + + * @param uName Describes user name. + * @param password Describes password. + * @param initUpsNet is pointer of intance of class KNutNet. + * @param userName Urcuje uzivatelske jmeno. + * @param userPassword Urcuje heslo. + * @param uName Urcuje uzivatelske jmeno. + * @param password Urcuje heslo. + * @param initUpsNet Je odkaz na instanci tridy KNutNet. + * @since 0.2 + **/ + KNutRWVar(QString* userName, QString* userPassword, const QString uName, const QString password, KNutNet* const initUpsNet, QWidget* parent = 0, const char* name = 0, const bool modal = TRUE); + +/** + * Destructor + * + * @since 0.2 + **/ + ~KNutRWVar(); + +/** + * Vraci true pokud existuje pripojeni na server a vytvorilo se + * ovladaci okno pro nastaveni promennych. + * + * @since 0.3 + **/ + bool upsOk (void); + + + private slots: + +/** + * @internal + * + * Nastavi hodnotu a zpusob vyberu hodnoty promenne. + */ + void slotChangeVar(int item); + +/** + * @internal + * + * Sets value of variable on default value + * Nastavi hodnotu promenne na puvodni hodnotu. + */ + virtual void slotDefault (); + +/** + * @internal + * + * Provede akci + */ + virtual void slotOk(); + + + +/** + * @internal + * + * Find asked item in box + * Since at version 3.0.0 is not needed. + * Najde pozadovanou polozku v boxu. + * Ve verzi qt > 3.0.0 neni potreba. + */ +int findItem(const KComboBox *myBox ,const QString text); + + signals: +/** + * Signal je aktivovam pokud je zmenen udaj na kterekoliv strance. + * + * @param changeSetting Udava co bylo zmeneno. + * + * @since 0.1 + **/ + void signalChangeRWVars (QString varName); + + + private: + KNutNet* m_upsNet; + KLineEdit *m_lineEditName; + KLineEdit *m_lineEditPassword; + KComboBox *m_rWVarBox; + KComboBox *m_valueVarBox; + KLineEdit *m_valueVarLine; + QGridLayout *m_passLayout; + bool m_upsValueType; + bool m_upsConnectOk; + + QString* m_oldUserName; + QString* m_oldUserPassword; + + + }; + +#endif |