contrib/parameter_gui/mainwindow.h

00001 //---------------------------------------------------------------------------
00002 //
00003 //    Copyright (C) 2010, 2011 by the deal.II authors
00004 //
00005 //    This file is subject to QPL and may not be  distributed
00006 //    without copyright and license information. Please refer
00007 //    to the file deal.II/doc/license.html for the  text  and
00008 //    further information on this license.
00009 //
00010 //---------------------------------------------------------------------------
00011 
00012 #ifndef MAINWINDOW_H
00013 #define MAINWINDOW_H
00014 
00015 #include <QMainWindow>
00016 #include <QTreeWidget>
00017 #include <QDialog>
00018 #include <QSettings>
00019 
00020 #include "info_message.h"
00021 
00022 
00023 namespace dealii
00024 {
00028   namespace ParameterGui
00029   {
00044     class MainWindow : public QMainWindow
00045     {
00046       Q_OBJECT
00047 
00048       public:
00055         MainWindow(const QString  &filename = "");
00056 
00057       protected:
00062         void closeEvent(QCloseEvent *event);
00063 
00064       private slots:
00065 
00069         void open();
00073         bool save();
00077         bool save_as();
00081         void about();
00082 
00087         void tree_was_modified();
00088 
00089       private:
00094         void show_message ();
00098         void create_actions();
00102         void create_menus();
00109         bool maybe_save ();
00113         bool save_file (const QString &filename);
00117         void load_file (const QString &filename);
00121         void set_current_file (const QString  &filename);
00125         QTreeWidget * tree_widget;
00130         QMenu * file_menu;
00135         QMenu * help_menu;
00139         QAction * open_act;
00143         QAction * save_act;
00147         QAction * save_as_act;
00151         QAction * exit_act;
00155         QAction * about_act;
00159         QAction * about_qt_act;
00163         QString  current_file;
00167         InfoMessage * info_message;
00171         QSettings * gui_settings;
00172     };
00173   }
00175 }
00176 
00177 
00178 #endif
00179 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

deal.II documentation generated on Tue May 22 2012 12:06:02 by doxygen 1.7.3