shows the ParamEditor widget in a QMainWindow with a toolbar More...
#include <OpenMS/VISUAL/APPLICATIONS/INIFileEditorWindow.h>
Public Slots | |
| bool | openFile (const String &filename="") |
| loads the xml-file into a Param object and loads Param into ParamEditor | |
| bool | saveFile () |
| saves the users changes in a xml-file if the Param object is valid | |
| bool | saveFileAs () |
| like saveFile but with a file dialog to choose a filename | |
| void | updateWindowTitle (bool) |
| if the user changes data in ParamEditor the title shows a '*' | |
Public Member Functions | |
| INIFileEditorWindow (QWidget *parent=0) | |
| menu is created here | |
| void | closeEvent (QCloseEvent *event) |
| when user closes window a message box asks the user if he wants to save | |
Private Attributes | |
| ParamEditor * | editor_ |
| ParamEditor object for visualization. | |
| Param | param_ |
| Param object for storing data. | |
| QString | filename_ |
| filename of xml-file to store the Param object | |
| String | current_path_ |
| path used as next default location of the load/store dialogs | |
shows the ParamEditor widget in a QMainWindow with a toolbar
| INIFileEditorWindow | ( | QWidget * | parent = 0 |
) |
menu is created here
References INIFileEditorWindow::editor_, INIFileEditorWindow::openFile(), INIFileEditorWindow::saveFile(), INIFileEditorWindow::saveFileAs(), and INIFileEditorWindow::updateWindowTitle().
| void closeEvent | ( | QCloseEvent * | event | ) |
when user closes window a message box asks the user if he wants to save
References INIFileEditorWindow::editor_, ParamEditor::isModified(), and INIFileEditorWindow::saveFile().
| bool openFile | ( | const String & | filename = "" |
) | [slot] |
loads the xml-file into a Param object and loads Param into ParamEditor
References Param::clear(), INIFileEditorWindow::current_path_, INIFileEditorWindow::editor_, INIFileEditorWindow::filename_, ParamEditor::isModified(), ParamEditor::load(), ParamXMLFile::load(), LOG_ERROR, INIFileEditorWindow::param_, File::readable(), String::toQString(), and INIFileEditorWindow::updateWindowTitle().
Referenced by INIFileEditorWindow::INIFileEditorWindow(), and main().
| bool saveFile | ( | ) | [slot] |
saves the users changes in a xml-file if the Param object is valid
References INIFileEditorWindow::editor_, INIFileEditorWindow::filename_, ParamEditor::isModified(), INIFileEditorWindow::param_, ParamXMLFile::store(), ParamEditor::store(), and INIFileEditorWindow::updateWindowTitle().
Referenced by INIFileEditorWindow::closeEvent(), and INIFileEditorWindow::INIFileEditorWindow().
| bool saveFileAs | ( | ) | [slot] |
like saveFile but with a file dialog to choose a filename
References INIFileEditorWindow::current_path_, INIFileEditorWindow::editor_, INIFileEditorWindow::filename_, ParamEditor::isModified(), INIFileEditorWindow::param_, ParamXMLFile::store(), ParamEditor::store(), String::toQString(), and INIFileEditorWindow::updateWindowTitle().
Referenced by INIFileEditorWindow::INIFileEditorWindow().
| void updateWindowTitle | ( | bool | update | ) | [slot] |
if the user changes data in ParamEditor the title shows a '*'
References File::basename(), INIFileEditorWindow::current_path_, INIFileEditorWindow::filename_, and File::path().
Referenced by INIFileEditorWindow::INIFileEditorWindow(), INIFileEditorWindow::openFile(), INIFileEditorWindow::saveFile(), and INIFileEditorWindow::saveFileAs().
String current_path_ [private] |
path used as next default location of the load/store dialogs
Referenced by INIFileEditorWindow::openFile(), INIFileEditorWindow::saveFileAs(), and INIFileEditorWindow::updateWindowTitle().
ParamEditor* editor_ [private] |
ParamEditor object for visualization.
Referenced by INIFileEditorWindow::closeEvent(), INIFileEditorWindow::INIFileEditorWindow(), INIFileEditorWindow::openFile(), INIFileEditorWindow::saveFile(), and INIFileEditorWindow::saveFileAs().
QString filename_ [private] |
filename of xml-file to store the Param object
Referenced by INIFileEditorWindow::openFile(), INIFileEditorWindow::saveFile(), INIFileEditorWindow::saveFileAs(), and INIFileEditorWindow::updateWindowTitle().
Param object for storing data.
Referenced by INIFileEditorWindow::openFile(), INIFileEditorWindow::saveFile(), and INIFileEditorWindow::saveFileAs().
| OpenMS / TOPP release 1.10.0 | Documentation generated on Thu Mar 7 2013 09:42:57 using doxygen 1.7.1 |