Lock func merge
This commit is contained in:
@@ -85,6 +85,11 @@ void InputObject::initUi()
|
||||
bool InputObject::eventFilter(QObject* obj, QEvent* event)
|
||||
{
|
||||
|
||||
if (event->type() == QEvent::MouseButtonPress)
|
||||
{
|
||||
emit touchScreen();
|
||||
qDebug() << "touchScreen()";
|
||||
}
|
||||
//mouse button release means setfocus is useless
|
||||
if (event->type() == QEvent::MouseButtonRelease)
|
||||
{
|
||||
|
||||
@@ -21,6 +21,8 @@ public:
|
||||
~InputObject();
|
||||
bool eventFilter(QObject* obj, QEvent* event);
|
||||
void ShowPanel();
|
||||
signals:
|
||||
void touchScreen();
|
||||
private:
|
||||
Ui::InputObject* ui;
|
||||
void initUi();
|
||||
|
||||
@@ -55,8 +55,8 @@ int main(int argc, char* argv[])
|
||||
InputObject* obj = new InputObject();
|
||||
a.installEventFilter(obj);
|
||||
SQLHelper::Open();
|
||||
UserOperationLog::Default()->init();
|
||||
MainWindow w;
|
||||
QObject::connect(obj, SIGNAL(touchScreen()), &w, SLOT(refreshTimer()));
|
||||
|
||||
|
||||
QStringList app_args = a.arguments();
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QDebug>
|
||||
#include <QTimer>
|
||||
#include "StdOutRedirector.h"
|
||||
namespace Ui {
|
||||
class MainWindow;
|
||||
@@ -21,7 +23,13 @@ public:
|
||||
void requestLogin();
|
||||
QTextEdit* getEdit();
|
||||
void debugConsoleOn();
|
||||
public slots:
|
||||
void coverScreen();
|
||||
void refreshTimer();
|
||||
|
||||
private:
|
||||
QTimer* screenTimer = nullptr;
|
||||
int counter = 30000;
|
||||
Ui::MainWindow* ui;
|
||||
GUIMessageDialog* msgDialog = nullptr;
|
||||
StdOutRedirector* redir = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user