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
147
148
149
150
151
152
|
/*
* Copyright (c) 1998 Denis Perchine <[email protected]>
* Copyright (c) 2004 Szombathelyi György <[email protected]>
* Maintained by Adriaan de Groot <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License version 2 as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
**/
#ifndef _KU_PROPDLG_H_
#define _KU_PROPDLG_H_
#include <tqlabel.h>
#include <tqpushbutton.h>
#include <tqwidget.h>
#include <tqlistbox.h>
#include <tqtooltip.h>
#include <tqcheckbox.h>
#include <tqlayout.h>
#include <tqmap.h>
#include <klineedit.h>
#include <kdatetimewidget.h>
#include <knuminput.h>
#include <kdialogbase.h>
#include <klistview.h>
#include <kcombobox.h>
#include "kuser.h"
class propdlg : public KDialogBase
{
Q_OBJECT
TQ_OBJECT
public:
propdlg( const TQPtrList<KU::KUser> &users,
TQWidget *parent = 0, const char *name = 0 );
propdlg( KU::KUser *AUser, bool fixedprivgroup,
TQWidget *parent = 0, const char *name = 0 );
~propdlg();
void mergeUser( KU::KUser *user, KU::KUser *newuser );
protected slots:
virtual void slotOk();
void setpwd();
void changed(); // Change to misc settings
void cbposixChanged(); // Change to diaable POSIX account info
void cbsambaChanged(); // Change to diaable POSIX account info
void gchanged(); // Change to group settings
void setpgroup(); // Change in primary group
protected:
void initDlg();
void selectuser();
void save();
bool saveg();
bool check();
void loadgroups( bool fixedprivgroup );
bool checkShell(const TQString &shell);
void addRow( TQWidget *parent, TQGridLayout *tqlayout, int row,
TQWidget *widget, const TQString &label, const TQString &what,
bool two_column=true, bool nochange=true );
void setLE( KLineEdit *le, const TQString &val, bool first );
void setCB( TQCheckBox *cb, bool val, bool first );
void setSB( KIntSpinBox *sb, int val, bool first );
TQString mergeLE( KLineEdit *le, const TQString &val, bool one );
int mergeSB( KIntSpinBox *sb, int val, bool one );
KIntSpinBox *addDaysGroup( TQWidget *parent, TQGridLayout *tqlayout, int row,
const TQString &title, bool never=true );
TQFrame *frontpage;
TQGridLayout *fronttqlayout;
int frontrow;
TQPtrList<KU::KUser> mUsers;
TQMap<TQWidget*, TQCheckBox*> mNoChanges;
bool ismoreshells;
bool ischanged;
bool isgchanged;
uid_t olduid;
uint oldrid;
TQString oldshell;
TQString primaryGroup;
bool primaryGroupWasOn;
bool ro;
TQString newpass;
time_t lstchg;
KListView *lstgrp;
TQPushButton *pbsetpwd;
TQLabel *lbuser;
KLineEdit *leid;
KLineEdit *lefname;
KLineEdit *lesurname;
KLineEdit *lemail;
KComboBox *leshell;
KLineEdit *lehome;
KLineEdit *leoffice;
KLineEdit *leophone;
KLineEdit *lehphone;
KLineEdit *leclass;
KLineEdit *leoffice1;
KLineEdit *leoffice2;
KLineEdit *leaddress;
TQCheckBox *cbdisabled;
TQCheckBox *cbposix;
TQCheckBox *cbsamba;
TQLabel *leprigr;
TQPushButton *pbprigr;
TQLabel *leslstchg;
KIntSpinBox *lesmin;
KIntSpinBox *lesmax;
KIntSpinBox *leswarn;
KIntSpinBox *lesinact;
KDateTimeWidget *lesexpire;
TQCheckBox *cbexpire;
//samba specific:
KLineEdit *lerid;
KLineEdit *leliscript;
KLineEdit *leprofile;
KLineEdit *lehomedrive;
KLineEdit *lehomepath;
KLineEdit *leworkstations;
KLineEdit *ledomain;
KLineEdit *ledomsid;
};
#endif // _KU_PROPDLG_H_
|