Source: /app/hbasic/hbasic/packages/hbasic_radmin/host_list.h


Annotated List
Files
Globals
Hierarchy
Index

#ifndef HOSTLIST_H
#define HOSTLIST_H

#include 
#include 
#include 

#include "node_data.h"

class QString;
class QToolBar;
class QPopupMenu;
class QSplitter;
class QSqlDatabase;
class CDBConnect;

/* Action entry types */
#define AC_ET_NONE 0
#define AC_ET_DOCU 1

#define AC_NOACTION 0
#define AC_INSTALL_FTPD 1
#define AC_EDIT_USER 2
#define AC_TEST_CLIENT 3
#define AC_CLIENT_VERSION 4
#define AC_SYSTEM_INFO 5
#define AC_INSTALL_SW 6
#define AC_XINETD_SERVICE 7
#define AC_STARTUP_SERVICE 8
#define AC_SHOW_DOC 9
#define AC_EDIT_ASC 10
#define AC_PAM_CONFIG 11
#define AC_FTP_CONFIG 12
#define AC_FTP_WELCOME 13
#define AC_FTP_FTPUSER 14
#define AC_EDIT_ASCII_FILE 15
#define AC_LOG_DISPLAY 16
#define AC_EDIT_GROUP 17

#define AC_NONE 100
#define AC_PACKAGE 101
#define AC_DOCU_HEADER 102
#define AC_DOCU_ENTRY 103
#define AC_CONFIG_HEADER 104
#define AC_CONFIG_ENTRY 105
#define AC_HOST 106
#define AC_SW_PACKAGE 107
#define AC_SW_ENTRY 108
#define AC_EXEC_COMMAND 110


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

class CInfoListItem : public QListViewItem
{
public:
	CInfoListItem( QListView *parent, char *text, short new_entry_type, char *subentry_path );
	CInfoListItem( QListViewItem *parent, char *text, short new_entry_type, char *subentry_path );

	short action_number;
	short entry_type;
	QString subentry_path;
};

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

class CHostListWin : public QMainWindow
{
Q_OBJECT

public:
	CHostListWin( QWidget *parent );

private:
	int list_mode;
	/* Pointer to config file if loaded. */
	char *config_file_ptr;
	/* Allocated file length for config file. */
	long config_file_allocated;
	QPtrList  node_list;
	CDBConnect *db_hosts;

	QSplitter *sp_main;
	QListView *lv_hosts;
	QListView *lv_packages;
	QToolBar *tb_infotype;
	QPopupMenu *popup_menu;
	QListViewItem *last_selected_entry;
	char *parseHostEntry( char *cptr );
	char *parseSoftwarePackage( char *cptr );
	void showDocuWindow( char *filename );
	void showAsciiEditor( short edit_mode, char *filename );
	void findInstalledPackages( QListViewItem *lv_item, int host_id );
	void createPackageSubentries( QListViewItem *host_item, int pckg_id );
	void showSoftwareAndConfig( QListViewItem *lv_item, int node_id );
	void createHostList( void );
	void createPackageList( void );
	void createInfoCommandList( void );
	void listHelpCommands( void );

private slots:
	void slotDblClicked( QListViewItem *lv_entry );
	void slotRightButtonPressed( QListViewItem *sel_item, const QPoint &pos, int num);
	void slotInstallPackage( void );
	void slotDisplayInfo( void );
	void slotShowPackages( void );
	void slotShowInfo( void );
	void slotDropPackage( void );

public slots:
	char *selectedHost( void );
};

#endif

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