blob: d025f26bef967eac6750017f0a2ca24679df4c59 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
 | #include <iostream>
#include <QApplication>
#include <QMainWindow>
#include <QWidget>
#include <QGridLayout>
#include <QTextEdit>
#include "Console.h"
#include "Interpreter.h"
Console* console;
void SetupWindow( int argc, char *argv[] )
{
    QMainWindow* window = new QMainWindow;
    window->resize( 800, 600 );
    QWidget* centralWidget = new QWidget(window);
    QGridLayout* layout = new QGridLayout(centralWidget);
    console = new Console;
    layout->addWidget(console, 0, 0, 1, 1);
    window->setCentralWidget(centralWidget);
    window->show( );
}
int main( int argc, char *argv[] )
{
    QApplication app( argc, argv );
    Interpreter::Initialize( );
    SetupWindow( argc, argv );
    bool res = app.exec( );
    delete console;
    Interpreter::Finalize( );
    return res;
}
 |