Skip to content

Commit a7f4fb8

Browse files
authored
Merge pull request #363 from zomfg/feature/led-wizard-tweaks
led wizard tweaks
2 parents 19fe43c + 27c02f1 commit a7f4fb8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1339
-881
lines changed

Software/res/LightpackResources.qrc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@
1515
<file>translations/uk_UA.qm</file>
1616
<file>icons/res_dark.png</file>
1717
<file>icons/res_light.png</file>
18-
<file>buttons/arrow_right_dark_24px.png</file>
19-
<file>buttons/arrow_right_dark_24px_hover.png</file>
20-
<file>buttons/arrow_right_dark_24px_pressed.png</file>
21-
<file>buttons/arrow_right_light_24px.png</file>
22-
<file>buttons/arrow_right_light_24px_hover.png</file>
23-
<file>buttons/arrow_right_light_24px_pressed.png</file>
18+
<file>buttons/settings_24px.png</file>
19+
<file>buttons/settings_dark_24px.png</file>
20+
<file>buttons/settings_dark_24px_hover.png</file>
21+
<file>buttons/settings_dark_24px_pressed.png</file>
22+
<file>buttons/settings_light_24px.png</file>
23+
<file>buttons/settings_light_24px_hover.png</file>
24+
<file>buttons/settings_light_24px_pressed.png</file>
2425
<file>icons/uac-shield.png</file>
2526
<file>icons/arrow_up.png</file>
2627
<file>icons/arrow_down.png</file>
563 Bytes
Loading
580 Bytes
Loading
580 Bytes
Loading
576 Bytes
Loading
563 Bytes
Loading
558 Bytes
Loading
558 Bytes
Loading

Software/src/AbstractLedDevice.hpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include <QtGui>
3030
#include "colorspace_types.h"
3131
#include "types.h"
32-
32+
#include "SettingsDefaults.hpp"
3333
/*!
3434
Abstract class representing any LED device.
3535
\a LedDeviceManager
@@ -101,14 +101,14 @@ public slots:
101101

102102
protected:
103103
QString m_colorSequence;
104-
double m_gamma;
105-
int m_brightness;
106-
int m_brightnessCap;
107-
int m_ledMilliAmps{0};
108-
double m_powerSupplyAmps{0.0};
109-
int m_luminosityThreshold;
110-
bool m_isMinimumLuminosityEnabled;
111-
bool m_isDitheringEnabled;
104+
double m_gamma{ SettingsScope::Profile::Device::GammaDefault };
105+
int m_brightness{ SettingsScope::Profile::Device::BrightnessDefault };
106+
int m_brightnessCap{ SettingsScope::Profile::Device::BrightnessCapDefault };
107+
int m_ledMilliAmps{ SettingsScope::Main::Device::LedMilliAmpsDefault };
108+
double m_powerSupplyAmps{ SettingsScope::Main::Device::PowerSupplyAmpsDefault };
109+
int m_luminosityThreshold{ SettingsScope::Profile::Grab::LuminosityThresholdDefault };
110+
bool m_isMinimumLuminosityEnabled{ SettingsScope::Profile::Grab::IsMinimumLuminosityEnabledDefault };
111+
bool m_isDitheringEnabled{ SettingsScope::Profile::Device::IsDitheringEnabledDefault };
112112

113113
QList<WBAdjustment> m_wbAdjustments;
114114

Software/src/GrabConfigWidget.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,17 @@ GrabConfigWidget::~GrabConfigWidget()
5959
delete ui;
6060
}
6161

62-
void GrabConfigWidget::showConfigFor(QRect widgetGeometry, int buttonCenter)
62+
void GrabConfigWidget::showConfigFor(QRect widgetGeometry, int buttonCenter, const bool showEnable = true, const bool showCoefs = true)
6363
{
64+
ui->checkBox_IsAreaEnabled->setVisible(showEnable);
65+
ui->label_Red->setVisible(showCoefs);
66+
ui->label_Green->setVisible(showCoefs);
67+
ui->label_Blue->setVisible(showCoefs);
68+
ui->spinBox_Red->setVisible(showCoefs);
69+
ui->spinBox_Green->setVisible(showCoefs);
70+
ui->spinBox_Blue->setVisible(showCoefs);
71+
adjustSize();
72+
6473
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
6574
QRect screen = QGuiApplication::screenAt(widgetGeometry.center())->geometry();
6675
#else

0 commit comments

Comments
 (0)