OSSP CVS Repository

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

Check-in Number: 2900
Date: 2002-Nov-26 21:38:19 (local)
2002-Nov-26 20:38:19 (UTC)
User:ms
Branch:
Comment: Remove all push button widgets, since the enhanced edit tool has the same functionality built in. Also remove the writeData callback, to favor a better approach.
Tickets:
Inspections:
Files:
ossp-pkg/as/as-gui/as_assist.cpp      1.24 -> 1.25     2 inserted, 68 deleted
ossp-pkg/as/as-gui/as_gui.cpp      1.21 -> 1.22     0 inserted, 13 deleted
ossp-pkg/as/as-gui/as_gui.h      1.27 -> 1.28     0 inserted, 11 deleted
ossp-pkg/as/as-gui/as_slot.cpp      1.19 -> 1.20     0 inserted, 9 deleted
ossp-pkg/titraq/titassist.cpp      1.24 -> 1.25     2 inserted, 68 deleted
ossp-pkg/titraq/titraq.cpp      1.21 -> 1.22     0 inserted, 13 deleted
ossp-pkg/titraq/titraq.h      1.27 -> 1.28     0 inserted, 11 deleted
ossp-pkg/titraq/titslot.cpp      1.19 -> 1.20     0 inserted, 9 deleted

ossp-pkg/as/as-gui/as_assist.cpp 1.24 -> 1.25

--- as_assist.cpp        2002/11/26 20:25:16     1.24
+++ as_assist.cpp        2002/11/26 20:38:19     1.25
@@ -201,17 +201,6 @@
                                    "You can also select the <b>Delete</b> command "
                                    "from the <b>Edit</b> menu.</p>";
     m_pDelrowact->setWhatsThis(kszDelrowtext);
-
-    // Write data action
-    m_pWritedataact = new QAction(trUtf8("Write Data"), trUtf8("&Write data"), 0, this, "Writedata");
-    if (m_pWritedataact == NULL)    // Sanity check
-        throw Genexcept("Main window write data action creation failed.");
-    connect(m_pWritedataact, SIGNAL(activated()), this, SLOT(writeEntry()));
-    const char *kszWritedatatext = "<p><img source=\"ossplogo\"> "
-                                   "Click this button to <em>write out</em> "
-                                   "your accounting data. You can also select the "
-                                   "<b>Save</b> command from the <b>File</b> menu.</p>";
-    m_pWritedataact->setWhatsThis(kszWritedatatext);
 }
 
 //
@@ -376,22 +365,20 @@
     m_pCenframe->setFrameShadow(QFrame::Sunken);
     setCentralWidget(m_pCenframe);
 
-    // Layout controls for table, editing widgets, and buttons
+    // Layout controls for table, editing widgets
     m_pMainlayout = new QVBoxLayout(m_pCenframe, 10, 6, "Mainlayout");  // For layouts
     m_pPackagelayout = new QVBoxLayout(0, 0, 6, "Packagelayout");       // For table
     m_pDatelayout = new QHBoxLayout(0, 0, 6, "Datelayout");             // For dates
     m_pTasklayout = new QHBoxLayout(0, 0, 6, "Tasklayout");             // For tasks
-    m_pControllayout = new QHBoxLayout(0, 0, 6, "Controllayout");       // For buttons
 
     // Major sanity check wrapped in one call
-    if (!(m_pMainlayout && m_pPackagelayout && m_pDatelayout && m_pTasklayout && m_pControllayout))
+    if (!(m_pMainlayout && m_pPackagelayout && m_pDatelayout && m_pTasklayout))
         throw Genexcept("Main window layout creation failed.");
 
     // Specify ordering of the layouts
     m_pMainlayout->addLayout(m_pPackagelayout);
     m_pMainlayout->addLayout(m_pDatelayout);
     m_pMainlayout->addLayout(m_pTasklayout);
-    m_pMainlayout->addLayout(m_pControllayout);
 }
 
 //
@@ -441,11 +428,6 @@
 //    connect(m_pMaintable, SIGNAL(clicked(int, int, int, const QPoint&)), this, SLOT(updEdit(int, int)));
 //    connect(m_pMaintable, SIGNAL(doubleClicked(int, int, int, const QPoint&)), this, SLOT(updEdit(int, int)));
 //    connect(m_pMaintable, SIGNAL(valueChanged(int, int)), this, SLOT(tableChanged(int, int)));
-
-//    // Button action signals
-//    connect(AddPushButton, SIGNAL(clicked()), this, SLOT(AddRow()));
-//    connect(DeletePushButton, SIGNAL(clicked()), this, SLOT(DelRow()));
-//    connect(WritePushButton, SIGNAL(clicked()), this, SLOT(accept()));
 }
 
 //
@@ -579,51 +561,3 @@
 //    m_pAmount->valueChanged(int value);
 //    m_pTasks->textChanged(const QString &string);
 }
-
-//
-// Construct the buttons
-//
-void Titraqform::setupButtons(void)
-{
-    // Tuple push button add
-    m_pAddbutton = new QPushButton(m_pCenframe, "AddButton");
-    if (m_pAddbutton == NULL)   // Sanity check
-        throw Genexcept("Main window add button creation failed.");
-    m_pAddbutton->setCursor(QCursor(13));
-    m_pAddbutton->setText(trUtf8("&Add"));
-    QToolTip::add(m_pAddbutton, trUtf8("Add Entry"));
-    connect(m_pAddbutton, SIGNAL(clicked()), this, SLOT(addEntry()));
-    m_pControllayout->addWidget(m_pAddbutton);
-
-    // Tuple push button delete
-    m_pDeletebutton = new QPushButton(m_pCenframe, "Deletebutton");
-    if (m_pDeletebutton == NULL)    // Sanity check
-        throw Genexcept("Main window delete button creation failed.");
-    m_pDeletebutton->setCursor(QCursor(13));
-    m_pDeletebutton->setText(trUtf8("&Delete"));
-    m_pDeletebutton->setFlat(false);
-    QToolTip::add(m_pDeletebutton, trUtf8("Delete Entry"));
-    connect(m_pDeletebutton, SIGNAL(clicked()), this, SLOT(delEntry()));
-    m_pControllayout->addWidget(m_pDeletebutton);
-
-    // Tuple push button write
-    m_pWritebutton = new QPushButton(m_pCenframe, "Writebutton");
-    if (m_pWritebutton == NULL) // Sanity check
-        throw Genexcept("Main window write button creation failed.");
-    m_pWritebutton->setCursor(QCursor(13));
-    m_pWritebutton->setText(trUtf8("&Write"));
-    QToolTip::add(m_pWritebutton, trUtf8("Write Entry"));
-    connect(m_pWritebutton, SIGNAL(clicked()), this, SLOT(writeEntry()));
-    m_pControllayout->addWidget(m_pWritebutton);
-
-    // Tuple push button quit
-    m_pQuitbutton = new QPushButton(m_pCenframe, "Quitbutton");
-    if (m_pQuitbutton == NULL)  // Sanity check
-        throw Genexcept("Main window quit button creation failed.");
-    m_pQuitbutton->setCursor(QCursor(13));
-    m_pQuitbutton->setText(trUtf8("&Quit"));
-    m_pQuitbutton->setFlat(false);
-    QToolTip::add(m_pQuitbutton, trUtf8("Quit titraq"));
-    connect(m_pQuitbutton, SIGNAL(clicked()), qApp, SLOT(quit()));
-    m_pControllayout->addWidget(m_pQuitbutton);
-}


ossp-pkg/as/as-gui/as_gui.cpp 1.21 -> 1.22

--- as_gui.cpp   2002/11/26 14:10:32     1.21
+++ as_gui.cpp   2002/11/26 20:38:19     1.22
@@ -3,17 +3,6 @@
 #include "titrex.h"             // Exception classes
 
 
-// Overload init for custom initialization of the app
-void Titraqform::init(void)
-{
-    // Set fill color of buttons
-    m_pAddbutton->setPaletteBackgroundColor(QColor(196, 196, 176));
-    m_pDeletebutton->setPaletteBackgroundColor(QColor(196, 196, 176));
-    m_pWritebutton->setPaletteBackgroundColor(QColor(206, 192, 176));
-    m_pQuitbutton->setPaletteBackgroundColor(QColor(196, 196, 176));
-    m_pMaintable->setFocus();               // Focus on the table
-}
-
 //
 // Construct a Titraqform which is a child of 'pParent', with the
 // name 'kszName' and widget flags set to 'Flags'
@@ -45,14 +34,12 @@
         setupStatusbar();
         setupTable();
         setupEditlay();
-        setupButtons();
     }
     catch (Genexcept& Genex) {
         Genex.reportErr();
         exit(1);
     }
 
-    init(); // Initialize signal and slot connections
     m_pStatbar->message(trUtf8("Ready"));   // Signal a ready condition
 }
 


ossp-pkg/as/as-gui/as_gui.h 1.27 -> 1.28

--- as_gui.h     2002/11/26 20:25:16     1.27
+++ as_gui.h     2002/11/26 20:38:19     1.28
@@ -9,7 +9,6 @@
 #include <qtoolbar.h>
 #include <qstatusbar.h>
 #include <qimage.h>
-#include <qpushbutton.h>
 #include <qdatetimeedit.h>
 #include <qspinbox.h>
 #include <qlineedit.h>
@@ -72,20 +71,12 @@
     QComboBox   *m_pTasks;
     QLineEdit   *m_pRemark;
 
-    // Push buttons in control layout
-    QPushButton *m_pAddbutton;
-    QPushButton *m_pDeletebutton;
-    QPushButton *m_pWritebutton;
-    QPushButton *m_pQuitbutton;
-
 protected slots:
-    virtual void init(void);            // Override init to include custom controls
     void cutEntry(void);                // Cut a task entry from the list
     void copyEntry(void);               // Copy a task entry from the list
     void pasteEntry(void);              // Paste a task entry to the list
     void addEntry(void);                // Add a task entry to the list
     void delEntry(void);                // Delete a task entry from the list
-    void writeEntry(void);              // Write the task list to a filedescriptor
     void newDoc(void);                  // Make and display a new document window
     void chooseFile(void);              // Choose a file using a handy file dialog
     void saveFile(void);                // Serialize to the current file
@@ -122,7 +113,6 @@
     QVBoxLayout *m_pPackagelayout;      // Main table control
     QHBoxLayout *m_pDatelayout;         // Lower date and time widgets
     QHBoxLayout *m_pTasklayout;         // Lower task and remark widgets
-    QHBoxLayout *m_pControllayout;      // Lower control buttons
 
 private:
     // Owned by QMainWindow
@@ -156,7 +146,6 @@
     void setupCentralwidget(void);      // Assemble main Frame widget
     void setupTable(void);              // Table widget
     void setupEditlay(void);            // Editing lay
-    void setupButtons(void);            // Push button widgets
     void setupPieces(void);             // Assemble widget pieces
 
     // Data processing


ossp-pkg/as/as-gui/as_slot.cpp 1.19 -> 1.20

--- as_slot.cpp  2002/11/26 20:25:16     1.19
+++ as_slot.cpp  2002/11/26 20:38:19     1.20
@@ -71,15 +71,6 @@
 }
 
 //
-// Write current data to a meta device
-//
-void Titraqform::writeEntry(void)
-{
-    Prototype Unimp;
-    Unimp.doMbox();
-}
-
-//
 // Make and display a new document window
 //
 void Titraqform::newDoc(void)





CVSTrac 2.0.1