first commit
This commit is contained in:
20
test/qxClientServer/qxServer/include/export.h
Normal file
20
test/qxClientServer/qxServer/include/export.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef _QX_SERVER_EXPORT_H_
|
||||
#define _QX_SERVER_EXPORT_H_
|
||||
|
||||
#include "../../qxService/include/export.h"
|
||||
|
||||
#ifdef _BUILDING_QX_SERVER
|
||||
#define QX_SERVER_DLL_EXPORT QX_DLL_EXPORT_HELPER
|
||||
#else // _BUILDING_QX_SERVER
|
||||
#define QX_SERVER_DLL_EXPORT QX_DLL_IMPORT_HELPER
|
||||
#endif // _BUILDING_QX_SERVER
|
||||
|
||||
#ifdef _BUILDING_QX_SERVER
|
||||
#define QX_REGISTER_HPP_QX_SERVER QX_REGISTER_HPP_EXPORT_DLL
|
||||
#define QX_REGISTER_CPP_QX_SERVER QX_REGISTER_CPP_EXPORT_DLL
|
||||
#else // _BUILDING_QX_SERVER
|
||||
#define QX_REGISTER_HPP_QX_SERVER QX_REGISTER_HPP_IMPORT_DLL
|
||||
#define QX_REGISTER_CPP_QX_SERVER QX_REGISTER_CPP_IMPORT_DLL
|
||||
#endif // _BUILDING_QX_SERVER
|
||||
|
||||
#endif // _QX_SERVER_EXPORT_H_
|
||||
47
test/qxClientServer/qxServer/include/main_dlg.h
Normal file
47
test/qxClientServer/qxServer/include/main_dlg.h
Normal file
@@ -0,0 +1,47 @@
|
||||
#ifndef _QX_SERVER_MAIN_DLG_H_
|
||||
#define _QX_SERVER_MAIN_DLG_H_
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#ifdef _QX_NO_PRECOMPILED_HEADER
|
||||
#ifndef Q_MOC_RUN
|
||||
#include "../include/precompiled.h" // Need to include precompiled header for the generated moc file
|
||||
#endif // Q_MOC_RUN
|
||||
#endif // _QX_NO_PRECOMPILED_HEADER
|
||||
|
||||
#include "../qt/ui/include/ui_qxServer.h"
|
||||
|
||||
class main_dlg : public QWidget, private Ui::dlgServer
|
||||
{
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
|
||||
qx::service::QxThreadPool_ptr m_pThreadPool; // Server thread pool to receive all requests
|
||||
qx::QxDaoAsync m_daoAsync; // To test to run queries in a different thread
|
||||
|
||||
public:
|
||||
|
||||
main_dlg(QWidget * parent = NULL) : QWidget(parent), Ui::dlgServer() { main_dlg::init(); }
|
||||
virtual ~main_dlg() { ; }
|
||||
|
||||
private:
|
||||
|
||||
void init();
|
||||
void loadServices();
|
||||
|
||||
private Q_SLOTS:
|
||||
|
||||
void onClickStartStop();
|
||||
void onCboIndexChanged(int index);
|
||||
void onError(const QString & err, qx::service::QxTransaction_ptr transaction);
|
||||
void onServerIsRunning(bool bIsRunning, qx::service::QxServer * pServer);
|
||||
void onTransactionFinished(qx::service::QxTransaction_ptr transaction);
|
||||
void onQueryFinished(const QSqlError & daoError, qx::dao::detail::QxDaoAsyncParams_ptr pDaoParams);
|
||||
|
||||
};
|
||||
|
||||
#endif // _QX_SERVER_MAIN_DLG_H_
|
||||
9
test/qxClientServer/qxServer/include/precompiled.h
Normal file
9
test/qxClientServer/qxServer/include/precompiled.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef _QX_SERVER_PRECOMPILED_HEADER_H_
|
||||
#define _QX_SERVER_PRECOMPILED_HEADER_H_
|
||||
|
||||
#include <QxOrm.h>
|
||||
#include <QxServices.h>
|
||||
|
||||
#include "export.h"
|
||||
|
||||
#endif // _QX_SERVER_PRECOMPILED_HEADER_H_
|
||||
Reference in New Issue
Block a user