4
* Copyright (c) 2000 Alexander Neundorf <alexander.neundorf@rz.tu-ilmenau.de>
6
* Requires the Qt widget libraries, available at no cost at
9
* This program is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation; either version 2 of the License, or
12
* (at your option) any later version.
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
19
* You should have received a copy of the GNU General Public License
20
* along with this program; if not, write to the Free Software
21
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23
#ifndef kcmsambastatistics_h_included
24
#define kcmsambastatistics_h_included
26
#include <Qt3Support/Q3PtrList>
43
SmallLogItem(const QString &n) :
53
name(""), accessed(), count(0) {
55
LogItem(const QString &n, const QString &a) :
56
name(n), accessed(), count(1) {
57
accessed.setAutoDelete(true);
58
accessed.append(new SmallLogItem(a));
61
//QStrList accessedBy;
62
Q3PtrList<SmallLogItem> accessed;
64
SmallLogItem* itemInList(const QString &name);
65
void addItem(const QString &host);
71
items.setAutoDelete(true);
73
Q3PtrList<LogItem> items;
74
void addItem(const QString &share, const QString &host);
77
LogItem* itemInList(const QString &name);
80
class StatisticsView : public QWidget {
83
explicit StatisticsView(QWidget *parent=0, KConfig *config=0);
84
virtual ~StatisticsView() {
91
void setListInfo(Q3ListView *list, int nrOfFiles, int nrOfConnections);
95
Q3ListView* viewStatistics;
96
QLabel* connectionsL, *filesL;
103
QPushButton* calcButton, *clearButton;
104
QCheckBox* expandedInfoCb, *expandedUserCb;
105
int connectionsCount, filesCount, calcCount;
107
void clearStatistics();
110
#endif // main_included