~ubuntu-branches/ubuntu/hoary/kvirc/hoary

« back to all changes in this revision

Viewing changes to src/plugins/stat/libkvistatoptions.h

  • Committer: Bazaar Package Importer
  • Author(s): Robin Verduijn
  • Date: 2004-12-14 15:32:19 UTC
  • mfrom: (0.2.1 upstream) (1.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20041214153219-fdink3gyp2s20b6g
Tags: 2:2.1.3.1-2
* Change Recommends on xmms to a Suggests.
* Rebuild against KDE 3.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**vim: ts=4, wrap, tw=80
2
 
  *
3
 
  *             --- libkvistatoptions.h ---
4
 
  *
5
 
  * This is a plugin for KVirc 2.0 Phoenix. It allows you to see
6
 
  * statistics of your IRC sessions - total words said etc.
7
 
  * More features are still to come.
8
 
  *
9
 
  * (c) Krzysztof Godlewski <kristoff@poczta.wprost.pl>
10
 
  *
11
 
  *
12
 
  * This program is FREE software. You can redistribute it and/or
13
 
  * modify it under the terms of the GNU General Public License
14
 
  * as published by the Free Software Foundation; either version 2
15
 
  * of the License, or (at your opinion) any later version.
16
 
  *
17
 
  * This program is distributed in the HOPE that it will be USEFUL,
18
 
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
 
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20
 
  * See the GNU General Public License for more details.
21
 
 
22
 
  * You should have received a copy of the GNU General Public License
23
 
  * along with this program. If not, write to the Free Software Foundation,
24
 
  * Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
 
  **/
26
 
 
27
 
#ifndef __KVISTATOPTIONS_H__
28
 
#define __KVISTATOPTIONS_H__
29
 
 
30
 
#include <qlist.h>
31
 
#include "kvirc_plugin.h"
32
 
 
33
 
// class QTab;
34
 
class QTabDialog;
35
 
class QLabel;
36
 
class QCheckBox;
37
 
class QVButtonGroup;
38
 
class QRadioButton;
39
 
class QComboBox;
40
 
class QSlider;
41
 
 
42
 
// Type of stats report performed on join to a channel
43
 
#define ShowNoStatsOnJoin                       0
44
 
#define ShowFullStatsOnJoin                     1
45
 
#define ShowCustomStatsOnJoin           2
46
 
 
47
 
// indexes of Custom Stats checkboxes
48
 
#define ShowJoinsOnJoin                         0
49
 
#define ShowWordsOnJoin                         1
50
 
#define ShowKicksOnJoin                         2
51
 
#define ShowBansOnJoin                          3
52
 
#define ShowTopicsOnJoin                        4
53
 
 
54
 
// indexes of SysTray Widget checkboxes
55
 
#define SysTrayEnabled                                  5
56
 
#define SysTrayShowWords                                6
57
 
#define SysTrayShowJoins                                7
58
 
#define SysTrayShowKicks                                8
59
 
#define SysTrayShowBans                                 9
60
 
#define SysTrayShowTopics                               10
61
 
 
62
 
#define ScrollingNever                                  0       
63
 
#define ScrollingAlways                                 1
64
 
#define ScrollingWhenNeeded                             2
65
 
 
66
 
class KviStatOptions : public QTabDialog
67
 
{
68
 
        Q_OBJECT
69
 
public:
70
 
        KviStatOptions();
71
 
        ~KviStatOptions() {}
72
 
 
73
 
// Used to set the options - check/uncheck checkboxes, set correct
74
 
// radioButton checked
75
 
        void setOptions( unsigned int numOfRadioBtnChecked, bool , bool ,
76
 
                 bool , bool , bool );
77
 
                
78
 
// Same as above but for SysTray widget options
79
 
        void setSysTrayOptions( bool, bool, bool, bool, bool, bool );
80
 
        
81
 
// and for scrolling options
82
 
        void setScrollingOptions( int, int, int, bool dir_left );
83
 
                
84
 
// Used to read the options, sets numOfRadioBtnChecked to number of
85
 
// radioButton checked (stats showing on join), sets the bool variables to
86
 
// correct values, depending on which option from "Custom stats" is chosen
87
 
        void getOptions( int &numOfRadioBtnChecked, bool &, bool &, bool &,
88
 
                bool &, bool & );
89
 
        
90
 
// Similar to above, but for SysTray widget
91
 
        void getSysTrayOptions( bool &, bool &, bool &, bool &, bool &, bool & );
92
 
        
93
 
// and for scrolling
94
 
        void getScrollingOptions( int &, int &, int &, bool & );
95
 
                
96
 
private slots:
97
 
// Called everytime a specific button is pressed - toggles tabs, buttons etc
98
 
        void slotToggle();
99
 
// I need another one, with an int parameter....
100
 
        void slotToggleScroll(int);
101
 
                
102
 
private:
103
 
        QList<QRadioButton> rbuttons;
104
 
        QList<QCheckBox> cboxes;
105
 
        QList<QLabel> labels;
106
 
        QVBox *m_pCustomStatsTab;
107
 
        QSlider *delaySlider;
108
 
        QSlider *smoothnessSlider;
109
 
        QComboBox *dirBox;
110
 
        QComboBox *scrollBox;
111
 
};
112
 
 
113
 
#endif  // __KVISTATOPTIONS_H__
114