src/relpipe-out-chart.cpp
author František Kučera <franta-hg@frantovo.cz>
Fri, 28 Sep 2018 12:51:55 +0200
branchv_0
changeset 11 0f42346c8fc7
parent 9 d88df75dc2eb
child 13 c84042d014c9
permissions -rw-r--r--
define windows size in the .ui file
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
ba16fce7ef20 create cmake+netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     1
#include <iostream>
ba16fce7ef20 create cmake+netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     2
3
0d857519a4c9 add Qt libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents: 2
diff changeset
     3
#include <QApplication>
0d857519a4c9 add Qt libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents: 2
diff changeset
     4
2
7ba3ae8cf1fc add relpipe pkg-config libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents: 1
diff changeset
     5
#include <relpipe/cli/CLI.h>
7ba3ae8cf1fc add relpipe pkg-config libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents: 1
diff changeset
     6
#include <relpipe/cli/RelpipeCLIException.h>
7ba3ae8cf1fc add relpipe pkg-config libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents: 1
diff changeset
     7
#include <relpipe/reader/Factory.h>
7ba3ae8cf1fc add relpipe pkg-config libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents: 1
diff changeset
     8
#include <relpipe/reader/RelationalReader.h>
7ba3ae8cf1fc add relpipe pkg-config libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents: 1
diff changeset
     9
#include <relpipe/reader/RelpipeReaderException.h>
7ba3ae8cf1fc add relpipe pkg-config libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents: 1
diff changeset
    10
4
1622c087f3ea add main window, compile Qt .ui file
František Kučera <franta-hg@frantovo.cz>
parents: 3
diff changeset
    11
#include "RelpipeChartMainWindow.h"
2
7ba3ae8cf1fc add relpipe pkg-config libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents: 1
diff changeset
    12
7ba3ae8cf1fc add relpipe pkg-config libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents: 1
diff changeset
    13
using namespace relpipe::cli;
7ba3ae8cf1fc add relpipe pkg-config libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents: 1
diff changeset
    14
using namespace relpipe::reader;
7ba3ae8cf1fc add relpipe pkg-config libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents: 1
diff changeset
    15
0
ba16fce7ef20 create cmake+netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    16
int main(int argc, char**argv) {
2
7ba3ae8cf1fc add relpipe pkg-config libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents: 1
diff changeset
    17
	CLI cli(argc, argv);
9
d88df75dc2eb comment on possible CLI argument collision
František Kučera <franta-hg@frantovo.cz>
parents: 4
diff changeset
    18
	// TODO: argument name collisions? Filter arguments? Use prefix for Qt? Qt: -title, -style, -geometry
3
0d857519a4c9 add Qt libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents: 2
diff changeset
    19
	QApplication app(argc, argv);
0d857519a4c9 add Qt libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents: 2
diff changeset
    20
	
0
ba16fce7ef20 create cmake+netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    21
	std::cout << "TODO: relpipe-out-chart..." << std::endl;
2
7ba3ae8cf1fc add relpipe pkg-config libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents: 1
diff changeset
    22
	
7ba3ae8cf1fc add relpipe pkg-config libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents: 1
diff changeset
    23
	std::shared_ptr<RelationalReader> reader(Factory::create(std::cin));
7ba3ae8cf1fc add relpipe pkg-config libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents: 1
diff changeset
    24
7ba3ae8cf1fc add relpipe pkg-config libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents: 1
diff changeset
    25
	int resultCode = CLI::EXIT_CODE_UNEXPECTED_ERROR;
4
1622c087f3ea add main window, compile Qt .ui file
František Kučera <franta-hg@frantovo.cz>
parents: 3
diff changeset
    26
	
1622c087f3ea add main window, compile Qt .ui file
František Kučera <franta-hg@frantovo.cz>
parents: 3
diff changeset
    27
	RelpipeChartMainWindow window;
1622c087f3ea add main window, compile Qt .ui file
František Kučera <franta-hg@frantovo.cz>
parents: 3
diff changeset
    28
	window.show();
1622c087f3ea add main window, compile Qt .ui file
František Kučera <franta-hg@frantovo.cz>
parents: 3
diff changeset
    29
	
1622c087f3ea add main window, compile Qt .ui file
František Kučera <franta-hg@frantovo.cz>
parents: 3
diff changeset
    30
	app.exec();
1622c087f3ea add main window, compile Qt .ui file
František Kučera <franta-hg@frantovo.cz>
parents: 3
diff changeset
    31
	//return app.exec();
2
7ba3ae8cf1fc add relpipe pkg-config libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents: 1
diff changeset
    32
7ba3ae8cf1fc add relpipe pkg-config libraries using cmake
František Kučera <franta-hg@frantovo.cz>
parents: 1
diff changeset
    33
	return resultCode;
0
ba16fce7ef20 create cmake+netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    34
}