wip: no endpoint, role rework, visual ratio

This commit is contained in:
Hane 2024-08-14 17:02:57 +02:00
commit d4db24ed7d
12 changed files with 184 additions and 57 deletions

View file

@ -18,7 +18,8 @@ enum CustomQEvent {
EndpointDefaultChange = 1003,
SessionWidgetCreated = 1004,
SessionWidgetObsolete = 1005,
RecomposeMainWindow = 1006
RecomposeMainWindow = 1006,
EndpointRoleChange = 1007
};
template <typename T>
@ -198,7 +199,11 @@ private slots:
private:
//std::vector<EndpointHandler*> *ephs;
void flushRoleChanges();
void changeFrontDefaults(Roles role, std::wstring endpointId);
std::vector<EndpointWidget*> ews;
std::vector<std::pair<Roles, std::wstring>> roleBucketList;
QWidget *widget;
QGridLayout *widgetLayout;
@ -209,6 +214,7 @@ private:
QTimer *ewsUpdateTimer;
static constexpr uint64_t ewsUpdateTimerFrequency = 500;
double widthRatio = 0.28;
double dpr = 1.0;
bool recentlyClosed = false;
uint8_t recentlyClosedTimerFrequency = 1000;
QTimer *recentlyClosedTimer;
@ -218,6 +224,9 @@ private:
QToolBar *mainMenuBar;
QScreen *screen;
QSpacerItem* lastRowSpacer;
QLabel* noEndpoints = nullptr;
QFont font;
friend class EndpointWidget;
//public slots:
// void setEndpointHandlers(std::vector<EndpointHandler*> *ephs);