syscommugroupmgt.h 1.64 KB
Newer Older
Cindy Ye's avatar
Cindy Ye committed
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
#ifndef SYSCOMMUGROUPMGT_H
#define SYSCOMMUGROUPMGT_H

#include <tbaseutil/tdataresponse.h>
#include <tdatabaseutil/tsqlselectorv2.h>
#include <topcore/topclassabs.h>
#include <topcore/topclasshelper.h>

class TTableView;
class TSearchEntry;
class TPageTool;
class TSplitter;
class SysCommuGroup;

class SysCommuGroupMgt : public TopClassAbs
{
    Q_OBJECT
public:
    explicit SysCommuGroupMgt(const QString &iModuleNameStr = QString(""),
                        const QVariantMap &iUrlPars = QVariantMap(),
                        QWidget *iParent = nullptr);
    ~SysCommuGroupMgt();

public slots:
    void refresh(bool iResetPageBol = true);
    void deleteItem(const QVariantList &iIdLst);
    QVariantList selectedItems();
    TopClassAbs *openItem(int iIdInt);
    void newItem();
    void onClearNavi();
    void onNaviDataChanged();
    QVariantList plantList();
    QVariantList departmentList();
    QVariantMap departmentMap();

private slots:
    void onPageChanged();
    void onSelectionChanged();
    void onDetailSaved(const QVariant &iUidStr);
    void onDetailChanged();

private:
    TSqlSelectorV2 getSqlSelector(bool iResetPageBol = true);
    void initTableView();
    void initNaviView();
    void fillTableData(const TDataResponse &iDataRes);

private:
    TTableView *mTableView = nullptr;
    TSearchEntry *mSearchEntry= nullptr;
    TPageTool *mPageTool= nullptr;
    QVariantList mSelectedLst;
    SysCommuGroup *mDetailView= nullptr;
    TSplitter *mBodySplitter = nullptr;
    TSplitter* mBodyWidget = nullptr;
    TUiLoader *mNaviView = nullptr;
    QString mFixedSqlWhere;
    TopClassTableConf mTableConf;
};

#endif // SYSCOMMUGROUPMGT_H