initial window scaling

This commit is contained in:
Hane 2024-04-12 21:09:04 +02:00
commit 5229154c45
2 changed files with 70 additions and 23 deletions

View file

@ -85,7 +85,7 @@ Q_OBJECT
public:
SessionWidget(uint64_t idx, SessionHandler* sh, QWidget *parent /* = nullptr */);
~SessionWidget();
void setWidth(uint64_t width, double widthRatio);
public slots:
void updateMainVolume(int newValue);
void updateMute(int checked);
@ -98,6 +98,8 @@ private:
QCheckBox *muteButton = nullptr;
SessionHandler* sh;
QTimer* volumePoller = nullptr;
QSpacerItem widthSpacer;
};
class ChannelWidget : public QWidget {
@ -128,8 +130,9 @@ public:
void setIndex(uint64_t idx);
uint64_t getIndex();
void setVolume(int channel, float volume);
//void setVolume(int channel, float volume);
void setWidth(uint64_t width, double widthRatio);
~EndpointWidget();
//void updateMainVolume(float newValue);
//void updateVolume(uint32_t channel, float newValue);
@ -203,7 +206,7 @@ public:
protected:
void closeEvent(QCloseEvent *event) override;
void customEvent(QEvent* ev) override;
QRect setSizePosition(int width, int height);
QRect setSizePosition(QScreen* screen, int width, int height);
QScreen* getCurrentScreen();
private slots:
@ -228,7 +231,8 @@ private:
static constexpr uint64_t ewsUpdateTimerFrequency = 500;
//TODO: Test
//TODO: Come back here and check all are parametrized
uint64_t windowWidth = 600;
double widthRatio = 0.28;
uint64_t width;
QScrollArea *scrollArea;
HeaderWidget* hw;