aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/widgets/WideBar.h
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2022-11-19 17:10:43 -0300
committerflow <flowlnlnln@gmail.com>2022-11-19 18:41:31 -0300
commit479843f56b42d7044d3d02278a9cabc2c24e147a (patch)
tree7708248fd85b03ef2b129b7df8292836d9127625 /launcher/ui/widgets/WideBar.h
parent6e1639551bbe98b32e9abef2d816e8abe01789e4 (diff)
downloadPrismLauncher-479843f56b42d7044d3d02278a9cabc2c24e147a.tar.gz
PrismLauncher-479843f56b42d7044d3d02278a9cabc2c24e147a.tar.bz2
PrismLauncher-479843f56b42d7044d3d02278a9cabc2c24e147a.zip
feat(WideBar): allow loading/unloading visibility via a byte array
I really wanted to use a QBitArray :c Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher/ui/widgets/WideBar.h')
-rw-r--r--launcher/ui/widgets/WideBar.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/launcher/ui/widgets/WideBar.h b/launcher/ui/widgets/WideBar.h
index 8421eaf4..0d60f8a4 100644
--- a/launcher/ui/widgets/WideBar.h
+++ b/launcher/ui/widgets/WideBar.h
@@ -26,6 +26,12 @@ class WideBar : public QToolBar {
QMenu* createContextMenu(QWidget* parent = nullptr, const QString& title = QString());
void contextMenuEvent(QContextMenuEvent*) override;
+ // Ideally we would use a QBitArray for this, but it doesn't support string conversion,
+ // so using it in settings is very messy.
+
+ [[nodiscard]] QByteArray getVisibilityState() const;
+ void setVisibilityState(QByteArray&&);
+
private:
struct BarEntry {
enum class Type { None, Action, Separator, Spacer } type = Type::None;