CodeEditorDialog.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
3 
4  This file is part of the TerraLib - a Framework for building GIS enabled
5  applications.
6 
7  TerraLib is free software: you can redistribute it and/or modify
8  it under the terms of the GNU Lesser General Public License as published by
9  the Free Software Foundation, either version 3 of the License,
10  or (at your option) any later version.
11 
12  TerraLib is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU Lesser General Public License for more details.
16 
17  You should have received a copy of the GNU Lesser General Public License
18  along with TerraLib. See COPYING. If not, write to
19  TerraLib Team at <terralib-team@terralib.org>.
20 */
21 #ifndef __TERRALIB_CEDITOR_CODEEDITORDIALOG_H__
22 #define __TERRALIB_CEDITOR_CODEEDITORDIALOG_H__
23 
24 // Terralib
25 #include "../qt/widgets/ceditor/IOWidget.h"
26 #include "../vm/core/VirtualMachine.h"
27 #include "Config.h"
28 
29 // STL
30 #include <memory>
31 
32 // Qt
33 #include <QDialog>
34 #include <QFutureWatcher>
35 #include <QTime>
36 
37 namespace Ui
38 {
39  class CodeEditorDialogForm;
40 }
41 
42 namespace te
43 {
44  namespace ce
45  {
46  class TECEDITOREXPORT CodeEditorDialog : public QDialog
47  {
48  Q_OBJECT
49  public:
50  CodeEditorDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
52 
53  protected slots:
54  void onSaveButtonClicked();
55  void onSaveAsButtonClicked();
56  void onOpenButtonClicked();
57  void onNewButtonClicked();
58  void onRunButtonClicked();
59  void onCloseTabClicked(int index);
60  void onRunFinished();
61  void onTextChanged();
62 
63  private:
64  void save(bool saveAs);
65 
66  private:
67  QTime m_runtime;
68  QFutureWatcher<void> m_watcher;
71  std::unique_ptr<Ui::CodeEditorDialogForm> m_ui;
72  };
73  }
74 }
75 #endif //__TERRALIB_CEDITOR_CODEEDITORDIALOG_H__
#define slots
#define TECEDITOREXPORT
Definition: Config.h:40
URI C++ Library.
te::vm::core::VirtualMachine * m_vm
te::qt::widgets::IOWidget * m_io
std::unique_ptr< Ui::CodeEditorDialogForm > m_ui
QFutureWatcher< void > m_watcher