summaryrefslogtreecommitdiffstats
path: root/src/knutinstcomms.h
blob: b7c4244f2c6c93e972684f103321220549e42d08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/***************************************************************************
                          knutinstcomms.h  -  description
                             -------------------
    begin                : ct ríj 24 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 KNUTINSTCOMMS_H
#define KNUTINSTCOMMS_H

#include "knutnet.h"

#include <kdialogbase.h>
#include <klineedit.h>
#include <kcombobox.h>
#include <klocale.h>


class TQString;


/**
 * This class is graphic interface for runinng of instant commands.
 * Tato trida je graficke rozhrani pro spusteni okamzitych prikazu.
 *
 * @author Daniel Prynych
 * @short Okamzite prikazy
 * @version 0.4
*/
class KNutInstComms : public KDialogBase  {
public:


/**
 * Construktor - Creates window for select of instant command.
 * Konstruktor - vytvori okno pro vyber okamziteho prikazu.
 *
 * @param uName Determines user name.
 * @param password Determines passwprd.
 * @param uName Urcuje uzivatelske jmeno.
 * @param password Urcuje heslo.
 * @param upsNet Je odkaz na instanci tridy KNutNet.
 *
 * @since  0.4
 **/
  KNutInstComms(TQString* userName, TQString* userPassword, const TQString uName, const TQString password, KNutNet* const upsNet, TQWidget* tqparent = 0, const char* name = 0, bool const modal = TRUE);

/**
 * Destruktor
 *
 * @since  0.3
 **/
  ~KNutInstComms();


/**
 * Vraci true pokud existuje pripojeni na server a vytvorilo se
 * ovladaci okno pro odeslani prikazu.
 *
 * @since  0.3
 **/
  bool upsOk (void) { return m_upsConnectOk; };


private slots:
/**
 * @internal
 *
 * Provede akci, da prikaz k provedeni okamziteho prikazu.
 */
  virtual void slotOk();


private:
  KLineEdit *m_lineEditName;
  KLineEdit *m_lineEditPassword;
  KComboBox *m_instCommBox;

  KNutNet* m_upsNet;
  bool m_upsConnectOk;

  TQString* m_oldUserName;
  TQString* m_oldUserPassword;

};

#endif