QElectroTech  0.70
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
ProjectConfigPage Class Referenceabstract

#include <projectconfigpages.h>

Public Member Functions

 ProjectConfigPage (QETProject *, QWidget *=nullptr)
 
 ~ProjectConfigPage () override
 
virtual QETProjectproject () const
 
virtual QETProjectsetProject (QETProject *project, bool=true)
 
void applyConf () override
 
virtual void applyProjectConf ()=0
 
- Public Member Functions inherited from ConfigPage
 ConfigPage (QWidget *parent)
 
 ~ConfigPage () override
 Destructor. More...
 
virtual QString title () const =0
 
virtual QIcon icon () const =0
 

Protected Member Functions

virtual void init ()
 
virtual void initWidgets ()=0
 
virtual void initLayout ()=0
 
virtual void readValuesFromProject ()=0
 
virtual void adjustReadOnly ()=0
 

Protected Attributes

QETProjectm_project
 Currently edited project. More...
 

Private Member Functions

 ProjectConfigPage (const ProjectConfigPage &)
 

Detailed Description

This class, derived from ConfigPage, aims at providing the basic skeleton for a project configuration page.

Definition at line 39 of file projectconfigpages.h.

Constructor & Destructor Documentation

◆ ProjectConfigPage() [1/2]

ProjectConfigPage::ProjectConfigPage ( QETProject project,
QWidget *  parent = nullptr 
)

Constructor

Parameters
projectProject this page is editing.
parentParent QWidget

Definition at line 40 of file projectconfigpages.cpp.

◆ ~ProjectConfigPage()

ProjectConfigPage::~ProjectConfigPage ( )
override

Destructor

Definition at line 49 of file projectconfigpages.cpp.

◆ ProjectConfigPage() [2/2]

ProjectConfigPage::ProjectConfigPage ( const ProjectConfigPage )
private

Member Function Documentation

◆ adjustReadOnly()

virtual void ProjectConfigPage::adjustReadOnly ( )
protectedpure virtual

Use this pure virtual method to adjust the "read only" state of your page widgets according to the currently edited project.

Implemented in ProjectAutoNumConfigPage, and ProjectMainConfigPage.

Referenced by init(), and setProject().

◆ applyConf()

void ProjectConfigPage::applyConf ( )
overridevirtual

Apply the configuration after user input

Implements ConfigPage.

Definition at line 79 of file projectconfigpages.cpp.

References applyProjectConf(), and m_project.

◆ applyProjectConf()

virtual void ProjectConfigPage::applyProjectConf ( )
pure virtual

Apply configuration to the project after user input. This method is automatically called when the ConfigDialog is validated, and only if the project is both non-zero and not read-only.

Implemented in ProjectAutoNumConfigPage, and ProjectMainConfigPage.

Referenced by applyConf().

◆ init()

void ProjectConfigPage::init ( )
protectedvirtual

Initialize the page by calling initWidgets() and initLayout(). Also call readValuesFromProject() and adjustReadOnly() if a non-zero project has been set. Typically, you should call this function in your subclass constructor.

Definition at line 89 of file projectconfigpages.cpp.

References adjustReadOnly(), initLayout(), initWidgets(), m_project, and readValuesFromProject().

Referenced by ProjectMainConfigPage::ProjectMainConfigPage().

◆ initLayout()

virtual void ProjectConfigPage::initLayout ( )
protectedpure virtual

Use this pure virtual method to initialize your page layout. This method is always called after initWidgets().

Implemented in ProjectAutoNumConfigPage, and ProjectMainConfigPage.

Referenced by init().

◆ initWidgets()

virtual void ProjectConfigPage::initWidgets ( )
protectedpure virtual

Use this pure virtual method to initialize your page widgets.

Implemented in ProjectAutoNumConfigPage, and ProjectMainConfigPage.

Referenced by init().

◆ project()

QETProject * ProjectConfigPage::project ( ) const
virtual

◆ readValuesFromProject()

virtual void ProjectConfigPage::readValuesFromProject ( )
protectedpure virtual

Use this pure virtual method to fill widgets with project values.

Implemented in ProjectAutoNumConfigPage, and ProjectMainConfigPage.

Referenced by init(), and setProject().

◆ setProject()

QETProject * ProjectConfigPage::setProject ( QETProject new_project,
bool  read_values = true 
)
virtual

Set new_project as the project being edited by this page.

Parameters
read_valuesTrue to read values from the project into widgets before setting them read only accordingly, false otherwise. Defaults to true.
Returns
the former project

Definition at line 64 of file projectconfigpages.cpp.

References adjustReadOnly(), m_project, and readValuesFromProject().

Member Data Documentation

◆ m_project

QETProject* ProjectConfigPage::m_project
protected

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