mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-08 09:03:57 -07:00
* [VDD] Reorder quick filters Took 1 hour 10 minutes Took 5 seconds Took 49 seconds * [VDD] Use Font Awesome Icons Took 49 minutes Took 5 seconds * [VDD] Shuffle some widgets around, label things. Took 31 minutes Took 5 seconds * Change buttons to be push rather than toggle. Took 17 minutes Took 9 seconds * Reduce margins, retranslate button texts. Took 15 minutes Took 9 seconds * Actually do it, don't commit the commented out testing version lol Took 3 minutes * Start sets in include, correct subtype include/exact match logic. Took 12 minutes * Block sync. Took 16 minutes Took 8 seconds --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
42 lines
868 B
C++
42 lines
868 B
C++
/**
|
|
* @file settings_button_widget.h
|
|
* @ingroup Widgets
|
|
* @ingroup Settings
|
|
* @brief TODO: Document this.
|
|
*/
|
|
|
|
#ifndef SETTINGS_BUTTON_WIDGET_H
|
|
#define SETTINGS_BUTTON_WIDGET_H
|
|
|
|
#include "settings_popup_widget.h"
|
|
|
|
#include <QToolButton>
|
|
#include <QWidget>
|
|
|
|
class SettingsButtonWidget : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit SettingsButtonWidget(QWidget *parent = nullptr);
|
|
void addSettingsWidget(QWidget *toAdd) const;
|
|
void removeSettingsWidget(QWidget *toRemove) const;
|
|
void setButtonIcon(QPixmap iconMap);
|
|
void setButtonText(const QString &buttonText);
|
|
|
|
protected:
|
|
void mousePressEvent(QMouseEvent *event) override;
|
|
|
|
private slots:
|
|
void togglePopup();
|
|
void onPopupClosed() const;
|
|
|
|
private:
|
|
QHBoxLayout *layout;
|
|
QToolButton *button;
|
|
|
|
public:
|
|
SettingsPopupWidget *popup;
|
|
};
|
|
|
|
#endif // SETTINGS_BUTTON_WIDGET_H
|