#include <QSettings>
#include "QcjDataXML.h"
Go to the source code of this file.
Variables | |
| QcjDataXML * | pFormDef |
| QSettings * | pConfig |
| QSqlDatabase | db |
| QSqlDatabase * | pDb |
This file has declarations for global variables which are used by all of the QcjData Classes and the application as well.
Two of the objects need to be initialized by the main application.
#include "QcjData/QcjDataStatics.h" #include "QcjData/QcjDataXML.h" QStringList appPath; QString appName; QString invoiceReportFn; QcjDataConfigure *pConfigDlg; QMap<int, QString> menuMap; int main( int argc, char ** argv ) { QString reportPath; // Create the application object QApplication a( argc, argv ); // Get it's path information appPath = a.arguments().at(0).split(QRegExp("[/\\\\]")); QFileInfo appInfo(a.arguments().at(0)); // Get it's name appName = appInfo.baseName(); // Get the directory where it resides appPath.removeLast(); // Create a QSettings object to retrieve the configuration information from // Note the Company name, you will want to change this pConfig = new QSettings("CompanyName", appName); // Create the XML object searching the likely files where xml file may reside. pFormDef = new QcjDataXML(pConfig->readEntry("XMLConfig", QcjDataForm::findXML(appPath, appName))); // Create and initialize the QcjDataConfigure dialog which the user can configure the application with. pConfigDlg = new QcjDataConfigure; pConfigDlg->initialize("app"); . . .
Definition in file QcjDataStatics.h.
1.4.4