summaryrefslogtreecommitdiffstats
path: root/wifi/kwifimanager.h
blob: 6a58de441347bf5baaf75282c289c3e380458f12 (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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
/***************************************************************************
          kwifimanager.h  -  a graphical interface for wireless LAN cards
                             -------------------
    begin                : Sam Apr  7 11:44:20 CEST 2001
    copyright            : (C) 2001 by Stefan Winter
    email                : mail@stefan-winter.de
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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 KWIFIMANAGER_H
#define KWIFIMANAGER_H

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

// include files for TQt
class TQLabel;
class TQTimer;
class TQPixmap;
class TQPushButton;
class TQStringList;

// include files for KDE
#include <kmainwindow.h>
class KSystemTray;
class KToggleAction;
class KProcess;

// application specific includes
#include "interface_wireless.h"
#include "interface_dcop.h"
class Strength;
class Status;
class Picture;
class Locator;
class Speed;
class Statistics;
class NetworkScanning;
class Led;

extern TQStringList usedInterfacesList();

enum speedlevels
{ AUTO, M1, M2, M55, M11 };
enum packetmode
{ UNI, MULTI, BOTH };
enum cryptomodes
{ OPEN, RESTRICTED };

struct configuration_data
{
  TQString net_name[5];
  TQString disp_name[5];
  bool managed[5];
  bool crypto_enabled[5];
  int active_crypto_key[5];
  TQString active_key_string[5];
  TQString crypto1[5], crypto2[5], crypto3[5], crypto4[5];
  bool crypto_is_string1[5], crypto_is_string2[5], crypto_is_string3[5],
    crypto_is_string4[5];
  cryptomodes crypto_mode[5];
  bool pm_enabled[5];
  int sleep_time[5];
  TQString sleep_time_string[5];
  int wake_time[5];
  TQString wake_time_string[5];
  speedlevels bitrate[5];
  packetmode packet[5];
};

class KWiFiManagerApp:public KMainWindow, virtual public dcop_interface
{
  Q_OBJECT
  TQ_OBJECT

public:
  KWiFiManagerApp (TQWidget * parent = 0, const char * name = 0);
   ~KWiFiManagerApp ();
  TQString interface () const { return device ? device->get_interface_name() : TQString(); };
  public:
  bool startDocked() { return m_startDocked; }
  public slots:
  void slotToggleShowStrengthNumber ();
  void slotDisableRadio ();
  void slotFileQuit ();
  void slotStartConfigEditor ();
  void slotStartStatViewer ();
  void slotToggleTric ();
  void slotToggleStrengthCalc ();
  void slotToggleStayInSystray ();
  void slotChangeTrayIcon ();
  void slotChangeWindowCaption ();
  void slotLogESSID (TQString essid);
  void slotTXPowerChanged ();
  void slotShowStatsNoise ();
  void slotNetworkScan();
  void tricorder_beep ();
  void slotDisablePowerProcessExited();
  virtual bool queryClose();
  virtual bool queryExit();
  virtual void readProperties( KConfig* );
  virtual void saveProperties( KConfig* );
private:
  void initActions ();
  void initView ();
  Speed *speedmeter;
  TQBoxLayout *bla;
  TQLabel *profil;
  Status *status;
  Strength *strength;
  Picture *pictogram;
  Locator *location;
  NetworkScanning* scanwidget;
  TQWidget *view;
  Statistics *statistik;
  KToggleAction *fileDisableRadio;
  KToggleAction *settingsUseAlternateCalc;
  KToggleAction *settingsStayInSystrayOnClose;
  KToggleAction *settingsAcousticScanning;
  KToggleAction *settingsShowStatsNoise;
  KToggleAction *settingsShowStrengthNumber;
  KSystemTray *trayicon;
  void init_whois_db ();
  TQTimer *tricorder_trigger, *counter;
  TQPixmap *pixmap;
  Interface_wireless *device;
  TQPushButton * scan;
  Led *led;
  KProcess* disablePower;
  bool showStrength;
  bool showStatsNoise;
  bool m_startDocked;
  bool m_shuttingDown;
  int m_iconSize;
};

#endif /* KWIFIMANAGER_H */