~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to kinfocenter/Modules/samba/kcmsambalog.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * kcmsambalog.h
 
3
 *
 
4
 * Copyright (c) 2000 Alexander Neundorf <neundorf@kde.org>
 
5
 *
 
6
 * Requires the Qt widget libraries, available at no cost at
 
7
 * http://www.troll.no/
 
8
 *
 
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.
 
13
 *
 
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.
 
18
 *
 
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.
 
22
 */
 
23
#ifndef kcmsambalog_h_included
 
24
#define kcmsambalog_h_included
 
25
 
 
26
#include <QLabel>
 
27
#include <QCheckBox>
 
28
#include <QPushButton>
 
29
#include <Qt3Support/Q3CheckListItem>
 
30
#include <QEvent>
 
31
#include <kconfig.h>
 
32
 
 
33
#include <kurlrequester.h>
 
34
 
 
35
#define LOGGROUPNAME "SambaLogFileSettings"
 
36
 
 
37
class LogView : public QWidget {
 
38
Q_OBJECT
 
39
public:
 
40
        explicit LogView(QWidget *parent=0, KConfig *config=0);
 
41
        virtual ~LogView() {
 
42
        }
 
43
        void saveSettings();
 
44
        void loadSettings();
 
45
private:
 
46
        KConfig *configFile;
 
47
        int filesCount, connectionsCount;
 
48
        KUrlRequester logFileName;
 
49
        QLabel label;
 
50
        Q3ListView viewHistory;
 
51
        QCheckBox showConnOpen, showConnClose, showFileOpen, showFileClose;
 
52
        QPushButton updateButton;
 
53
private Q_SLOTS:
 
54
        void updateList();
 
55
Q_SIGNALS:
 
56
        void contentsChanged(Q3ListView* list, int nrOfFiles, int nrOfConnections);
 
57
};
 
58
 
 
59
class QListViewItemX : public Q3ListViewItem {
 
60
public:
 
61
        //a faster constructor saves a lot time
 
62
        QListViewItemX(Q3ListView * parent, const char *c0, const char *c1 = 0, const char *c2 = 0, const char *c3 = 0, const char *c4 = 0, const char *c5 = 0, const char *c6 = 0, const char *c7 = 0) :
 
63
                Q3ListViewItem(parent) {
 
64
                setText( 0, c0);
 
65
                setText( 1, c1);
 
66
                setText( 2, c2);
 
67
                setText( 3, c3);
 
68
                if (c4==0)
 
69
                        return;
 
70
                setText( 4, c4);
 
71
                if (c5==0)
 
72
                        return;
 
73
                setText( 5, c5);
 
74
                if (c6==0)
 
75
                        return;
 
76
                setText( 6, c6);
 
77
                if (c7==0)
 
78
                        return;
 
79
                setText( 7, c7);
 
80
        }
 
81
};
 
82
 
 
83
#endif // main_included