OpenMS
Loading...
Searching...
No Matches
INIFileEditorWindow Class Reference

shows the ParamEditor widget in a QMainWindow with a toolbar More...

#include <OpenMS/VISUAL/APPLICATIONS/INIFileEditorWindow.h>

Inheritance diagram for INIFileEditorWindow:
[legend]
Collaboration diagram for INIFileEditorWindow:
[legend]

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=nullptr)
 menu is created here
 
void closeEvent (QCloseEvent *event) override
 when user closes window a message box asks the user if he wants to save
 

Private Attributes

ParamEditoreditor_
 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
 

Detailed Description

shows the ParamEditor widget in a QMainWindow with a toolbar

Constructor & Destructor Documentation

◆ INIFileEditorWindow()

Member Function Documentation

◆ closeEvent()

void closeEvent ( QCloseEvent *  event)
override

when user closes window a message box asks the user if he wants to save

References INIFileEditorWindow::editor_, ParamEditor::isModified(), and INIFileEditorWindow::saveFile().

◆ openFile

◆ saveFile

◆ saveFileAs

◆ updateWindowTitle

Member Data Documentation

◆ current_path_

String current_path_
private

path used as next default location of the load/store dialogs

Referenced by INIFileEditorWindow::openFile(), INIFileEditorWindow::saveFileAs(), and INIFileEditorWindow::updateWindowTitle().

◆ editor_

◆ filename_

QString filename_
private

◆ param_