You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
118 lines
4.0 KiB
C++
118 lines
4.0 KiB
C++
#ifndef GUI_SRV_H
|
|
#define GUI_SRV_H
|
|
|
|
#include <QtGui/QMainWindow>
|
|
#include "ui_gui_srv.h"
|
|
#include "glbtypes.h"
|
|
#include "mvl_defs.h"
|
|
#include "ai_objid.h"
|
|
#include "ac_rpt.h"
|
|
#include "ac_reqm.h"
|
|
//#include "sysincs.h"
|
|
//#include "as_ctrl.h"
|
|
//#include "usermap.h"
|
|
//#include "as_sg.h"
|
|
#include <QStandardItem>
|
|
#include <QStandardItemModel>
|
|
#include <QStringList>
|
|
//#include "dialog_state.h"
|
|
//#include "dialog_sg.h"
|
|
//#include "dialog_ctrl.h"
|
|
#include <QModelIndex>
|
|
#include <QMenu>
|
|
#include <QAction>
|
|
#include "dialog_rcb.h"
|
|
#include "FtpCLient.h"
|
|
class gui_srv : public QMainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
gui_srv(QWidget *parent = 0, Qt::WFlags flags = 0);
|
|
~gui_srv();
|
|
QStandardItemModel *model;
|
|
QStandardItemModel *tbmodel;
|
|
void out_put(ST_CHAR* );
|
|
void tb_recreatecolumn();
|
|
void tb_recreatecolumn_data();
|
|
void init_fun();
|
|
void InsertLD(ST_INT srv_id,QStandardItem *item_srv);
|
|
void InsertLN(AI_IED_CTRL *ied,AI_OBJ_ID dom_id,QStandardItem *item_ld_name,ST_INT srv_id);
|
|
void InsertDS(AI_IED_CTRL *ied,AI_OBJ_ID dom_id,QStandardItem *item_ld_name,ST_INT srv_id);
|
|
void InsertFC(AI_IED_CTRL *ied,AI_OBJ_ID dom_id,QStandardItem *item_ld_name,ST_INT srv_id);
|
|
void InsertVA(AI_IED_CTRL *ied,AI_OBJ_ID dom_id,QStandardItem *item_ld_name,ST_INT srv_id);
|
|
void LoadDS(ST_INT srv_id, AI_OBJ_ID obj_id);
|
|
void LoadLD(ST_INT srv_id, AI_OBJ_ID obj_id);
|
|
void LoadLN(ST_INT srv_id, AI_OBJ_ID obj_id);
|
|
void LoadFC(ST_INT srv_id, AI_OBJ_ID obj_id);
|
|
void LoadVA(ST_INT srv_id, AI_OBJ_ID obj_id);
|
|
void LoadSubVA(ST_INT srv_id, AI_OBJ_ID obj_id);
|
|
void SetServerIcon(ST_INT srv_id, bool srvstate);
|
|
ST_VOID _on_connectedToChnl(ST_INT srv_id, AC_CHANNEL chnl);
|
|
ST_VOID _on_disconnectedToChnl(ST_INT srv_id, AC_CHANNEL chnl);
|
|
ST_VOID _on_recv_report(VISIBLE_STRING65_TDEF RptID, ST_INT obj_num,
|
|
AI_OBJ_VAL *obj_val, ST_BOOLEAN *val_chgs,
|
|
AC_REPORT_REASON *reasons, ST_INT srv_id);
|
|
ST_VOID _on_read_req(AC_REQ_CTRL *req_ctrl) ;
|
|
ST_VOID _on_dir_req(AC_REQ_CTRL *req_ctrl);
|
|
QString dbfilepath;
|
|
FtpCLient ftpcli;
|
|
void ftp_filetran(QString sor,QString dev,int trantype);
|
|
public slots:
|
|
void print_log(QString);
|
|
private:
|
|
Ui::gui_srvClass ui;
|
|
QWidget *widget;
|
|
QMenu *tmenu;
|
|
ST_INT srv_id_s;
|
|
AI_OBJ_ID obj_id_s;
|
|
QAction *act_read;
|
|
QAction *act_write;
|
|
QAction *act_directory;
|
|
QAction *act_report;
|
|
QAction *act_log;
|
|
QAction *act_control;
|
|
QAction *act_fixedValue;
|
|
QAction *act_connA;
|
|
QAction *act_connB;
|
|
void createActions();
|
|
void createMenus();
|
|
void setconnA(bool conn);
|
|
void setconnB(bool conn);
|
|
void SetControlState(QStringList controllst);
|
|
|
|
private slots:
|
|
void on_action_clear_triggered();
|
|
void on_action_exit_triggered();
|
|
void on_action_sg_triggered();
|
|
void on_action_ctrl_triggered();
|
|
void on_action_refresh_triggered();
|
|
void on_action_filetran_triggered();
|
|
void on_action_paramtodb_triggered();
|
|
void on_action_clearparam_triggered();
|
|
//void on_action_exportparamindex_triggered();
|
|
void t_connectedToChnl(ST_INT srv_id, AC_CHANNEL chnl);
|
|
void t_disconnectedToChnl(ST_INT srv_id, AC_CHANNEL chnl);
|
|
void ShowContextMenu(const QPoint& pos);
|
|
void treeViewclicked(QModelIndex qmindex);
|
|
void act_read_clicked();
|
|
void act_write_clicked();
|
|
void act_directory_clicked();
|
|
void act_report_clicked();
|
|
void act_log_clicked();
|
|
void act_control_clicked();
|
|
void act_fixedValue_clicked();
|
|
void act_connA_clicked();
|
|
void act_connB_clicked();
|
|
void test();
|
|
void t_ftp_filetran(QString sor,QString dev,int trantype);
|
|
|
|
signals:
|
|
void out_put_signal(QString);
|
|
void s_connectedToChnl(ST_INT , AC_CHANNEL);
|
|
void s_disconnectedToChnl(ST_INT, AC_CHANNEL);
|
|
void s_ftp_filetran(QString,QString,int);
|
|
};
|
|
|
|
#endif // GUI_SRV_H
|