57 lines
1007 B
C++
Executable File
57 lines
1007 B
C++
Executable File
// needed: libQt5Sql5-postgresql
|
|
|
|
/* TODO:
|
|
*
|
|
* hint for custom queries and their 'editibility'
|
|
* autocompletion of tablenames (& columns?)
|
|
* csv export for iuliana
|
|
* to insert something, DataModel must use QVariant as data storage !
|
|
*
|
|
*/
|
|
|
|
#include "BrowserWnd.h"
|
|
|
|
#include <nglapplication/nglapplication.h>
|
|
#include <QDebug>
|
|
#include <QTimer>
|
|
|
|
|
|
int main(int argc, char** argv)
|
|
{
|
|
QStringList params;
|
|
params << QStringLiteral("--darkStyle");
|
|
|
|
int setDarkStyle = false;
|
|
|
|
for (int i = 0; i < argc; i++)
|
|
{
|
|
switch (params.indexOf(QString::fromUtf8(argv[i])))
|
|
{
|
|
case 0: // darkStyle
|
|
{
|
|
setDarkStyle = true;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
if (setDarkStyle)
|
|
{
|
|
qunsetenv("TDS_DEVEL"); // no dark style
|
|
}
|
|
else
|
|
{
|
|
qputenv("TDS_DEVEL", "1");
|
|
}
|
|
|
|
|
|
|
|
NGLApplication a(argc, argv);
|
|
a.createLogger("SQLBrowser", "log4cxx_sqlbrowser.props");
|
|
|
|
BrowserWnd browserWnd;
|
|
QTimer::singleShot(0, &browserWnd, &BrowserWnd::startConnect);
|
|
|
|
return a.exec();
|
|
}
|