The SKIRT project
advanced radiative transfer for astrophysics
Public Slots | Signals | Public Member Functions | Private Member Functions | Private Attributes | List of all members
SaveWizardPane Class Reference

#include <SaveWizardPane.hpp>

Inheritance diagram for SaveWizardPane:
Inheritance graph
[legend]

Public Slots

void quit ()
 
void restart ()
 
void save ()
 
void saveAs ()
 

Signals

void hierarchyWasSaved (QString filepath)
 
void restartWizard ()
 

Public Member Functions

 SaveWizardPane (const SchemaDef *schema, Item *root, QString filepath, bool dirty, QObject *target)
 

Private Member Functions

void saveToFile (QString filepath)
 
void updateSaveInfo ()
 

Private Attributes

bool _dirty
 
QString _filepath
 
QLabel * _filepathLabel
 
QPushButton * _quitButton
 
QPushButton * _restartButton
 
Item_root
 
QPushButton * _saveAsButton
 
QPushButton * _saveButton
 
const SchemaDef_schema
 

Detailed Description

A SaveWizardPane instance displays the user interface for saving the current SMILE dataset into a SMILE XML file.

Constructor & Destructor Documentation

◆ SaveWizardPane()

SaveWizardPane::SaveWizardPane ( const SchemaDef schema,
Item root,
QString  filepath,
bool  dirty,
QObject *  target 
)
explicit

The default (and only) constructor creates and initializes the GUI for this pane. The first argument specifies the schema definition for the dataset to be saved. The second argument provides a pointer to the root of the dataset item hierarchy. The subsequent arguments provide the filepath in which the simulation item hierarchy has been previously saved, if any, and the current dirty state of the hierarchy. The last argument specifies the object that will be notified of a successful save operation through invocation of the object's relevant slot.

Member Function Documentation

◆ hierarchyWasSaved

void SaveWizardPane::hierarchyWasSaved ( QString  filepath)
signal

This signal is emitted after the simulation item hierarchy has been successfully saved.

◆ quit

void SaveWizardPane::quit ( )
slot

This function attempts to quit the application.

◆ restart

void SaveWizardPane::restart ( )
slot

This function attempts to restart the wizard.

◆ restartWizard

void SaveWizardPane::restartWizard ( )
signal

This signal is emitted after the user pushes the restart button (and declines to save any changes, if applicable).

◆ save

void SaveWizardPane::save ( )
slot

If the dataset was previously saved to a known filepath, this function saves the dataset again to the same file path, replacing the previous file, and notifies the target object by emitting a hierarchyWasSaved() signal. If no previous filepath is known, the function does nothing.

◆ saveAs

void SaveWizardPane::saveAs ( )
slot

This function displays the appropriate dialog to obtain a file path from the user, saves the dataset to the selected file path, and notifies the target object by emitting a hierarchyWasSaved() signal.

◆ saveToFile()

void SaveWizardPane::saveToFile ( QString  filepath)
private

This private function saves the dataset to the specfied file path, and notifies the target object by emitting a hierarchyWasSaved() signal.

◆ updateSaveInfo()

void SaveWizardPane::updateSaveInfo ( )
private

This function enables or disables the Save push button depending on the filename and dirty state, and puts the current filepath into the corresponding label.


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