diff options
author | Akshay Chipkar | 2019-03-18 13:02:50 +0530 |
---|---|---|
committer | GitHub | 2019-03-18 13:02:50 +0530 |
commit | 7cb2c053c6e68616230bd5c645977c90ccaa6056 (patch) | |
tree | dbdce755481abdbe999fdd83be9408c002401a71 /ldmicro/ldmicro.cpp | |
parent | a962c0a7965f6c0d80c867ba9f3fbe797ac14de7 (diff) | |
parent | 08ca539a8d6624e979bf4e85a61ff00567575667 (diff) | |
download | LDmicroQt-7cb2c053c6e68616230bd5c645977c90ccaa6056.tar.gz LDmicroQt-7cb2c053c6e68616230bd5c645977c90ccaa6056.tar.bz2 LDmicroQt-7cb2c053c6e68616230bd5c645977c90ccaa6056.zip |
Merge pull request #1 from akshay-c/Akshay
Cursor update and basic screen drawing
Diffstat (limited to 'ldmicro/ldmicro.cpp')
-rw-r--r-- | ldmicro/ldmicro.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/ldmicro/ldmicro.cpp b/ldmicro/ldmicro.cpp index 2b27ce5..95074a7 100644 --- a/ldmicro/ldmicro.cpp +++ b/ldmicro/ldmicro.cpp @@ -44,11 +44,14 @@ QApplication* LDmicroApp; HWID MainWindow; QIcon* MWIcon; QMenuBar* MainMenu; +QGroupBox* CursorObject; HWID DrawWindow; // parameters used to capture the mouse when implementing our totally non- // general splitter control //static HHOOK MouseHookHandle; static int MouseY; +int CursorTimer; +int SimulateTimer; // For the open/save dialog boxes #define LDMICRO_PATTERN "LDmicro Ladder Logic Programs (*.ld)\0*.ld\0" \ @@ -282,7 +285,7 @@ static void OpenDialog(void) RefreshScrollbars(); UpdateMainWindowTitleBar(); } - +*/ //----------------------------------------------------------------------------- // Housekeeping required when the program changes: mark the program as // changed so that we ask if user wants to save before exiting, and update @@ -298,7 +301,7 @@ void ProgramChanged(void) UndoRemember(); \ x; \ ProgramChanged();\ - }*/ + } //----------------------------------------------------------------------------- // Hook that we install when the user starts dragging the `splitter,' in case @@ -1255,9 +1258,13 @@ int main(int argc, char** argv) QSize MwSize(800,600); // Make main window - MainWindow = new QWidget; + MainWindow = new QWidget(); MWIcon = new QIcon(LDMICRO_ICON); MainMenu = new QMenuBar(MainWindow); + + // Initialize cursor and set color + CursorObject = new QGroupBox(DrawWindow); + // CursorObject->setColor(); // QMenu TopMenu("Top Menu", MainWindow); // MainMenu->addMenu(&TopMenu); @@ -1288,6 +1295,9 @@ int main(int argc, char** argv) MainWindow->show(); + /// Blink cursor + CursorTimer = SetTimer(DrawWindow, TIMER_BLINK_CURSOR, 500, CursorTimer); + GenerateIoListDontLoseSelection(); // MakeDialogBoxClass(); |