QElectroTech  0.8-dev
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
ProjectConfigPage Class Referenceabstract

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

#include <projectconfigpages.h>

Inheritance diagram for ProjectConfigPage:
Inheritance graph
Collaboration diagram for ProjectConfigPage:
Collaboration graph

Public Member Functions

 ProjectConfigPage (QETProject *, QWidget *=nullptr)
 
 ~ProjectConfigPage () override
 
virtual QETProjectproject () const
 
virtual QETProjectsetProject (QETProject *project, bool=true)
 ProjectConfigPage::setProject Set new_project as the project being edited by this page. More...
 
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

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

Constructor & Destructor Documentation

◆ ProjectConfigPage() [1/2]

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

Constructor

Parameters
projectProject this page is editing.
parentParent QWidget

◆ ~ProjectConfigPage()

ProjectConfigPage::~ProjectConfigPage ( )
override

Destructor

◆ 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.

Here is the caller graph for this function:

◆ applyConf()

void ProjectConfigPage::applyConf ( )
overridevirtual

Apply the configuration after user input

Implements ConfigPage.

Here is the call graph for this function:

◆ 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.

Here is the caller graph for this function:

◆ 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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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.

Here is the caller graph for this function:

◆ initWidgets()

virtual void ProjectConfigPage::initWidgets ( )
protectedpure virtual

Use this pure virtual method to initialize your page widgets.

Implemented in ProjectAutoNumConfigPage, and ProjectMainConfigPage.

Here is the caller graph for this function:

◆ project()

QETProject * ProjectConfigPage::project ( ) const
virtual
Returns
the project being edited by this page
Here is the caller graph for this function:

◆ readValuesFromProject()

virtual void ProjectConfigPage::readValuesFromProject ( )
protectedpure virtual

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

Implemented in ProjectAutoNumConfigPage, and ProjectMainConfigPage.

Here is the caller graph for this function:

◆ setProject()

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

ProjectConfigPage::setProject Set new_project as the project being edited by this page.

Parameters
new_project: True to read values from the project into widgets before setting them read only accordingly, false otherwise. Defaults to true.
read_values
Returns
the former project
Here is the call graph for this function:

Member Data Documentation

◆ m_project

QETProject* ProjectConfigPage::m_project
protected

Currently edited project.


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