ossp-pkg/as/as-gui/as_gui.cpp 1.32 -> 1.33
--- as_gui.cpp 2002/12/18 14:50:58 1.32
+++ as_gui.cpp 2002/12/19 20:46:26 1.33
@@ -41,6 +41,15 @@
Titraqform::Titraqform(QWidget *pParent, const char *kszName, WFlags Flags) :
QMainWindow(pParent, kszName, Flags)
{
+ // Early initializations
+ m_pFiletools = NULL;
+ m_pEdittools = NULL;
+ m_pViewtools = NULL;
+ m_pWhatstools = NULL;
+ m_szFilename = NULL;
+
+ // Atenzione! Order is very important in the following sequence.
+ // FIXME: Reorganize this procedural mess into self contained objects
try {
setupPrefs(); // Load general preferences
setupActions(); // Create and initialize actions
@@ -51,19 +60,20 @@
setupTable(); // Create and initialize table and cells
setupEditlay(); // Create and initialize edit controls
setupColumns(); // Prepare columns for viewing, sorting
+ enableIface(false); // Start things off in a empty state
}
catch (Genexcept& Genex) {
Genex.reportErr();
exit(1);
}
- // Early initializations and manipulations
- m_szFilename = new QString();
+ // Postsetup manipulations
m_pMaintable->setDirty(false);
if (!kszName)
setName(trUtf8("Titraqform"));
resize(m_pPrefs->getNumber(TITRAQ_PREFFRAMEWIDTH, TITRAQ_DEFFRAMEWIDTH),
m_pPrefs->getNumber(TITRAQ_PREFFRAMEHEIGHT, TITRAQ_DEFFRAMEHEIGHT));
+ connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(savePrefs()));
setCaption("OSSP Titraq");
// Rehydrate main window layout and doc positions
|
|