OSSP CVS Repository

ossp - Check-in [3855]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 3855
Date: 2002-Dec-11 17:00:47 (local)
2002-Dec-11 16:00:47 (UTC)
User:ms
Branch:
Comment: Add line number and status columns. Make all columns ausblendbar. Activate column menu selectors.
Tickets:
Inspections:
Files:
ossp-pkg/as/as-gui/TODO      1.36 -> 1.37     14 inserted, 0 deleted
ossp-pkg/as/as-gui/as_assist.cpp      1.55 -> 1.56     51 inserted, 13 deleted
ossp-pkg/as/as-gui/as_const.h      1.18 -> 1.19     27 inserted, 11 deleted
ossp-pkg/as/as-gui/as_gui.h      1.45 -> 1.46     2 inserted, 0 deleted
ossp-pkg/as/as-gui/as_slot.cpp      1.46 -> 1.47     179 inserted, 26 deleted

ossp-pkg/as/as-gui/TODO 1.36 -> 1.37

--- TODO 2002/12/10 00:00:57     1.36
+++ TODO 2002/12/11 16:00:47     1.37
@@ -37,6 +37,7 @@
 Does resetting data clean make sense after closeEvent?
 Change default config location to homedir, with --confgen option
 Quitting is the same as closing the (only) window
+IDs in as_const.h much better choosing, so they make sense
 
 Beim Editmodus
 ---------------
@@ -68,6 +69,19 @@
 Pasting into as_gui from other app (vim) doesn't work
 Opening a zero length file introduces out of range warnings
 
+Code snippits
+-------------
+// Portable processes
+QProcess *Proc;
+Proc = new QProcess;
+Proc->setArguments("/usr/local/bin/nada");
+bool ok = Proc->start();
+
+> Does anyone know how to set the WhatsThis text for a QPushButton?.
+>
+> Met vriendelijke groet
+Use the static QWhatsThis::add()
+
 Document
 --------
 Use doxygen for C++ interface documentation.


ossp-pkg/as/as-gui/as_assist.cpp 1.55 -> 1.56

--- as_assist.cpp        2002/12/10 14:23:58     1.55
+++ as_assist.cpp        2002/12/11 16:00:47     1.56
@@ -347,29 +347,29 @@
     m_pViewpopup->insertSeparator();
     m_pViewpopup->insertItem(trUtf8("&Columns"), m_pColspopup);
     nMenuid = m_pColspopup->insertItem(trUtf8("&Status"), this, SLOT(showStatcol()));
-    m_pColspopup->setItemEnabled(nMenuid, false);
+    m_pColspopup->setItemChecked(nMenuid, true);
     nMenuid = m_pColspopup->insertItem(trUtf8("&Line"), this, SLOT(showLinecol()));
-    m_pColspopup->setItemEnabled(nMenuid, false);
+    m_pColspopup->setItemChecked(nMenuid, true);
     nMenuid = m_pColspopup->insertItem(trUtf8("&User"), this, SLOT(showUsercol()));
-    m_pColspopup->setItemEnabled(nMenuid, false);
+    m_pColspopup->setItemChecked(nMenuid, true);
     nMenuid = m_pColspopup->insertItem(trUtf8("&GUID"), this, SLOT(showGuidcol()));
-    m_pColspopup->setItemEnabled(nMenuid, false);
+    m_pColspopup->setItemChecked(nMenuid, true);
     nMenuid = m_pColspopup->insertItem(trUtf8("&CRC"), this, SLOT(showCrccol()));
-    m_pColspopup->setItemEnabled(nMenuid, false);
+    m_pColspopup->setItemChecked(nMenuid, true);
     nMenuid = m_pColspopup->insertItem(trUtf8("&Rev"), this, SLOT(showRevcol()));
-    m_pColspopup->setItemEnabled(nMenuid, false);
+    m_pColspopup->setItemChecked(nMenuid, true);
     nMenuid = m_pColspopup->insertItem(trUtf8("&Date"), this, SLOT(showDatecol()));
-    m_pColspopup->setItemEnabled(nMenuid, false);
+    m_pColspopup->setItemChecked(nMenuid, true);
     nMenuid = m_pColspopup->insertItem(trUtf8("&Start"), this, SLOT(showStartcol()));
-    m_pColspopup->setItemEnabled(nMenuid, false);
+    m_pColspopup->setItemChecked(nMenuid, true);
     nMenuid = m_pColspopup->insertItem(trUtf8("&Finish"), this, SLOT(showFinishcol()));
-    m_pColspopup->setItemEnabled(nMenuid, false);
+    m_pColspopup->setItemChecked(nMenuid, true);
     nMenuid = m_pColspopup->insertItem(trUtf8("&Amount"), this, SLOT(showAmountcol()));
-    m_pColspopup->setItemEnabled(nMenuid, false);
+    m_pColspopup->setItemChecked(nMenuid, true);
     nMenuid = m_pColspopup->insertItem(trUtf8("&Task"), this, SLOT(showTaskcol()));
-    m_pColspopup->setItemEnabled(nMenuid, false);
+    m_pColspopup->setItemChecked(nMenuid, true);
     nMenuid = m_pColspopup->insertItem(trUtf8("&Remark"), this, SLOT(showRemarkcol()));
-    m_pColspopup->setItemEnabled(nMenuid, false);
+    m_pColspopup->setItemChecked(nMenuid, true);
 
     // Pad spacing to force help menu to appear far right
     m_pMenubar->insertSeparator();
@@ -492,11 +492,13 @@
     // Table header row
     m_pTablehead = m_pMaintable->horizontalHeader();
     m_pMaintable->setHScrollBarMode(QScrollView::AlwaysOff);
+    m_pTablehead->setLabel(TITRAQ_IDXSTATUS, QObject::trUtf8("Stat"), 32);
+    m_pTablehead->setLabel(TITRAQ_IDXLINE, QObject::trUtf8("Line"), 32);
     m_pTablehead->setLabel(TITRAQ_IDXUSER, QObject::trUtf8("User"), 32);
     m_pTablehead->setLabel(TITRAQ_IDXGUID, QObject::trUtf8("GUID"), 36);
     m_pTablehead->setLabel(TITRAQ_IDXCRC, QObject::trUtf8("CRC"), 32);
     m_pTablehead->setLabel(TITRAQ_IDXREV, QObject::trUtf8("Rev"), 32);
-    m_pTablehead->setLabel(TITRAQ_IDXDATE, QObject::trUtf8("Date"), 90);
+    m_pTablehead->setLabel(TITRAQ_IDXDATE, QObject::trUtf8("Date"), 94);
     m_pTablehead->setLabel(TITRAQ_IDXSTART, QObject::trUtf8("Begin"), 80);
     m_pTablehead->setLabel(TITRAQ_IDXFINISH, QObject::trUtf8("End"), 80);
     m_pTablehead->setLabel(TITRAQ_IDXAMOUNT, QObject::trUtf8("Amount"), 98);
@@ -520,6 +522,42 @@
 //    QSpacerItem Pad(TITRAQ_SPACING / 2, 0, QSizePolicy::Fixed);
 //    m_pEditlayout->addWidget(&Pad); // Padd left side of control layout
 
+    // Make the status edit
+    m_pStatusedit = new QLineEdit(m_pCenframe, "Status");
+    if (m_pStatusedit == NULL) // Sanity check
+        throw Genexcept("Main window status edit creation failed.");
+    m_pStatusedit->setText(trUtf8("0"));
+    m_pStatusedit->setFrameShape(QLineEdit::LineEditPanel);
+    m_pStatusedit->setFrameShadow(QLineEdit::Sunken);
+    m_pStatusedit->setFrame(true);
+    m_pStatusedit->setReadOnly(true);
+    QToolTip::add(m_pStatusedit, trUtf8("Status Item"));
+    m_pEditlayout->addWidget(m_pStatusedit);  // Finally add the item status edit
+
+    // Whatsthis info for the item status edit
+    const char *kszStatustext = "The <em>item status</em> shows a green "
+                                "symbol for valid entries, a yellow symbol "
+                                "to warn, and a red symbol for flawed entries.";
+    QWhatsThis::add(m_pStatusedit, kszStatustext);
+
+    // Make the line number edit
+    m_pLineedit = new QLineEdit(m_pCenframe, "Lineno");
+    if (m_pLineedit == NULL) // Sanity check
+        throw Genexcept("Main window line number edit creation failed.");
+    m_pLineedit->setText(trUtf8("0"));
+    m_pLineedit->setFrameShape(QLineEdit::LineEditPanel);
+    m_pLineedit->setFrameShadow(QLineEdit::Sunken);
+    m_pLineedit->setFrame(true);
+    m_pLineedit->setReadOnly(true);
+    QToolTip::add(m_pLineedit, trUtf8("Line Number"));
+    m_pEditlayout->addWidget(m_pLineedit);  // Finally add the line number edit
+
+    // Whatsthis info for the line number edit
+    const char *kszLinenotext = "The <em>line number</em> helps identify "
+                                "an entry when a warning or error message "
+                                "appears.";
+    QWhatsThis::add(m_pLineedit, kszLinenotext);
+
     // Make the user edit
     m_pUseredit = new QLineEdit(m_pCenframe, "User");
     if (m_pUseredit == NULL) // Sanity check


ossp-pkg/as/as-gui/as_const.h 1.18 -> 1.19

--- as_const.h   2002/12/10 13:08:29     1.18
+++ as_const.h   2002/12/11 16:00:47     1.19
@@ -56,17 +56,33 @@
 
 // Indexes of table columns
 #define TITRAQ_IDXALLCTRLS     -1
-#define TITRAQ_IDXUSER          0
-#define TITRAQ_IDXGUID          1
-#define TITRAQ_IDXCRC           2
-#define TITRAQ_IDXREV           3
-#define TITRAQ_IDXDATE          4
-#define TITRAQ_IDXSTART         5
-#define TITRAQ_IDXFINISH        6
-#define TITRAQ_IDXAMOUNT        7
-#define TITRAQ_IDXTASK          8
-#define TITRAQ_IDXREMARK        9
-#define TITRAQ_IDXTAIL          10
+#define TITRAQ_IDXSTATUS        0
+#define TITRAQ_IDXLINE          1
+#define TITRAQ_IDXUSER          2
+#define TITRAQ_IDXGUID          3
+#define TITRAQ_IDXCRC           4
+#define TITRAQ_IDXREV           5
+#define TITRAQ_IDXDATE          6
+#define TITRAQ_IDXSTART         7
+#define TITRAQ_IDXFINISH        8
+#define TITRAQ_IDXAMOUNT        9
+#define TITRAQ_IDXTASK          10
+#define TITRAQ_IDXREMARK        11
+#define TITRAQ_IDXTAIL          12
+
+// Indexes of col popup menu items
+#define TITRAQ_IDXSTATCOL       1
+#define TITRAQ_IDXLCOL          2
+#define TITRAQ_IDXUCOL          3
+#define TITRAQ_IDXGCOL          4
+#define TITRAQ_IDXCCOL          5
+#define TITRAQ_IDXREVCOL        6
+#define TITRAQ_IDXDCOL          7
+#define TITRAQ_IDXSTARTCOL      8
+#define TITRAQ_IDXFCOL          9
+#define TITRAQ_IDXACOL          10
+#define TITRAQ_IDXTCOL          11
+#define TITRAQ_IDXREMCOL        12
 
 // Indexes of popup menu submenus
 #define TITRAQ_IDXFILEBAR       1


ossp-pkg/as/as-gui/as_gui.h 1.45 -> 1.46

--- as_gui.h     2002/12/10 14:23:58     1.45
+++ as_gui.h     2002/12/11 16:00:47     1.46
@@ -103,6 +103,8 @@
 
     // Edition widgets
     QDate       *m_pDatezero;           // Hack to store empty date
+    QLineEdit   *m_pStatusedit;         // Control to show entry status
+    QLineEdit   *m_pLineedit;           // Control to line number
     QLineEdit   *m_pUseredit;           // Control to edit user name
     QLineEdit   *m_pGuidedit;           // Control to edit GUID
     QLineEdit   *m_pCrcedit;            // Control to edit CRC


ossp-pkg/as/as-gui/as_slot.cpp 1.46 -> 1.47

--- as_slot.cpp  2002/12/10 14:23:58     1.46
+++ as_slot.cpp  2002/12/11 16:00:47     1.47
@@ -34,6 +34,7 @@
 #include <qcombobox.h>
 #include <qregexp.h>
 #include <qclipboard.h>
+#include <qmenudata.h>
 
 // User interface
 #include "as_gui.h"             // Main classes
@@ -395,7 +396,9 @@
 {
     switch (nSection) {
     case TITRAQ_IDXALLCTRLS:
-        m_pUseredit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXUSER) - TITRAQ_SPACING + TITRAQ_SPACING / 2);
+        m_pStatusedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXSTATUS) - TITRAQ_SPACING + TITRAQ_SPACING / 2);
+        m_pLineedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXLINE) - TITRAQ_SPACING);
+        m_pUseredit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXUSER) - TITRAQ_SPACING);
         m_pGuidedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXGUID) - TITRAQ_SPACING);
         m_pCrcedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXCRC) - TITRAQ_SPACING);
         m_pRevedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXREV) - TITRAQ_SPACING);
@@ -406,8 +409,14 @@
         m_pTasks->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXTASK) - TITRAQ_SPACING);
 //        m_pRemark->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXREMARK) - TITRAQ_SPACING);
         break;
+    case TITRAQ_IDXSTATUS:
+        m_pStatusedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXSTATUS) - TITRAQ_SPACING + TITRAQ_SPACING / 2);
+        break;
+    case TITRAQ_IDXLINE:
+        m_pLineedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXLINE) - TITRAQ_SPACING);
+        break;
     case TITRAQ_IDXUSER:
-        m_pUseredit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXUSER) - TITRAQ_SPACING + TITRAQ_SPACING / 2);
+        m_pUseredit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXUSER) - TITRAQ_SPACING);
         break;
     case TITRAQ_IDXGUID:
         m_pGuidedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXGUID) - TITRAQ_SPACING);
@@ -652,8 +661,20 @@
 //
 void Titraqform::showStatcol(void)
 {
-    Prototype Unimp;
-    Unimp.doMbox();
+    // Test if column is currently shown, conditionally show or hide it
+    if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXSTATCOL))) {
+        m_pMaintable->hideColumn(TITRAQ_IDXSTATUS);
+        m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXSTATCOL), false);
+        m_pStatusedit->hide();
+    }
+    else {
+        m_pMaintable->showColumn(TITRAQ_IDXSTATUS);
+        m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXSTATCOL), true);
+        m_pStatusedit->show();
+    }
+
+    // Make sure switch take place right away
+    m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXSTATCOL));
 }
 
 //
@@ -661,8 +682,20 @@
 //
 void Titraqform::showLinecol(void)
 {
-    Prototype Unimp;
-    Unimp.doMbox();
+    // Test if column is currently shown, conditionally show or hide it
+    if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXLCOL))) {
+        m_pMaintable->hideColumn(TITRAQ_IDXLINE);
+        m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXLCOL), false);
+        m_pLineedit->hide();
+    }
+    else {
+        m_pMaintable->showColumn(TITRAQ_IDXLINE);
+        m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXLCOL), true);
+        m_pLineedit->show();
+    }
+
+    // Make sure switch take place right away
+    m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXLCOL));
 }
 
 //
@@ -670,8 +703,20 @@
 //
 void Titraqform::showUsercol(void)
 {
-    Prototype Unimp;
-    Unimp.doMbox();
+    // Test if column is currently shown, conditionally show or hide it
+    if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXUCOL))) {
+        m_pMaintable->hideColumn(TITRAQ_IDXUSER);
+        m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXUCOL), false);
+        m_pUseredit->hide();
+    }
+    else {
+        m_pMaintable->showColumn(TITRAQ_IDXUSER);
+        m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXUCOL), true);
+        m_pUseredit->show();
+    }
+
+    // Make sure switch take place right away
+    m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXUCOL));
 }
 
 //
@@ -679,8 +724,20 @@
 //
 void Titraqform::showGuidcol(void)
 {
-    Prototype Unimp;
-    Unimp.doMbox();
+    // Test if column is currently shown, conditionally show or hide it
+    if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXGCOL))) {
+        m_pMaintable->hideColumn(TITRAQ_IDXGUID);
+        m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXGCOL), false);
+        m_pGuidedit->hide();
+    }
+    else {
+        m_pMaintable->showColumn(TITRAQ_IDXGUID);
+        m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXGCOL), true);
+        m_pGuidedit->show();
+    }
+
+    // Make sure switch take place right away
+    m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXGCOL));
 }
 
 //
@@ -688,8 +745,20 @@
 //
 void Titraqform::showCrccol(void)
 {
-    Prototype Unimp;
-    Unimp.doMbox();
+    // Test if column is currently shown, conditionally show or hide it
+    if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXCCOL))) {
+        m_pMaintable->hideColumn(TITRAQ_IDXCRC);
+        m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXCCOL), false);
+        m_pCrcedit->hide();
+    }
+    else {
+        m_pMaintable->showColumn(TITRAQ_IDXCRC);
+        m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXCCOL), true);
+        m_pCrcedit->show();
+    }
+
+    // Make sure switch take place right away
+    m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXCCOL));
 }
 
 //
@@ -697,8 +766,20 @@
 //
 void Titraqform::showRevcol(void)
 {
-    Prototype Unimp;
-    Unimp.doMbox();
+    // Test if column is currently shown, conditionally show or hide it
+    if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXREVCOL))) {
+        m_pMaintable->hideColumn(TITRAQ_IDXREV);
+        m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXREVCOL), false);
+        m_pRevedit->hide();
+    }
+    else {
+        m_pMaintable->showColumn(TITRAQ_IDXREV);
+        m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXREVCOL), true);
+        m_pRevedit->show();
+    }
+
+    // Make sure switch take place right away
+    m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXREVCOL));
 }
 
 //
@@ -706,8 +787,20 @@
 //
 void Titraqform::showDatecol(void)
 {
-    Prototype Unimp;
-    Unimp.doMbox();
+    // Test if column is currently shown, conditionally show or hide it
+    if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXDCOL))) {
+        m_pMaintable->hideColumn(TITRAQ_IDXDATE);
+        m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXDCOL), false);
+        m_pDateedit->hide();
+    }
+    else {
+        m_pMaintable->showColumn(TITRAQ_IDXDATE);
+        m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXDCOL), true);
+        m_pDateedit->show();
+    }
+
+    // Make sure switch take place right away
+    m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXDCOL));
 }
 
 //
@@ -715,8 +808,20 @@
 //
 void Titraqform::showStartcol(void)
 {
-    Prototype Unimp;
-    Unimp.doMbox();
+    // Test if column is currently shown, conditionally show or hide it
+    if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXSTARTCOL))) {
+        m_pMaintable->hideColumn(TITRAQ_IDXSTART);
+        m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXSTARTCOL), false);
+        m_pStarttime->hide();
+    }
+    else {
+        m_pMaintable->showColumn(TITRAQ_IDXSTART);
+        m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXSTARTCOL), true);
+        m_pStarttime->show();
+    }
+
+    // Make sure switch take place right away
+    m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXSTARTCOL));
 }
 
 //
@@ -724,8 +829,20 @@
 //
 void Titraqform::showFinishcol(void)
 {
-    Prototype Unimp;
-    Unimp.doMbox();
+    // Test if column is currently shown, conditionally show or hide it
+    if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXFCOL))) {
+        m_pMaintable->hideColumn(TITRAQ_IDXFINISH);
+        m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXFCOL), false);
+        m_pEndtime->hide();
+    }
+    else {
+        m_pMaintable->showColumn(TITRAQ_IDXFINISH);
+        m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXFCOL), true);
+        m_pEndtime->show();
+    }
+
+    // Make sure switch take place right away
+    m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXFCOL));
 }
 
 //
@@ -733,8 +850,20 @@
 //
 void Titraqform::showAmountcol(void)
 {
-    Prototype Unimp;
-    Unimp.doMbox();
+    // Test if column is currently shown, conditionally show or hide it
+    if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXACOL))) {
+        m_pMaintable->hideColumn(TITRAQ_IDXAMOUNT);
+        m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXACOL), false);
+        m_pAmount->hide();
+    }
+    else {
+        m_pMaintable->showColumn(TITRAQ_IDXAMOUNT);
+        m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXACOL), true);
+        m_pAmount->show();
+    }
+
+    // Make sure switch take place right away
+    m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXACOL));
 }
 
 //
@@ -742,8 +871,20 @@
 //
 void Titraqform::showTaskcol(void)
 {
-    Prototype Unimp;
-    Unimp.doMbox();
+    // Test if column is currently shown, conditionally show or hide it
+    if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXTCOL))) {
+        m_pMaintable->hideColumn(TITRAQ_IDXTASK);
+        m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXTCOL), false);
+        m_pTasks->hide();
+    }
+    else {
+        m_pMaintable->showColumn(TITRAQ_IDXTASK);
+        m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXTCOL), true);
+        m_pTasks->show();
+    }
+
+    // Make sure switch take place right away
+    m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXTCOL));
 }
 
 //
@@ -751,8 +892,20 @@
 //
 void Titraqform::showRemarkcol(void)
 {
-    Prototype Unimp;
-    Unimp.doMbox();
+    // Test if column is currently shown, conditionally show or hide it
+    if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXREMCOL))) {
+        m_pMaintable->hideColumn(TITRAQ_IDXREMARK);
+        m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXREMCOL), false);
+        m_pRemark->hide();
+    }
+    else {
+        m_pMaintable->showColumn(TITRAQ_IDXREMARK);
+        m_pColspopup->setItemChecked(m_pColspopup->idAt(TITRAQ_IDXREMCOL), true);
+        m_pRemark->show();
+    }
+
+    // Make sure switch take place right away
+    m_pColspopup->updateItem(m_pColspopup->idAt(TITRAQ_IDXREMCOL));
 }
 
 //

CVSTrac 2.0.1