-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
以面向对象思想重构了大部分代码。
- Loading branch information
gztss
committed
Sep 7, 2018
1 parent
4416859
commit 6b2a79f
Showing
75 changed files
with
1,674 additions
and
1,351 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#ifndef CONTROLLER_H | ||
#define CONTROLLER_H | ||
|
||
#include <QObject> | ||
|
||
class QMenu; | ||
class QAction; | ||
class QSettings; | ||
class QTabWidget; | ||
class PortManager; | ||
class ViewManager; | ||
class ToolBoxManager; | ||
|
||
class Controller : public QObject | ||
{ | ||
Q_OBJECT | ||
public: | ||
explicit Controller(QString *docPath, QTabWidget *tabWidget, | ||
QMenu *menu, QAction *openAction, QAction *saveAction); | ||
void setPortManager(PortManager *manager); | ||
void loadConfig(QSettings *config); | ||
void saveConfig(QSettings *config); | ||
void loadSettings(QSettings *config); | ||
void retranslate(); | ||
void setEnabled(bool enabled); | ||
void clear(void); | ||
void setPause(bool paused) { m_pause = paused; } | ||
int receiveCount() { return m_rxCount; } | ||
int transmitCount () { return m_txCount; } | ||
void setWindowOpacity(qreal level); | ||
|
||
signals: | ||
|
||
private slots: | ||
void readPortData(); | ||
void writePortData(const QByteArray &array); | ||
|
||
private: | ||
ViewManager *m_views; | ||
ToolBoxManager *m_toolBoxs; | ||
PortManager *m_port; | ||
bool m_pause = false; | ||
int m_rxCount = 0, m_txCount = 0; | ||
}; | ||
|
||
#endif // CONTROLLER_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
#ifndef __VERSION_H | ||
#define __VERSION_H | ||
|
||
#define MAIN_VERSION 1.2.6 | ||
#define MAIN_VERSION 1.3.0Beta | ||
|
||
#define SOFTWARE_NAME "SerialTool" | ||
#define COPYRIGHT "Copyleft 2017-2018, Wenliang Guan" | ||
|
||
#define _STR_(s) #s | ||
#define __STR(s) _STR_(s) | ||
|
||
#define BUILD_VERSION _STR_(57a6fM) | ||
#define BUILD_VERSION _STR_(5880dM) | ||
#define SOFTWARE_VERSION __STR(MAIN_VERSION) | ||
|
||
#endif |
Oops, something went wrong.