Commit dc5a5b92 authored by Victor Yacovlev's avatar Victor Yacovlev

Build fix

parent 1e93a57e
...@@ -9,6 +9,61 @@ ...@@ -9,6 +9,61 @@
#include <iostream> #include <iostream>
#include "pultlogger.h" #include "pultlogger.h"
#define SCROLL_STEP 10
#define RESP_PANEL 50
#define LOGGER_BUTTONS 140
#define TEXT_STEP 14
#define UP 1
#define DOWN 2
#define LEFT 3
#define RIGHT 4
#define TEXTT 5
#define TEXT 5
logLine::logLine(QString KumCommand,
QString LogCommand,
QString React,QFrame* frame,QFrame* respFrame,uint pos)
{
kumCommand=KumCommand;
logCommand=LogCommand;
react=React;
textLabel=new QLabel(frame);
textLabel->setText(logCommand);
textLabel->move(4,pos);
textLabel->resize(120,20);
textLabel->show();
respLabel=new QLabel(respFrame);
respLabel->setText(React);
respLabel->move(4,pos);
respLabel->resize(RESP_PANEL,20);
respLabel->show();
}
void logLine::moveUp()
{
textLabel->move(textLabel->x(),textLabel->y()-SCROLL_STEP);
respLabel->move(respLabel->x(),respLabel->y()-SCROLL_STEP);
}
void logLine::moveDown()
{
textLabel->move(textLabel->x(),textLabel->y()+SCROLL_STEP);
respLabel->move(respLabel->x(),respLabel->y()+SCROLL_STEP);
}
void pultLogger::appendText(QString kumCommand, QString text, QString replay)
{
while(pos>H-68)downBtnPressed();
lines.append(logLine(kumCommand,text,replay,dummyFrame,respFrame,pos));
pos=pos+TEXT_STEP;
}
void MainButton::setText(QString t)
{
text=t;direction=TEXT;
}
loggerButton::loggerButton (QDir dir, QWidget* parent):QWidget(parent) loggerButton::loggerButton (QDir dir, QWidget* parent):QWidget(parent)
{isUpArrow=false; {isUpArrow=false;
......
...@@ -18,17 +18,7 @@ ...@@ -18,17 +18,7 @@
#else #else
#include <QtGui> #include <QtGui>
#endif #endif
#define SCROLL_STEP 10
#define RESP_PANEL 50
#define LOGGER_BUTTONS 140
#define TEXT_STEP 14
#define UP 1
#define DOWN 2
#define LEFT 3
#define RIGHT 4
#define TEXTT 5
#define TEXT 5
#ifdef WIDGETS_LIBRARY #ifdef WIDGETS_LIBRARY
#define WIDGETS_EXPORT Q_DECL_EXPORT #define WIDGETS_EXPORT Q_DECL_EXPORT
#else #else
...@@ -72,35 +62,14 @@ private: ...@@ -72,35 +62,14 @@ private:
class logLine class logLine
{ {
public: public:
inline logLine(QString KumCommand, logLine(QString KumCommand,
QString LogCommand, QString LogCommand,
QString React,QFrame* frame,QFrame* respFrame,uint pos) QString React,QFrame* frame,QFrame* respFrame,uint pos)
{ ;
kumCommand=KumCommand; void moveUp();
logCommand=LogCommand;
react=React; void moveDown();
textLabel=new QLabel(frame);
textLabel->setText(logCommand);
textLabel->move(4,pos);
textLabel->resize(120,20);
textLabel->show();
respLabel=new QLabel(respFrame);
respLabel->setText(React);
respLabel->move(4,pos);
respLabel->resize(RESP_PANEL,20);
respLabel->show();
}
inline void moveUp()
{
textLabel->move(textLabel->x(),textLabel->y()-SCROLL_STEP);
respLabel->move(respLabel->x(),respLabel->y()-SCROLL_STEP);
}
inline void moveDown()
{
textLabel->move(textLabel->x(),textLabel->y()+SCROLL_STEP);
respLabel->move(respLabel->x(),respLabel->y()+SCROLL_STEP);
}
inline int pos() inline int pos()
{ {
return textLabel->y(); return textLabel->y();
...@@ -145,12 +114,8 @@ public: ...@@ -145,12 +114,8 @@ public:
//upButton->show(); //upButton->show();
//show(); //show();
} }
inline void appendText(QString kumCommand,QString text,QString replay) void appendText(QString kumCommand,QString text,QString replay);
{
while(pos>H-68)downBtnPressed();
lines.append(logLine(kumCommand,text,replay,dummyFrame,respFrame,pos));
pos=pos+TEXT_STEP;
}
QString log() QString log()
{ {
QString toret; QString toret;
...@@ -219,7 +184,7 @@ public: ...@@ -219,7 +184,7 @@ public:
*/ */
~MainButton(){}; ~MainButton(){};
void setDirection(int d){direction=d;}; void setDirection(int d){direction=d;};
void setText(QString t){text=t;direction=TEXT;}; void setText(QString t);
bool isChecked(){return checked;}; bool isChecked(){return checked;};
void setCheckable(bool flag){Q_UNUSED(flag);checkable=true;}; void setCheckable(bool flag){Q_UNUSED(flag);checkable=true;};
void setChecked(bool flag) void setChecked(bool flag)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment