1
0
mirror of https://gitee.com/drabel/LibQQt.git synced 2025-01-04 10:18:44 +08:00

move QQtObjectParcel to QQtObjectManager

This commit is contained in:
tianduanrui 2018-04-22 16:00:14 +08:00
parent f3243f204d
commit 149a49a406
17 changed files with 59 additions and 50 deletions

View File

@ -40,7 +40,9 @@ LibQQt现进行正式发布版本v2.1.6.0,欢迎工程师们使用。
6. 解决Qt4.8.7在嵌入式屏幕上QGraphics系统不正常绘画的问题
7. QQt输入法
- 重写了UI适配多种屏幕
8. Qt对象工厂允许注册、生成、查找和删除所有来自QObject以及QWidget的类。
8. Qt对象管理器
- 用于管理已经生成的Qt对象实例objectName是唯一查找索引。
- 含有QQtObjectFactory用于动态注册、生成来自QObject和QWidget的类。
9. 嵌入式视频播放器,模拟端口实时预览器
0. QQt打印机支持打印pdf
2. QQtWord支持doc文档编写输出pdf格式。

View File

@ -16,12 +16,12 @@ AnimationManager* AnimationManager::Instance(QObject* parent)
AnimationManager::AnimationManager(QObject* parent) : QObject(parent)
{
//init app's all animation
QPushButton* pushButton = (QPushButton*)QQtObjectParcel::registeredObject("pushButton");
QPushButton* pushButton_2 = (QPushButton*)QQtObjectParcel::registeredObject("pushButton_2");
QPushButton* pushButton_3 = (QPushButton*)QQtObjectParcel::registeredObject("pushButton_3");
QPushButton* pushButton_4 = (QPushButton*)QQtObjectParcel::registeredObject("pushButton_4");
QPushButton* pushButton_5 = (QPushButton*)QQtObjectParcel::registeredObject("pushButton_5");
QPushButton* pushButton_6 = (QPushButton*)QQtObjectParcel::registeredObject("pushButton_6");
QPushButton* pushButton = (QPushButton*)QQtObjectManager::registeredObject("pushButton");
QPushButton* pushButton_2 = (QPushButton*)QQtObjectManager::registeredObject("pushButton_2");
QPushButton* pushButton_3 = (QPushButton*)QQtObjectManager::registeredObject("pushButton_3");
QPushButton* pushButton_4 = (QPushButton*)QQtObjectManager::registeredObject("pushButton_4");
QPushButton* pushButton_5 = (QPushButton*)QQtObjectManager::registeredObject("pushButton_5");
QPushButton* pushButton_6 = (QPushButton*)QQtObjectManager::registeredObject("pushButton_6");
QQtAnimation* ani = new QQtAnimation(this);
QSequentialAnimationGroup* sa = new QSequentialAnimationGroup(ani);

View File

@ -14,7 +14,7 @@ QQTWindow::QQTWindow(QWidget* parent) :
{
ui->setupUi(this);
QQtObjectParcel::registerObject(this);
QQtObjectManager::registerObject(this);
#ifdef __EMBEDDED_LINUX__
/*
@ -29,12 +29,12 @@ QQTWindow::QQTWindow(QWidget* parent) :
setFixedSize(1024, 600);
moveCenter(this);
QQtObjectParcel::registerObject(ui->pushButton);
QQtObjectParcel::registerObject(ui->pushButton_2);
QQtObjectParcel::registerObject(ui->pushButton_3);
QQtObjectParcel::registerObject(ui->pushButton_4);
QQtObjectParcel::registerObject(ui->pushButton_5);
QQtObjectParcel::registerObject(ui->pushButton_6);
QQtObjectManager::registerObject(ui->pushButton);
QQtObjectManager::registerObject(ui->pushButton_2);
QQtObjectManager::registerObject(ui->pushButton_3);
QQtObjectManager::registerObject(ui->pushButton_4);
QQtObjectManager::registerObject(ui->pushButton_5);
QQtObjectManager::registerObject(ui->pushButton_6);
/**
* @brief QQtAnimationManager::Instance

View File

@ -11,7 +11,7 @@ QQTWindow::QQTWindow(QWidget *parent) :
{
ui->setupUi(this);
QQtObjectParcel::registerObject(this);
QQtObjectManager::registerObject(this);
#ifdef __EMBEDDED_LINUX__
/*

View File

@ -1 +0,0 @@
#include "qqtobjectfactory.h"

View File

@ -0,0 +1 @@
#include "qqtobjectmanager.h"

View File

@ -1,5 +1,5 @@
#ifndef QQTOBJECTFACTORY_H
#define QQTOBJECTFACTORY_H
#ifndef QQTOBJECTMANAGER_H
#define QQTOBJECTMANAGER_H
#include <QObject>
#include <QByteArray>
@ -122,10 +122,12 @@ private:
};
/**
* @brief The QQtObjectParcel class
* QQt
* @brief The QQtObjectManager class
* QQt
* Qt对象实例
* QQtObjectParcel
*/
class QQTSHARED_EXPORT QQtObjectParcel
class QQTSHARED_EXPORT QQtObjectManager
{
public:
/**
@ -295,4 +297,4 @@ private:
};
#endif
#endif // QQTOBJECTFACTORY_H
#endif // QQTOBJECTMANAGER_H

View File

@ -33,8 +33,8 @@ QQtProgressDialog::QQtProgressDialog(QWidget* parent) :
"./skin/default/bk_progress_chunk.png");
#endif
QQtObjectParcel::registerObject(this);
QQtObjectParcel::registerObject(ui->btnCancel);
QQtObjectManager::registerObject(this);
QQtObjectManager::registerObject(ui->btnCancel);
}
QQtProgressDialog::~QQtProgressDialog()

View File

@ -7,6 +7,10 @@
#include "qqt-local.h"
#include "qqtcore.h"
/**
* @brief The QQtTcpServer class
* QQtTcpClient管理器Socket管理器Socket
*/
class QQTSHARED_EXPORT QQtTcpServer : public QTcpServer
{
Q_OBJECT

View File

@ -134,22 +134,22 @@ void QQtTcpClient::socketStateChanged ( QAbstractSocket::SocketState eSocketStat
switch ( eSocketState )
{
case QAbstractSocket::HostLookupState:
case QAbstractSocket::ConnectingState:
break;
case QAbstractSocket::HostLookupState:
case QAbstractSocket::ConnectingState:
break;
case QAbstractSocket::ConnectedState:
break;
case QAbstractSocket::ConnectedState:
break;
case QAbstractSocket::ClosingState:
break;
case QAbstractSocket::ClosingState:
break;
case QAbstractSocket::UnconnectedState:
eConType++;
break;
case QAbstractSocket::UnconnectedState:
eConType++;
break;
default:
break;
default:
break;
}
}
@ -167,13 +167,13 @@ void QQtTcpClient::socketErrorOccured ( QAbstractSocket::SocketError e )
switch ( e )
{
case QAbstractSocket::RemoteHostClosedError:
break;
case QAbstractSocket::RemoteHostClosedError:
break;
case QAbstractSocket::HostNotFoundError:
default:
emit signalConnectFail();
break;
case QAbstractSocket::HostNotFoundError:
default:
emit signalConnectFail();
break;
}
}
@ -217,6 +217,7 @@ void QQtTcpClient::connectToSingelHost()
void QQtTcpClient::readyReadData()
{
//self, protocol, message
QByteArray bytes;
bytes = readAll();
m_protocol->translator ( bytes );

View File

@ -41,11 +41,11 @@ contains (QKIT_PRIVATE, WIN32||WIN64) {
SOURCES += \
$$PWD/core/qqtcore.cpp \
$$PWD/core/qqtdictionary.cpp \
$$PWD/core/qqtobjectfactory.cpp
$$PWD/core/qqtobjectmanager.cpp
HEADERS += \
$$PWD/core/qqtcore.h \
$$PWD/core/qqtdictionary.h \
$$PWD/core/qqtobjectfactory.h
$$PWD/core/qqtobjectmanager.h
#后台进程支持这个只有ios不支持这个支持在源文件pri里处理。
DEFINES += __PROCESSMODULE__

View File

@ -19,7 +19,7 @@ int main ( int argc, char* argv[] )
pline() << obj->inherits ( "QObject" );
obj->setObjectName ( "bbb" );
pline() << obj->objectName();
QQtObjectParcel::registerObject ( obj );
QQtObjectManager::registerObject ( obj );
*/
//对QQtDictNode的使用进行测试。

View File

@ -11,7 +11,7 @@ QQTWindow::QQTWindow(QWidget *parent) :
{
ui->setupUi(this);
QQtObjectParcel::registerObject(this);
QQtObjectManager::registerObject(this);
#ifdef __EMBEDDED_LINUX__
/*

View File

@ -25,7 +25,7 @@ AnimationManager::AnimationManager(QObject *parent) : QObject(parent)
* user can't decate qqtwindow
*/
QQTWindow* qqtwindow = (QQTWindow*)
QQtObjectParcel::registeredObject("QQTWindow");
QQtObjectManager::registeredObject("QQTWindow");
QQtAnimation* ani = new QQtAnimation(this);
QSequentialAnimationGroup* sani = new QSequentialAnimationGroup(ani);
QParallelAnimationGroup* pani = new QParallelAnimationGroup(ani);

View File

@ -22,7 +22,7 @@ QQTWindow::QQTWindow(QWidget *parent) :
{
ui->setupUi(this);
QQtObjectParcel::registerObject(this);
QQtObjectManager::registerObject(this);
#ifdef __EMBEDDED_LINUX__
/*

View File

@ -17,7 +17,7 @@ QQTWindow::QQTWindow(QWidget *parent) :
{
ui->setupUi(this);
QQtObjectParcel::registerObject(this);
QQtObjectManager::registerObject(this);
#ifdef __EMBEDDED_LINUX__
/*

View File

@ -13,7 +13,7 @@ QQTWindow::QQTWindow ( QWidget* parent ) :
{
ui->setupUi ( this );
QQtObjectParcel::registerObject ( this );
QQtObjectManager::registerObject ( this );
#ifdef __EMBEDDED_LINUX__
/*