-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
556 additions
and
269 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#ifndef MENUWIDGET_H | ||
#define MENUWIDGET_H | ||
|
||
#include <QWidget> | ||
#include "compositewidget.h" | ||
#include "menuheader.h" | ||
#include <QSpacerItem> | ||
#include <QVBoxLayout> | ||
#include <QMap> | ||
#include <scopy-gui_export.h> | ||
|
||
namespace scopy { | ||
namespace gui { | ||
class SCOPY_GUI_EXPORT MenuWidget : public QWidget, public CompositeWidget { | ||
Q_OBJECT | ||
public: | ||
|
||
enum MenuAlignment | ||
{ | ||
MA_TOPFIRST, | ||
MA_TOPLAST, | ||
MA_BOTTOMFIRST, | ||
MA_BOTTOMLAST | ||
}; | ||
|
||
MenuWidget(QString name, QPen p, QWidget *parent); | ||
~MenuWidget(); | ||
|
||
void add(QWidget *, QString name, MenuAlignment position); | ||
void add(QWidget *) override; | ||
void remove(QWidget *) override; | ||
void add(QWidget *, QString name); | ||
void remove(QString); | ||
MenuHeaderWidget* header(); | ||
|
||
QWidget* findWidget(QString name); | ||
QString widgetName(QWidget*); | ||
|
||
void collapseAll(); | ||
void setCollapsed(QString name, bool b); | ||
|
||
private: | ||
QMap<QString, QWidget*> m_widgetMap; | ||
QSpacerItem *m_spacer; | ||
QVBoxLayout *m_layScroll; | ||
MenuHeaderWidget *m_header; | ||
int uuid; | ||
|
||
}; | ||
} | ||
|
||
} | ||
|
||
#endif // MENUWIDGET_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.