Theme Editor: Began working on open document functionality (still incomplete), fixed...
[kugel-rb.git] / utils / themeeditor / editorwindow.h
blobe7fd96a5481c6ce47e1e4764c8e6cc79155ada5c
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2010 Robert Bieber
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #ifndef EDITORWINDOW_H
23 #define EDITORWINDOW_H
25 #include <QMainWindow>
27 #include "parsetreemodel.h"
28 #include "skinhighlighter.h"
29 #include "skindocument.h"
31 namespace Ui {
32 class EditorWindow;
35 class EditorWindow : public QMainWindow {
36 Q_OBJECT
37 public:
38 EditorWindow(QWidget *parent = 0);
39 ~EditorWindow();
41 protected:
42 virtual void closeEvent(QCloseEvent* event);
44 private slots:
45 void showPanel();
46 void newTab();
47 void shiftTab(int index);
48 bool closeTab(int index);
49 void closeCurrent();
50 void saveCurrent();
51 void saveCurrentAs();
52 void openFile();
53 void tabTitleChanged(QString title);
54 void updateCurrent(); /* Generates code in the current tab */
56 private:
57 /* Setup functions */
58 void loadSettings();
59 void saveSettings();
60 void setupUI();
61 void setupMenus();
63 Ui::EditorWindow *ui;
66 #endif // EDITORWINDOW_H