LibrePCB Developers Documentation
Loading...
Searching...
No Matches
WindowTab Class Referenceabstract

The WindowTab class. More...

#include <windowtab.h>

+ Inheritance diagram for WindowTab:
+ Collaboration diagram for WindowTab:

Signals

void panelPageRequested (ui::PanelPage p)
 
void closeRequested ()
 
void closeEnforced ()
 
void statusBarMessageChanged (const QString &message, int timeoutMs)
 
void cursorCoordinatesChanged (const Point &pos, const LengthUnit &unit)
 

Public Member Functions

 WindowTab ()=delete
 
 WindowTab (const WindowTab &other)=delete
 
 WindowTab (GuiApplication &app, QObject *parent=nullptr) noexcept
 
virtual ~WindowTab () noexcept
 
virtual ui::TabData getUiData () const noexcept=0
 
virtual void setUiData (const ui::TabData &data) noexcept
 
virtual void activate () noexcept
 
virtual void deactivate () noexcept
 
virtual void trigger (ui::TabAction a) noexcept
 
virtual slint::Image renderScene (float width, float height, int scene) noexcept
 
virtual bool processScenePointerEvent (const QPointF &pos, slint::private_api::PointerEvent e) noexcept
 
virtual bool processSceneScrolled (const QPointF &pos, slint::private_api::PointerScrollEvent e) noexcept
 
virtual bool processSceneKeyEvent (const slint::private_api::KeyEvent &e) noexcept
 
virtual bool requestClose () noexcept
 Request to close the tab.
 
WindowTaboperator= (const WindowTab &rhs)=delete
 

Public Attributes

Signal< WindowTabonUiDataChanged
 

Protected Attributes

GuiApplicationmApp
 

Detailed Description

The WindowTab class.

Constructor & Destructor Documentation

◆ WindowTab() [1/3]

WindowTab ( )
delete

◆ WindowTab() [2/3]

WindowTab ( const WindowTab other)
delete

◆ WindowTab() [3/3]

WindowTab ( GuiApplication app,
QObject *  parent = nullptr 
)
explicitnoexcept

◆ ~WindowTab()

~WindowTab ( )
virtualnoexcept

Member Function Documentation

◆ getUiData()

virtual ui::TabData getUiData ( ) const
pure virtualnoexcept

◆ setUiData()

void setUiData ( const ui::TabData &  data)
virtualnoexcept

Reimplemented in LibraryTab, Board2dTab, and SchematicTab.

+ Here is the caller graph for this function:

◆ activate()

virtual void activate ( )
inlinevirtualnoexcept

Reimplemented in SymbolTab, Board2dTab, Board3dTab, and SchematicTab.

◆ deactivate()

virtual void deactivate ( )
inlinevirtualnoexcept

Reimplemented in SymbolTab, Board2dTab, Board3dTab, and SchematicTab.

+ Here is the caller graph for this function:

◆ trigger()

void trigger ( ui::TabAction  a)
virtualnoexcept

Reimplemented in ComponentCategoryTab, PackageCategoryTab, CreateLibraryTab, DownloadLibraryTab, LibraryTab, SymbolTab, Board2dTab, Board3dTab, and SchematicTab.

+ Here is the caller graph for this function:

◆ renderScene()

slint::Image renderScene ( float  width,
float  height,
int  scene 
)
virtualnoexcept

Reimplemented in SymbolTab, Board2dTab, Board3dTab, and SchematicTab.

◆ processScenePointerEvent()

bool processScenePointerEvent ( const QPointF &  pos,
slint::private_api::PointerEvent  e 
)
virtualnoexcept

Reimplemented in SymbolTab, Board2dTab, Board3dTab, and SchematicTab.

◆ processSceneScrolled()

bool processSceneScrolled ( const QPointF &  pos,
slint::private_api::PointerScrollEvent  e 
)
virtualnoexcept

Reimplemented in SymbolTab, Board2dTab, Board3dTab, and SchematicTab.

◆ processSceneKeyEvent()

bool processSceneKeyEvent ( const slint::private_api::KeyEvent &  e)
virtualnoexcept

Reimplemented in SymbolTab, Board2dTab, and SchematicTab.

◆ requestClose()

virtual bool requestClose ( )
inlinevirtualnoexcept

Request to close the tab.

If there are unsaved changes to the tab, this method will ask the user whether the changes should be saved or not. If the user clicks on "cancel" or the changes could not be saved successfully, this method will return false. If there were no unsaved changes or they were successfully saved, the method returns true.

Return values
trueTab is safe to be closed.
falseTab still has unsaved changes.

Reimplemented in ComponentCategoryTab, PackageCategoryTab, and SymbolTab.

◆ operator=()

WindowTab & operator= ( const WindowTab rhs)
delete

◆ panelPageRequested

void panelPageRequested ( ui::PanelPage  p)
signal
+ Here is the caller graph for this function:

◆ closeRequested

void closeRequested ( )
signal
+ Here is the caller graph for this function:

◆ closeEnforced

void closeEnforced ( )
signal
+ Here is the caller graph for this function:

◆ statusBarMessageChanged

void statusBarMessageChanged ( const QString &  message,
int  timeoutMs 
)
signal
+ Here is the caller graph for this function:

◆ cursorCoordinatesChanged

void cursorCoordinatesChanged ( const Point pos,
const LengthUnit unit 
)
signal
+ Here is the caller graph for this function:

Member Data Documentation

◆ onUiDataChanged

Signal<WindowTab> onUiDataChanged

◆ mApp

GuiApplication& mApp
protected

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