Fix crash if key bindings specified in profile cannot be found. Improve
[personal-kdebase.git] / apps / kinfocenter / samba / kcmsambalog.h
blob36f79289c7a514c688376550924d155315586d94
1 /*
2 * kcmsambalog.h
4 * Copyright (c) 2000 Alexander Neundorf <neundorf@kde.org>
6 * Requires the Qt widget libraries, available at no cost at
7 * http://www.troll.no/
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 kcmsambalog_h_included
24 #define kcmsambalog_h_included
26 #include <QLabel>
27 #include <QCheckBox>
28 #include <QPushButton>
29 #include <Qt3Support/Q3CheckListItem>
30 #include <QEvent>
31 #include <kconfig.h>
33 #include <kurlrequester.h>
35 #define LOGGROUPNAME "SambaLogFileSettings"
37 class LogView : public QWidget {
38 Q_OBJECT
39 public:
40 explicit LogView(QWidget *parent=0, KConfig *config=0);
41 virtual ~LogView() {
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);
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);
83 #endif // main_included