~ubuntu-branches/ubuntu/intrepid/knutclient/intrepid

« back to all changes in this revision

Viewing changes to src/knutrwvar.h

  • Committer: Bazaar Package Importer
  • Author(s): Stephan Hermann
  • Date: 2007-03-08 16:08:31 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070308160831-0kes374x4jhkcea5
Tags: 0.9.3-1ubuntu1
* UVE Exception: New Upstream release
* Fixes BTS #410405 (FTBFS on x86_64)
* debian/rules:
  - commented out dh_iconcache call
* debian/control:
  - Added Ubuntu MOTU Maintainer Field
  - Moved old Maintainer field to Original-Maintainer
* debian/changelog:
  - Merged Ubuntu Changelog entries

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
                          knutrwvar.h  -  description
 
3
                             -------------------
 
4
    begin                : So r�j 26 2002
 
5
    copyright            : (C) 2002 by Daniel Prynych
 
6
    email                : Daniel.Prynych@alo.cz
 
7
 ***************************************************************************/
 
8
 
 
9
/***************************************************************************
 
10
 *                                                                         *
 
11
 *   This program is free software; you can redistribute it and/or modify  *
 
12
 *   it under the terms of the GNU General Public License as published by  *
 
13
 *   the Free Software Foundation; either version 2 of the License, or     *
 
14
 *   (at your option) any later version.                                   *
 
15
 *                                                                         *
 
16
 ***************************************************************************/
 
17
 
 
18
#ifndef KNUTRWVAR_H
 
19
#define KNUTRWVAR_H
 
20
 
 
21
#include "knutnet.h"
 
22
 
 
23
#include <kdialogbase.h>
 
24
#include <klineedit.h>
 
25
#include <klocale.h>
 
26
#include <kcombobox.h>
 
27
 
 
28
//#include <qstring.h>
 
29
//#include <qlayout.h>
 
30
 
 
31
class QString;
 
32
class QGridLayout;
 
33
 
 
34
/**
 
35
 * Tato trida je graficke rozhrani pro zmenu RW promennych.
 
36
 *
 
37
 * @author Daniel Prynych
 
38
 * @short RW promenne
 
39
 * @version 0.1.1
 
40
*/
 
41
class KNutRWVar : public KDialogBase  {
 
42
  Q_OBJECT
 
43
  public: 
 
44
/**
 
45
 * Konstruktor - vytvori okno pro zmenu RW promene.
 
46
 *
 
47
 * @param uName Urcuje uzivatelske jmeno.
 
48
 * @param password Urcuje heslo.
 
49
 * @param upsNet Je odkaz na instanci tridy KNutNet.
 
50
 * @since  0.1
 
51
 **/
 
52
  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);
 
53
 
 
54
/**
 
55
 * Destruktor
 
56
 *
 
57
 * @since  0.2
 
58
 **/
 
59
  ~KNutRWVar();
 
60
 
 
61
/**
 
62
 * Vraci true pokud existuje pripojeni na server a vytvorilo se
 
63
 * ovladaci okno pro nastaveni promennych.
 
64
 *
 
65
 * @since  0.3
 
66
 **/
 
67
  bool upsOk (void);
 
68
 
 
69
  
 
70
  private slots:
 
71
 
 
72
/**
 
73
 * @internal
 
74
 *
 
75
 * Nastavi hodnotu a zpusob vyberu hodnoty promenne.
 
76
 */
 
77
  void slotChangeVar(int item);
 
78
 
 
79
/**
 
80
 * @internal
 
81
 *
 
82
 * Nastavi hodnotu promenne na puvodni hodnotu.
 
83
 */
 
84
  virtual void slotDefault ();
 
85
 
 
86
/**
 
87
 * @internal
 
88
 *
 
89
 * Provede akci
 
90
 */
 
91
  virtual void slotOk();
 
92
 
 
93
 
 
94
 
 
95
/**
 
96
 * @internal
 
97
 *
 
98
 * Najde pozadovanou polozku v boxu.
 
99
 * Ve verzi qt > 3.0.0 neni potreba.
 
100
 */
 
101
int findItem(const KComboBox *myBox ,const QString text);
 
102
 
 
103
  signals:
 
104
/**
 
105
 * Signal je aktivovam pokud je zmenen udaj na kterekoliv strance.
 
106
 *
 
107
 * @param changeSetting Udava co bylo zmeneno.
 
108
 *
 
109
 * @since  0.1
 
110
 **/
 
111
  void signalChangeRWVars (QString varName);
 
112
 
 
113
 
 
114
    private:
 
115
    KNutNet* myUpsNet;
 
116
    KLineEdit *lineEditName;
 
117
    KLineEdit *lineEditPassword;
 
118
    KComboBox *rWVarBox;
 
119
    KComboBox *valueVarBox;
 
120
    KLineEdit *valueVarLine;
 
121
    QGridLayout *passLayout;
 
122
    bool upsValueType;
 
123
    bool upsConnectOk;
 
124
 
 
125
  QString* oldUserName;
 
126
  QString* oldUserPassword;
 
127
 
 
128
    
 
129
  };
 
130
 
 
131
#endif