diff options
Diffstat (limited to 'src/cardwidget.h')
-rw-r--r-- | src/cardwidget.h | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/src/cardwidget.h b/src/cardwidget.h index 71f6ebc..7bd87d2 100644 --- a/src/cardwidget.h +++ b/src/cardwidget.h @@ -24,6 +24,23 @@ #include "pavucontrol.h" #include "ui_cardwidget.h" #include <QWidget> +#include <QMap> +#include <QString> +#include <QList> + +struct ProfileEntry { + QByteArray id; + QStringList tokens; + QString getName() const; +}; + +struct ProfileGroup { + QString name; + QList<ProfileEntry> entries; + QString getProfileName(); + void addEntry(const char* id, const char* name); + bool containsProfile(const QByteArray &pro) const; +}; class PortInfo { public: @@ -45,20 +62,20 @@ public: uint32_t index; bool updating; - std::vector< std::pair<QByteArray,QByteArray> > profiles; + + QMap<QString, ProfileGroup> profiles; std::map<QByteArray, PortInfo> ports; QByteArray activeProfile; - QByteArray noInOutProfile; - QByteArray lastActiveProfile; bool hasSinks; bool hasSources; void prepareMenu(); protected: - void changeProfile(const QByteArray & name); + void changeProfile(const QString & name); + void changeProfileFlavor(const QByteArray & id); void onProfileChange(int active); - void onProfileCheck(bool on); + void onProfileFlavorChange(int active); }; |