Reference documentation for deal.II version 8.4.1
Public Member Functions | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
dealii::ParameterGui::MainWindow Class Reference

#include </home/dealii/dealii-8.4.1/contrib/parameter_gui/mainwindow.h>

Inherits QMainWindow.

Public Member Functions

 MainWindow (const QString &filename="")

Protected Member Functions

void closeEvent (QCloseEvent *event)

Private Slots

void open ()
bool save ()
bool save_as ()
void about ()
void tree_was_modified ()

Private Member Functions

void show_message ()
void create_actions ()
void create_menus ()
bool maybe_save ()
bool save_file (const QString &filename)
void load_file (const QString &filename)
void set_current_file (const QString &filename)

Private Attributes

QTreeWidget * tree_widget
QMenu * file_menu
QMenu * help_menu
QAction * open_act
QAction * save_act
QAction * save_as_act
QAction * exit_act
QAction * about_act
QAction * about_qt_act
QString current_file
QSettings * gui_settings

Detailed Description

The MainWindow class of the the parameterGUI. The parameterGUI is a graphical user interface for editing parameter files based on the XML format, created by the ParameterHandler::print_parameters() function with ParameterHandler::XML as second argument. Please see Representation of Parameters in the documentation of the ParameterHandler class for more details. The MainWindow class provides the basic functionality of the GUI as save- and load-file-actions and documentation. The parameterGUI provides special editors for the different types of parameters defined in the ParameterHandler class.

This class is used in the graphical user interface for the ParameterHandler class. It is not compiled into the deal.II libraries and can not be used by applications using deal.II.
Martin Steigemann, Wolfgang Bangerth, 2010

Definition at line 49 of file mainwindow.h.

Constructor & Destructor Documentation

dealii::ParameterGui::MainWindow::MainWindow ( const QString &  filename = "")

Constructor. If a filename is given, the MainWindow tries to open and parse the file.

Definition at line 29 of file mainwindow.cpp.

Member Function Documentation

void dealii::ParameterGui::MainWindow::closeEvent ( QCloseEvent *  event)

Reimplemented from QMainWindow. We ask, if changes should be saved.

Definition at line 211 of file mainwindow.cpp.

void dealii::ParameterGui::MainWindow::open ( )

Open a parameter file.

Definition at line 76 of file mainwindow.cpp.

bool dealii::ParameterGui::MainWindow::save ( )

Save the parameter file.

Definition at line 91 of file mainwindow.cpp.

bool dealii::ParameterGui::MainWindow::save_as ( )

Open a file dialog to save the parameter file.

Definition at line 101 of file mainwindow.cpp.

void dealii::ParameterGui::MainWindow::about ( )

Show some information on the parameterGUI

Definition at line 116 of file mainwindow.cpp.

void dealii::ParameterGui::MainWindow::tree_was_modified ( )

A slot that should be always called, if parameter values were changed.

Definition at line 187 of file mainwindow.cpp.

void dealii::ParameterGui::MainWindow::show_message ( )

Show an information dialog, how parameters can be edited.

Definition at line 197 of file mainwindow.cpp.

void dealii::ParameterGui::MainWindow::create_actions ( )

This function creates all actions.

Definition at line 221 of file mainwindow.cpp.

void dealii::ParameterGui::MainWindow::create_menus ( )

This function creates all menus.

Definition at line 261 of file mainwindow.cpp.

bool dealii::ParameterGui::MainWindow::maybe_save ( )

This function checks, if parameters were changed and show a dialog, if changes should be saved. This function should be always called, before open a new parameter file or before closing the GUI

Definition at line 278 of file mainwindow.cpp.

bool dealii::ParameterGui::MainWindow::save_file ( const QString &  filename)

Save parameters to filename in XML format.

Definition at line 299 of file mainwindow.cpp.

void dealii::ParameterGui::MainWindow::load_file ( const QString &  filename)

Load parameters from filename in XML format.

Definition at line 325 of file mainwindow.cpp.

void dealii::ParameterGui::MainWindow::set_current_file ( const QString &  filename)

This functions writes the current filename to the window title.

Definition at line 360 of file mainwindow.cpp.

Member Data Documentation

QTreeWidget* dealii::ParameterGui::MainWindow::tree_widget

This is the tree structure in which we store all parameters.

Definition at line 130 of file mainwindow.h.

QMenu* dealii::ParameterGui::MainWindow::file_menu

This menu provides all file actions as open, save, save as and exit

Definition at line 135 of file mainwindow.h.

QMenu* dealii::ParameterGui::MainWindow::help_menu

This menu provides some informations about the parameterGUI and about Qt

Definition at line 140 of file mainwindow.h.

QAction* dealii::ParameterGui::MainWindow::open_act

QAction open a file.

Definition at line 144 of file mainwindow.h.

QAction* dealii::ParameterGui::MainWindow::save_act

QAction save a file.

Definition at line 148 of file mainwindow.h.

QAction* dealii::ParameterGui::MainWindow::save_as_act

QAction save as a file.

Definition at line 152 of file mainwindow.h.

QAction* dealii::ParameterGui::MainWindow::exit_act

QAction exit the GUI.

Definition at line 156 of file mainwindow.h.

QAction* dealii::ParameterGui::MainWindow::about_act

QAction about the parameterGUI.

Definition at line 160 of file mainwindow.h.

QAction* dealii::ParameterGui::MainWindow::about_qt_act

QAction about Qt.

Definition at line 164 of file mainwindow.h.

QString dealii::ParameterGui::MainWindow::current_file

This value stores the current filename we work on.

Definition at line 168 of file mainwindow.h.

InfoMessage* dealii::ParameterGui::MainWindow::info_message

This dialog shows a short information message after loading a file.

Definition at line 172 of file mainwindow.h.

QSettings* dealii::ParameterGui::MainWindow::gui_settings

An object for storing user settings.

Definition at line 176 of file mainwindow.h.

The documentation for this class was generated from the following files: