Commit dc5a5b92 authored by Victor Yacovlev's avatar Victor Yacovlev

Build fix

parent 1e93a57e
......@@ -9,6 +9,61 @@
#include <iostream>
#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)
{isUpArrow=false;
......
......@@ -18,17 +18,7 @@
#else
#include <QtGui>
#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
#define WIDGETS_EXPORT Q_DECL_EXPORT
#else
......@@ -72,35 +62,14 @@ private:
class logLine
{
public:
inline logLine(QString KumCommand,
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();
}
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);
}
;
void moveUp();
void moveDown();
inline int pos()
{
return textLabel->y();
......@@ -145,12 +114,8 @@ public:
//upButton->show();
//show();
}
inline 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;
}
void appendText(QString kumCommand,QString text,QString replay);
QString log()
{
QString toret;
......@@ -219,7 +184,7 @@ public:
*/
~MainButton(){};
void setDirection(int d){direction=d;};
void setText(QString t){text=t;direction=TEXT;};
void setText(QString t);
bool isChecked(){return checked;};
void setCheckable(bool flag){Q_UNUSED(flag);checkable=true;};
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