LibrePCB Developers Documentation
Loading...
Searching...
No Matches
WindowSection Class Referencefinal

The WindowSection class. More...

#include <windowsection.h>

Inherits QObject.

+ Collaboration diagram for WindowSection:

Signals

void currentTabChanged ()
 
void panelPageRequested (ui::PanelPage p)
 
void derivedUiDataChanged (std::size_t index)
 
void statusBarMessageChanged (const QString &message, int timeoutMs)
 
void cursorCoordinatesChanged (const Point &pos, const LengthUnit &unit)
 

Public Member Functions

 WindowSection ()=delete
 
 WindowSection (const WindowSection &other)=delete
 
 WindowSection (GuiApplication &app, QObject *parent=nullptr) noexcept
 
 ~WindowSection () noexcept
 
const ui::WindowSectionData & getUiData () const noexcept
 
void setUiData (const ui::WindowSectionData &data) noexcept
 
void setHomeTabVisible (bool visible) noexcept
 
void addTab (std::shared_ptr< WindowTab > tab, int index=-1) noexcept
 
std::shared_ptr< WindowTabremoveTab (int index) noexcept
 
void triggerTab (int index, ui::TabAction a) noexcept
 
slint::Image renderScene (float width, float height, int scene) noexcept
 
bool processScenePointerEvent (const QPointF &pos, slint::private_api::PointerEvent e) noexcept
 
bool processSceneScrolled (const QPointF &pos, slint::private_api::PointerScrollEvent e) noexcept
 
bool processSceneKeyEvent (const slint::private_api::KeyEvent &e) noexcept
 
template<typename T >
bool switchToTab () noexcept
 
template<typename T >
bool switchToLibraryElementTab (const FilePath &fp) noexcept
 
template<typename T >
bool switchToProjectTab (int prjIndex, int objIndex) noexcept
 
bool requestCloseAllTabs () noexcept
 Request to close all tabs.
 
WindowSectionoperator= (const WindowSection &rhs)=delete
 

Public Attributes

Signal< WindowSectiononUiDataChanged
 

Private Types

typedef UiObjectList< WindowTab, ui::TabData > TabList
 

Private Member Functions

void setCurrentTab (int index, bool forceUpdate=false) noexcept
 
std::shared_ptr< WindowTabgetCurrentTab () noexcept
 
void highlight () noexcept
 
void tabCloseRequested () noexcept
 

Private Attributes

GuiApplicationmApp
 
std::shared_ptr< TabListmTabs
 
ui::WindowSectionData mUiData
 

Detailed Description

The WindowSection class.

Member Typedef Documentation

◆ TabList

typedef UiObjectList<WindowTab, ui::TabData> TabList
private

Constructor & Destructor Documentation

◆ WindowSection() [1/3]

WindowSection ( )
delete

◆ WindowSection() [2/3]

WindowSection ( const WindowSection other)
delete

◆ WindowSection() [3/3]

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

◆ ~WindowSection()

~WindowSection ( )
noexcept

Member Function Documentation

◆ getUiData()

const ui::WindowSectionData & getUiData ( ) const
inlinenoexcept

◆ setUiData()

void setUiData ( const ui::WindowSectionData &  data)
noexcept

◆ setHomeTabVisible()

void setHomeTabVisible ( bool  visible)
noexcept

◆ addTab()

void addTab ( std::shared_ptr< WindowTab tab,
int  index = -1 
)
noexcept
+ Here is the call graph for this function:

◆ removeTab()

std::shared_ptr< WindowTab > removeTab ( int  index)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ triggerTab()

void triggerTab ( int  index,
ui::TabAction  a 
)
noexcept

◆ renderScene()

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

◆ processScenePointerEvent()

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

◆ processSceneScrolled()

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

◆ processSceneKeyEvent()

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

◆ switchToTab()

template<typename T >
bool switchToTab ( )
inlinenoexcept
+ Here is the call graph for this function:

◆ switchToLibraryElementTab()

template<typename T >
bool switchToLibraryElementTab ( const FilePath fp)
inlinenoexcept
+ Here is the call graph for this function:

◆ switchToProjectTab()

template<typename T >
bool switchToProjectTab ( int  prjIndex,
int  objIndex 
)
inlinenoexcept
+ Here is the call graph for this function:

◆ requestCloseAllTabs()

bool requestCloseAllTabs ( )
noexcept

Request to close all tabs.

If there are unsaved changes in any tabs, 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
trueAll tabs are safe to be closed.
falseSome tabs still has unsaved changes.

◆ operator=()

WindowSection & operator= ( const WindowSection rhs)
delete

◆ currentTabChanged

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

◆ panelPageRequested

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

◆ derivedUiDataChanged

void derivedUiDataChanged ( std::size_t  index)
signal

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

◆ setCurrentTab()

void setCurrentTab ( int  index,
bool  forceUpdate = false 
)
privatenoexcept
+ Here is the caller graph for this function:

◆ getCurrentTab()

std::shared_ptr< WindowTab > getCurrentTab ( )
privatenoexcept

◆ highlight()

void highlight ( )
privatenoexcept
+ Here is the caller graph for this function:

◆ tabCloseRequested()

void tabCloseRequested ( )
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ onUiDataChanged

Signal<WindowSection> onUiDataChanged

◆ mApp

GuiApplication& mApp
private

◆ mTabs

std::shared_ptr<TabList> mTabs
private

◆ mUiData

ui::WindowSectionData mUiData
private

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