/vp_plugins/print_monitor/engine.h
http://cupsfilter.googlecode.com/ · C Header · 171 lines · 86 code · 22 blank · 63 comment · 0 complexity · dd388f6f11e526e295f42a489ec2d304 MD5 · raw file
- #ifndef ENGINE_H
- #define ENGINE_H
- #include <QtCore/QObject>
- #include <QtCore/QFileInfo>
- QT_FORWARD_DECLARE_CLASS ( QStringList )
- QT_FORWARD_DECLARE_CLASS ( QLocalSocket )
- QT_FORWARD_DECLARE_CLASS ( QStandardItemModel )
- QT_FORWARD_DECLARE_CLASS ( QStringListModel )
- class mySocketClient;
- class Message;
- #include "mytypes.h"
- using namespace VPrn;
- class Engine :public QObject
- {
- Q_OBJECT
- public:
- Engine(QObject*parent = 0,const QString &link = QString(),
- const QString &gk_bin = QString());
- void needRestart();
- /**
- * @fn ~Engine();
- * @brief ? ??????????? ????????? ??????? ????????? ? ???? ??? ???? ????????? ???
- */
- ~Engine();
- /**
- * @fn void setDocCardModel
- * @fn void setPrintersModel
- * @fn void setStampsModel
- * @fn void setTemplatesModel
- * @fn void setMandatsModel
- * @short ???????? ????????? ?? ??????? ??????
- */
- void setDocCardModel (QStandardItemModel *pDC_model ) {m_DC_model = pDC_model; }
- void setPrintersModel (QStandardItemModel *pPrn_model ) {m_Prn_model = pPrn_model;}
- void setTemplatesModel (QStandardItemModel *pTmpl_model ) {m_Tmpl_model = pTmpl_model;}
- void setMandatsModel (QStringListModel *pMandats_model ){m_Mandats_model = pMandats_model;}
- void setStampsModel (QStringListModel *pStamp_model ) {m_Stamp_model = pStamp_model;}
- /**
- @fn void prepareFileToPrint(const QString & file_name);
- @brief ??????????? ?????? ?? GateKeeper ? ??????????? ?????????????? ps -> pdf
- */
- void prepareFileToPrint(const QString & file_name);
- void markCurrentDocBrack();
- void markCurrentDocClear();
- signals:
- void error(VPrn::AppErrorType eCode,const QString eMsg);
- // ????????? ????????? ??????? ?? ????????
- void MergeDocWithTemplates( bool flag,const QString &info);
- // ?????? ????? ? ?????????????? ????????? ?????????????
- void PicturesList (QStringList page_list);
- // ?????? ????? ??? ?????????????? ?????????? ??????? ??? ??????
- //void ReadyForPrintPages(QByteArray page_list);
- // ???????? ?????????? ????????? ??????
- void reciveGoodBayMsg(const QString &shutdown_info);
- //???????? ??????????????? ? ?? ????? (?????/???????, ??????????? ????????)
- void RegisterDocInBase(bool flag,const QString &info);
- // ????????? ??????????? ??????? ? ??????????
- void authToDevice(bool flag,const QString &info);
- void infoMessage(const QString &info);
- void gk_notReady(const QString &ext_info); // ????????? ?????? ?? ????? ? ??????
- // ????????? ???????????? ???????????? ???? ???, ? ????? ? ???????
- void needAuthUser(const QString &login_mandat_list);
- void gk_fullReady(const QString &login,const QString &mandat);
- // ??????????? ?? ????????? ???????
- void LocalSrvRegistr();
- void RemoteDemonRegistr();
- void ReciveUserName();
- void ReciveUserMandat();
- //????????? ?????? ?????? ?????? ????????? ????????? ??????? ????????????
- void RecivePrintersList();
- void ReciveSecLevelList();
- // ???????? ??????? ????????????? ? pdf
- void doc_converted();
- void showInfoMsg(const QString &info_txt);
- void UserNeedFlipPages();
- void UserNeedCheckLastPage();
- void UserNeedMarkCopies(const QString &detail_txt);
-
- public slots:
- void do_printCurrentDoc();
- /**
- * @fn void launchAndConnect();
- * @brief ????????? ???? ??????? GateKeeper (????????? ??? ???? ?? ???????)
- * ? ???????????? ? ??? ?????? ? ????????????? ?????????
- */
- void launchAndConnect();
- void setAuthData(const QString &login,const QString &mandat);
- /**
- * @fn void authUserToPrinter();
- * @brief ??????????? ???????? ???????????? ?? ????????? ?????????? ??????
- */
- void authUserToPrinter();
- /**
- * @fn void checkMB();
- * @brief ???????? ?? ???? ?????? ???????? ?? ????? ??
- */
- void checkMB();
- /**
- * @fn
- * @brief ???????????? ?????? ???? ?? ??????? ?????????????,
- * ?????????? ????????? ?????????????? pdf -> png ? ???????? ???
- */
- void do_select_mode(int mode);
- private slots:
- void do_checkPointChanged(MyCheckPoints r_cpoint);
- /**
- * @fn void parseMessage(const Message r_msg);
- * @brief ????????? ?????????? ????????? ?? ?????????? ???????
- */
- void parseMessage(const Message &r_msg);
- private:
- QStandardItemModel *m_DC_model;
- QStandardItemModel *m_Prn_model;
- QStandardItemModel *m_Tmpl_model;
- QStringListModel *m_Mandats_model;
- QStringListModel *m_Stamp_model;
- mySocketClient *m_LocalClient;
- bool stopLaunch;
- QString currentUserName;
- QString currentUserMandat;
- QString link_name;
- QString gatekeeper_bin;
- // @var client_uuid; ?????????? ????? ?????????? ?? GateKeeper
- QString client_uuid;
- //-------------------------------------------------------------------------------------
- void sendMessage2LocalSrv(const Message &s_msg);
- void afterConnectSteps();
- void savePrintersListToModel(const QString &prn_list);
- void saveTemplatesListToModel(QByteArray tmpl_list);
- void setSecLevelList(QStringList &list );
- /**
- * @fn void setPageCountInModel(int pCnt);
- * @brief ?????? ????? ??????? ? ?????? ????????_?????????
- */
- void setPageCountInModel(int pCnt);
- QString findPrinterInModel();
- /**
- * @fn void registerMB();
- * @brief ??????????? ? ???? ?????? ????????? ? ?????????? ???????????
- */
- void registerMB();
- /**
- * @fn QByteArray getAllFieldData();
- * @brief ????????? ?? ?????? ????????_????????? ?????? ??????
- */
- QByteArray getAllFieldData();
- QString findTemplatesFilePathInModel ( int id );
- QString findStampInModel ( int id );
- };
- #endif // ENGINE_H