From dc7048d100bfd8fc01f32cde2760bc251fc98e09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=8B=D1=87=D0=BA=D0=BE=D0=B2=20=D0=90=D0=BD=D0=B4?= =?UTF-8?q?=D1=80=D0=B5=D0=B9?= Date: Wed, 3 Feb 2016 11:47:30 +0000 Subject: [PATCH] git-svn-id: svn://db.shs.com.ru/pip@178 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5 --- src/console/pikbdlistener.cpp | 2 +- src/console/piscreen.cpp | 24 --------------- src/console/piscreenconsole.cpp | 23 ++++++++++++++ src/console/piscreenconsole.h | 53 +++++++++++++++++++++++++++++++++ src/console/piscreendrawer.cpp | 23 -------------- src/console/piscreentile.cpp | 24 --------------- src/console/piscreentiles.cpp | 24 --------------- src/console/piscreentiles.h | 12 -------- 8 files changed, 77 insertions(+), 108 deletions(-) create mode 100644 src/console/piscreenconsole.cpp create mode 100644 src/console/piscreenconsole.h diff --git a/src/console/pikbdlistener.cpp b/src/console/pikbdlistener.cpp index 3183240d..cec96fb8 100644 --- a/src/console/pikbdlistener.cpp +++ b/src/console/pikbdlistener.cpp @@ -258,7 +258,7 @@ void PIKbdListener::readKeyboard() { // 4 - alt+shift 3 // 5 - ctrl 4 // 8 - ctrl+alt+shift 7 - if (rc[0] == '\e') { + if (rc[0] == '\e') { // search for Alt if (ret == 2) { mod = 2; ke.key = PIChar::fromConsole(rc[1]).unicode16Code(); diff --git a/src/console/piscreen.cpp b/src/console/piscreen.cpp index dad0df7f..be884e1b 100644 --- a/src/console/piscreen.cpp +++ b/src/console/piscreen.cpp @@ -30,30 +30,6 @@ #endif -/** \class PIScreen - * \brief Console output class - * \details - * \section PIScreen_sec0 Synopsis - * This class provides output to console with automatic alignment and update. - * It supports tabs, keyboard listening, formats and colors. - * - * \section PIScreen_sec1 Layout - * %PIScreen works with variable pointers. You should add your variables with - * functions \a addVariable() which receives label name, pointer to variable - * and optional column and format. Columns count is dynamically increased if - * new column used. E.g. if you add variable to empty tab to column 3, columns - * count will be increased to 3, but two firsts columns will be empty. Each column - * filled from top to bottom, but you can add just string with function - * \a addString() or add empty line with function \a addEmptyLine(). Layout scheme: - * \image html piconsole_layout.png - * - * \section PIScreen_sec2 Keyboard usage - * %PIScreen should to be single in application. %PIScreen aggregate PIKbdListener - * which grab keyboard and automatic switch tabs by theirs bind keys. If there is no - * tab binded to pressed key external function "slot" will be called - * - **/ - using namespace PIScreenTypes; extern PIMutex __PICout_mutex__; diff --git a/src/console/piscreenconsole.cpp b/src/console/piscreenconsole.cpp new file mode 100644 index 00000000..6092c502 --- /dev/null +++ b/src/console/piscreenconsole.cpp @@ -0,0 +1,23 @@ +#include "piscreenconsole.h" + +using namespace PIScreenTypes; + + +TileVars::TileVars(const PIString &n) : PIScreenTile(n) { + alignment = Left; +} + + +void TileVars::sizeHint(int &w, int &h) const { + +} + +void TileVars::drawEvent(PIScreenDrawer *d) { + +} + + +PIScreenConsole::PIScreenConsole() { + +} + diff --git a/src/console/piscreenconsole.h b/src/console/piscreenconsole.h new file mode 100644 index 00000000..79fb197a --- /dev/null +++ b/src/console/piscreenconsole.h @@ -0,0 +1,53 @@ +#ifndef PISCREENCONSOLE_H +#define PISCREENCONSOLE_H +#include "piscreentiles.h" + +class PIP_EXPORT TileVars: public PIScreenTile { +public: + TileVars(const PIString & n = PIString()); +protected: + struct Variable { + Variable() {nx = ny = type = offset = bitFrom = bitCount = size = 0; format = PIScreenTypes::CellFormat(); ptr = 0; id = 1;} + bool isEmpty() const {return (ptr == 0);} + PIString name; + PIScreenTypes::CellFormat format; + int nx; + int ny; + int type; + int offset; + int bitFrom; + int bitCount; + int size; + int id; + const void * ptr; + PIByteArray rdata; + void operator =(const Variable & src) { + name = src.name; + format = src.format; + nx = src.nx; + ny = src.ny; + type = src.type; + offset = src.offset; + bitFrom = src.bitFrom; + bitCount = src.bitCount; + size = src.size; + id = src.id; + ptr = src.ptr; + rdata = src.rdata; + } + }; + PIVector variables; + PIScreenTypes::Alignment alignment; + void sizeHint(int & w, int & h) const; + void drawEvent(PIScreenDrawer * d); +}; + + + +class PIScreenConsole : public PIScreenTile +{ +public: + PIScreenConsole(); +}; + +#endif // PISCREENCONSOLE_H diff --git a/src/console/piscreendrawer.cpp b/src/console/piscreendrawer.cpp index abe0d174..6226d24b 100644 --- a/src/console/piscreendrawer.cpp +++ b/src/console/piscreendrawer.cpp @@ -19,29 +19,6 @@ #include "piscreendrawer.h" -/** \class PIScreenDrawer - * \brief Console output class - * \details - * \section PIScreen_sec0 Synopsis - * This class provides output to console with automatic alignment and update. - * It supports tabs, keyboard listening, formats and colors. - * - * \section PIScreen_sec1 Layout - * %PIScreen works with variable pointers. You should add your variables with - * functions \a addVariable() which receives label name, pointer to variable - * and optional column and format. Columns count is dynamically increased if - * new column used. E.g. if you add variable to empty tab to column 3, columns - * count will be increased to 3, but two firsts columns will be empty. Each column - * filled from top to bottom, but you can add just string with function - * \a addString() or add empty line with function \a addEmptyLine(). Layout scheme: - * \image html piconsole_layout.png - * - * \section PIScreen_sec2 Keyboard usage - * %PIScreen should to be single in application. %PIScreen aggregate PIKbdListener - * which grab keyboard and automatic switch tabs by theirs bind keys. If there is no - * tab binded to pressed key external function "slot" will be called - * - **/ using namespace PIScreenTypes; diff --git a/src/console/piscreentile.cpp b/src/console/piscreentile.cpp index 4824150b..aaa881dc 100644 --- a/src/console/piscreentile.cpp +++ b/src/console/piscreentile.cpp @@ -21,30 +21,6 @@ #include "piscreendrawer.h" -/** \class PIScreenTile - * \brief Console output class - * \details - * \section PIScreen_sec0 Synopsis - * This class provides output to console with automatic alignment and update. - * It supports tabs, keyboard listening, formats and colors. - * - * \section PIScreen_sec1 Layout - * %PIScreen works with variable pointers. You should add your variables with - * functions \a addVariable() which receives label name, pointer to variable - * and optional column and format. Columns count is dynamically increased if - * new column used. E.g. if you add variable to empty tab to column 3, columns - * count will be increased to 3, but two firsts columns will be empty. Each column - * filled from top to bottom, but you can add just string with function - * \a addString() or add empty line with function \a addEmptyLine(). Layout scheme: - * \image html piconsole_layout.png - * - * \section PIScreen_sec2 Keyboard usage - * %PIScreen should to be single in application. %PIScreen aggregate PIKbdListener - * which grab keyboard and automatic switch tabs by theirs bind keys. If there is no - * tab binded to pressed key external function "slot" will be called - * - **/ - using namespace PIScreenTypes; diff --git a/src/console/piscreentiles.cpp b/src/console/piscreentiles.cpp index b15bb016..fa746470 100644 --- a/src/console/piscreentiles.cpp +++ b/src/console/piscreentiles.cpp @@ -20,30 +20,6 @@ #include "piscreentiles.h" #include "piscreendrawer.h" -/* - * \class PIScreen - * \brief Console output class - * \details - * \section PIScreen_sec0 Synopsis - * This class provides output to console with automatic alignment and update. - * It supports tabs, keyboard listening, formats and colors. - * - * \section PIScreen_sec1 Layout - * %PIScreen works with variable pointers. You should add your variables with - * functions \a addVariable() which receives label name, pointer to variable - * and optional column and format. Columns count is dynamically increased if - * new column used. E.g. if you add variable to empty tab to column 3, columns - * count will be increased to 3, but two firsts columns will be empty. Each column - * filled from top to bottom, but you can add just string with function - * \a addString() or add empty line with function \a addEmptyLine(). Layout scheme: - * \image html piconsole_layout.png - * - * \section PIScreen_sec2 Keyboard usage - * %PIScreen should to be single in application. %PIScreen aggregate PIKbdListener - * which grab keyboard and automatic switch tabs by theirs bind keys. If there is no - * tab binded to pressed key external function "slot" will be called - * - **/ using namespace PIScreenTypes; diff --git a/src/console/piscreentiles.h b/src/console/piscreentiles.h index 33d3c435..cc9e3b59 100644 --- a/src/console/piscreentiles.h +++ b/src/console/piscreentiles.h @@ -39,8 +39,6 @@ protected: }; - - class PIP_EXPORT TileList: public PIScreenTile { public: TileList(const PIString & n = PIString()); @@ -68,8 +66,6 @@ protected: }; - - class PIP_EXPORT TileButton: public PIScreenTile { public: TileButton(const PIString & n = PIString()); @@ -104,8 +100,6 @@ protected: }; - - class PIP_EXPORT TileCheck: public PIScreenTile { public: TileCheck(const PIString & n = PIString()); @@ -122,8 +116,6 @@ protected: }; - - class PIP_EXPORT TileProgress: public PIScreenTile { public: TileProgress(const PIString & n = PIString()); @@ -138,8 +130,6 @@ protected: }; - - class PIP_EXPORT TilePICout: public TileList { public: TilePICout(const PIString & n = PIString()); @@ -151,8 +141,6 @@ protected: }; - - class PIP_EXPORT TileInput: public PIScreenTile { public: TileInput(const PIString & n = PIString());