Source: /app/hbasic/hbasic/packages/hbasic_usercomp/hbasic_usercomp.h


Annotated List
Files
Globals
Hierarchy
Index

#ifndef USERCOMP_H
#define USERCOMP_H

#include "qlistview.h"
#include 

#define MODE_CREATE 0
#define MODE_UPDATE 1

#define CHANGETYPE_DELUSER 0
#define CHANGETYPE_ADDUSER 1

class QString;
class QWidget;
class QPushButton;
class QLineEdit;

class dlgNewUser : public QDialog
{
Q_OBJECT

public:
	dlgNewUser( QWidget *parent, QListViewItem *lv_item );

	QLineEdit *le_user;
	QLineEdit *le_user_id;
	QLineEdit *le_group_id;
	QLineEdit *le_real_name;
	QLineEdit *le_home_dir;
	QLineEdit *le_init_shell;

private:
	short change_mode;
	QPushButton *btn_ok;
	QPushButton *btn_cancel;
	void resizeEvent( QResizeEvent *evt );

private slots:
	void slotOk( void );
	void slotCancel( void );
};

/*---------------------------------------------------------------------------- */

class dlgNewGroup : public QDialog
{
Q_OBJECT

public:
	dlgNewGroup( QWidget *parent, QListViewItem *text );

	QLineEdit *le_group;
	QLineEdit *le_group_id;
	QLineEdit *le_guser;

private:
	short change_mode;
	QString old_guser;
	QPushButton *btn_ok;
	QPushButton *btn_cancel;

	short nameNotFound( char *findname, QString intext );
	void compareUserlist( short type, QString text1, QString text2 );
	void resizeEvent( QResizeEvent *evt );

private slots:
	void slotOk( void );
	void slotCancel( void );
};

/*---------------------------------------------------------------------------- */

class CUserComp : public QWidget
{
	Q_OBJECT

public:
	CUserComp( QWidget *parent );

private:
	QListView *lv_user;
	QPushButton *btn_add;
	QPushButton *btn_del;
	char *user_desc;

	void resizeEvent( QResizeEvent *evt );
	void createUserList( void );
	void loadPasswd( void );

private slots:
	void slotAddUser();
	void slotDeleteUser();
	void slotDblClicked( QListViewItem *lv_item );

public slots:
	void addUser( char *name );
};

/*---------------------------------------------------------------------------- */

class CGroupComp : public QWidget
{
	Q_OBJECT

public:
	CGroupComp( QWidget *parent );

private:
	QListView *lv_group;
	QPushButton *btn_add;
	QPushButton *btn_del;
	char *group_desc;

	void resizeEvent( QResizeEvent *evt );
	void createGroupList( void );
	void loadGroup( void );

private slots:
	void slotAddGroup();
	void slotDeleteGroup();
	void slotDblClicked( QListViewItem *lv_item );
};

/*---------------------------------------------------------------------------- */

#endif

Generated by: root on linux on Sun Jul 13 18:06:35 2003, using kdoc 2.0a54.