#include <QApplication>
#include <QMessageBox>

#include "mainwindow.h"
#include "scolumn.h"
#include "subwindow.h"

MainWindow *g_pMain;

MainWindow *GetMainWindow()
{
    return g_pMain;
}

SColumn g_column;
SColumn GetColumn()
{
    return g_column;
}

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    if (g_column.reload())
    {

        MainWindow w;
        g_pMain = &w;
        w.show();


        SubWindow s;
        s.show();
        return a.exec();
    }
    else
    {
        QMessageBox msg;
        msg.setText("Can not read column data...");
        msg.exec();
        return 0;
    }
    return 0;
}
