3D Forest
Software for analysis of Lidar data from forest environment.
MainWindow Class Reference

#include <MainWindow.hpp>

Inherits QMainWindow, and ThreadCallbackInterface.

Classes

class  Menu
 
class  MenuItem
 

Public Slots

void slotRender ()
 
void slotRenderViewport (size_t viewportId)
 
void slotRenderViewports ()
 

Signals

void signalRender ()
 
void signalUpdate (void *sender, const QSet< Editor::Type > &target)
 

Public Member Functions

 MainWindow (QWidget *parent=nullptr)
 
virtual ~MainWindow ()
 
QSize minimumSizeHint () const override
 
QSize sizeHint () const override
 
void showError (const char *message)
 
void importFile ()
 
Editoreditor ()
 
void setWindowTitle (const QString &path)
 
void createAction (QAction **result, const QString &menuTitle, const QString &toolBarTitle, const QString &text, const QString &toolTip, const QIcon &icon, const QObject *receiver, const char *member, int menuPriority=-1, int menuItemPriority=-1)
 
void hideToolBar (const QString &menu)
 
void suspendThreads ()
 
void resumeThreads ()
 
virtual void threadProgress (bool finished) override
 
void update (void *sender, const QSet< Editor::Type > &target)
 
void update (const QSet< Editor::Type > &target, Page::State viewPortsCacheState=Page::STATE_READ, bool resetCamera=false)
 
void updateNewProject ()
 
void updateData ()
 
void updateFilter ()
 
void updateModifiers ()
 
void updateRender ()
 
- Public Member Functions inherited from ThreadCallbackInterface
virtual ~ThreadCallbackInterface ()=default
 

Static Public Member Functions

static void createToolButton (QToolButton **result, const QString &text, const QString &toolTip, const QIcon &icon, const QObject *receiver, const char *member)
 

Static Public Attributes

static const char * APPLICATION_NAME = "3D Forest"
 
static const char * APPLICATION_VERSION = "1.0"
 
static const int ICON_SIZE = 16
 
static const int ICON_SIZE_TEXT = 16
 

Protected Member Functions

void paintEvent (QPaintEvent *event) override
 
void resizeEvent (QResizeEvent *event) override
 
void showEvent (QShowEvent *event) override
 
void hideEvent (QHideEvent *event) override
 
void closeEvent (QCloseEvent *event) override
 

Private Member Functions

void loadPlugins ()
 
bool loadPlugin (QObject *plugin)
 
void createMenu ()
 

Private Attributes

Editor editor_
 
RenderThread threadRender_
 
ProjectFileInterfaceprojectFilePlugin_
 
ImportFileInterfaceimportFilePlugin_
 
ViewerInterfaceviewerPlugin_
 
HelpPluginhelpPlugin_
 
std::vector< PluginInterface * > plugins_
 
std::vector< MainWindow::Menumenus_
 
QHash< QString, size_t > menuIndex_
 
QHash< QString, QToolBar * > toolBars_
 
QAction * exitAction_
 

Constructor & Destructor Documentation

◆ MainWindow()

MainWindow::MainWindow ( QWidget * parent = nullptr)

◆ ~MainWindow()

MainWindow::~MainWindow ( )
virtual

Member Function Documentation

◆ closeEvent()

void MainWindow::closeEvent ( QCloseEvent * event)
overrideprotected

◆ createAction()

◆ createMenu()

void MainWindow::createMenu ( )
private

Referenced by MainWindow().

◆ createToolButton()

void MainWindow::createToolButton ( QToolButton ** result,
const QString & text,
const QString & toolTip,
const QIcon & icon,
const QObject * receiver,
const char * member )
static

◆ editor()

Editor & MainWindow::editor ( )
inline

Referenced by ProjectFilePlugin::closeProject(), FilterClassificationWidget::dataChanged(), FilterFilesWidget::dataChanged(), FilterTreesWidget::dataChanged(), SettingsUnitsWidget::dataChanged(), SettingsViewWidget::dataChanged(), FilterAreaBoxWidget::filterChanged(), FilterClassificationWidget::filterChanged(), FilterDescriptorWidget::filterChanged(), FilterElevationWidget::filterChanged(), FilterFilesWidget::filterChanged(), FilterIntensityWidget::filterChanged(), FilterTreesWidget::filterChanged(), ComputeHeightMapModifier::initialize(), ProjectFilePlugin::openProject(), TreeTableExportDialog::properties(), ProjectFilePlugin::saveProject(), FilterElevationWidget::setElevation(), FilterAreaBoxWidget::setFilterEnabled(), FilterAreaBoxWidget::setRegion(), TreeTableWidget::setRow(), FilterTreesTreeWidget::setSegment(), ExportFilePlugin::slotExportFile(), FilterAreaBoxWidget::slotRangeIntermediateMaximumValue(), FilterElevationWidget::slotRangeIntermediateMaximumValue(), FilterAreaBoxWidget::slotRangeIntermediateMinimumValue(), FilterElevationWidget::slotRangeIntermediateMinimumValue(), EditPlugin::slotResetElevation(), FilterAreaBoxWidget::slotUpdate(), FilterClassificationWidget::slotUpdate(), FilterDescriptorWidget::slotUpdate(), FilterElevationWidget::slotUpdate(), FilterFilesWidget::slotUpdate(), FilterIntensityWidget::slotUpdate(), FilterTreesWidget::slotUpdate(), SettingsUnitsWidget::slotUpdate(), SettingsViewWidget::slotUpdate(), TreeTableWidget::slotUpdate(), and ViewerPlugin::slotViewLayout().

◆ hideEvent()

void MainWindow::hideEvent ( QHideEvent * event)
overrideprotected

◆ hideToolBar()

void MainWindow::hideToolBar ( const QString & menu)

◆ importFile()

void MainWindow::importFile ( )

◆ loadPlugin()

bool MainWindow::loadPlugin ( QObject * plugin)
private

Referenced by loadPlugins().

◆ loadPlugins()

void MainWindow::loadPlugins ( )
private

Referenced by MainWindow().

◆ minimumSizeHint()

QSize MainWindow::minimumSizeHint ( ) const
override

◆ paintEvent()

void MainWindow::paintEvent ( QPaintEvent * event)
overrideprotected

◆ resizeEvent()

void MainWindow::resizeEvent ( QResizeEvent * event)
overrideprotected

◆ resumeThreads()

◆ setWindowTitle()

void MainWindow::setWindowTitle ( const QString & path)

Referenced by MainWindow(), and updateNewProject().

◆ showError()

◆ showEvent()

void MainWindow::showEvent ( QShowEvent * event)
overrideprotected

◆ signalRender

void MainWindow::signalRender ( )
signal

Call rendering from another thread.

Referenced by MainWindow(), and threadProgress().

◆ signalUpdate

void MainWindow::signalUpdate ( void * sender,
const QSet< Editor::Type > & target )
signal

Connect to this signal in your plugin to be notified about data changes.

Referenced by MainWindow(), update(), and updateNewProject().

◆ sizeHint()

QSize MainWindow::sizeHint ( ) const
override

◆ slotRender

void MainWindow::slotRender ( )
slot

Calls paint() on all viewports.

Referenced by MainWindow().

◆ slotRenderViewport

void MainWindow::slotRenderViewport ( size_t viewportId)
slot

Updates new data in specified viewport.

◆ slotRenderViewports

void MainWindow::slotRenderViewports ( )
slot

◆ suspendThreads()

◆ threadProgress()

void MainWindow::threadProgress ( bool finished)
overridevirtual

◆ update() [1/2]

void MainWindow::update ( const QSet< Editor::Type > & target,
Page::State viewPortsCacheState = Page::STATE_READ,
bool resetCamera = false )

◆ update() [2/2]

◆ updateData()

void MainWindow::updateData ( )

Clear cached point data and start new rendering.

Referenced by FilterClassificationWidget::dataChanged(), FilterFilesWidget::dataChanged(), and FilterTreesWidget::dataChanged().

◆ updateFilter()

◆ updateModifiers()

void MainWindow::updateModifiers ( )

Reset modifiers of cached point data and start new rendering.

Referenced by SettingsViewWidget::dataChanged().

◆ updateNewProject()

void MainWindow::updateNewProject ( )

Call when the whole project was opened or closed.

Referenced by ProjectFilePlugin::openProject(), and ProjectFilePlugin::slotNewProject().

◆ updateRender()

void MainWindow::updateRender ( )

Reset rendered state of cached point data and start new rendering.

Referenced by SettingsViewWidget::dataChanged().

Member Data Documentation

◆ APPLICATION_NAME

const char * MainWindow::APPLICATION_NAME = "3D Forest"
static

Referenced by setWindowTitle().

◆ APPLICATION_VERSION

const char * MainWindow::APPLICATION_VERSION = "1.0"
static

Referenced by HelpPlugin::slotAbout().

◆ editor_

◆ exitAction_

QAction* MainWindow::exitAction_
private

Referenced by MainWindow().

◆ helpPlugin_

HelpPlugin* MainWindow::helpPlugin_
private

Referenced by MainWindow().

◆ ICON_SIZE

◆ ICON_SIZE_TEXT

◆ importFilePlugin_

ImportFileInterface* MainWindow::importFilePlugin_
private

Referenced by importFile(), and loadPlugin().

◆ menuIndex_

QHash<QString, size_t> MainWindow::menuIndex_
private

Referenced by createAction().

◆ menus_

std::vector<MainWindow::Menu> MainWindow::menus_
private

Referenced by createAction(), and createMenu().

◆ plugins_

std::vector<PluginInterface *> MainWindow::plugins_
private

Referenced by loadPlugin().

◆ projectFilePlugin_

ProjectFileInterface* MainWindow::projectFilePlugin_
private

Referenced by closeEvent(), and loadPlugin().

◆ threadRender_

RenderThread MainWindow::threadRender_
private

◆ toolBars_

QHash<QString, QToolBar *> MainWindow::toolBars_
private

Referenced by createMenu(), and hideToolBar().

◆ viewerPlugin_


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