Reimplementation of Light source dialog (#15877)

* Reimplementation of Light source dialog

Closes #15793.

* Gui: Remove redundant void arguments

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
This commit is contained in:
xtemp09
2024-08-23 06:58:14 +07:00
committed by GitHub
parent 05c90f398a
commit ebf02483af
3 changed files with 493 additions and 95 deletions

View File

@@ -27,6 +27,7 @@
#include <Gui/PropertyPage.h>
#include <memory>
#include <QPointer>
class SoDragger;
class SoDirectionalLightDragger;
@@ -47,29 +48,32 @@ class DlgSettingsLightSources : public PreferencePage
public:
explicit DlgSettingsLightSources(QWidget* parent = nullptr);
~DlgSettingsLightSources() override;
~DlgSettingsLightSources() override = default;
void saveSettings() override;
void loadSettings() override;
void resetSettingsToDefaults() override;
protected:
void changeEvent(QEvent* event) override;
void showEvent(QShowEvent* event) override;
private:
void setupConnection();
public Q_SLOTS:
void updateDraggerQS ();
void updateDraggerXYZ();
void toggleLight(bool on);
void lightIntensity(int value);
void lightColor();
protected:
void changeEvent(QEvent* event) override;
private:
void saveDirection();
void loadDirection();
QWidget* createViewer(QWidget* parent);
void createViewer();
SoDirectionalLightDragger* createDragger();
static void dragMotionCallback(void *data, SoDragger *drag);
private:
std::unique_ptr<Ui_DlgSettingsLightSources> ui;
View3DInventorViewer* view = nullptr;
QPointer <View3DInventorViewer> view;
SoDirectionalLightDragger* lightDragger = nullptr;
};