mainwindow.h 1.49 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
#ifndef TUMVISMAINWINDOW_H__
#define TUMVISMAINWINDOW_H__

#include "sigslot/sigslot.h"
#include "application/tumvisapplication.h"
#include "application/gui/pipelinetreewidget.h"

#include <QMainWindow>
#include <vector>

namespace TUMVis {
schultezub's avatar
schultezub committed
12
13
14
15
    /**
     * Main Window for the TUMVis application.
     * Wraps a nice Qt GUI around the TumVisApplication instance given during creation.
     */
16
17
18
19
    class MainWindow : public QMainWindow, public sigslot::has_slots<> {
        Q_OBJECT;

    public:
schultezub's avatar
schultezub committed
20
21
22
23
        /**
         * Creates a new TumVis Main window for \a application.
         * \param   application     TumVisApplication to create a GUI for.
         */
24
25
        MainWindow(TumVisApplication* application);

schultezub's avatar
schultezub committed
26
27
28
        /**
         * Destructor, make sure to call before destroying the application
         */
29
30
31
        ~MainWindow();


schultezub's avatar
schultezub committed
32
33
34
        /**
         * Slot to be called by the application when its collection of pipelines has changed.
         */
35
36
37
        void onPipelinesChanged();

    signals:
schultezub's avatar
schultezub committed
38
         /// Qt signal for updating the PipelineWidget.
39
40
41
42
        void updatePipelineWidget(const std::vector<AbstractPipeline*>&);


    private:
schultezub's avatar
schultezub committed
43
44
45
        /**
         * Setup Qt GUI stuff
         */
46
47
48
49
50
51
52
53
54
55
        void setup();

        TumVisApplication* _application;            ///< Pointer to the application hosting the whole stuff

        PipelineTreeWidget* _pipelineWidget;        ///< Widget for browsing the active pipelines

    };
}

#endif // TUMVISMAINWINDOW_H__