OpenMS
2.7.0
|
Convenience tab bar implementation. More...
#include <OpenMS/VISUAL/EnhancedTabBar.h>
Public Slots | |
void | removeId (int id) |
Remove the tab with identifier id . More... | |
Signals | |
void | currentIdChanged (int id) |
Signal that indicates that the current tab changed, giving the id of the Tab. More... | |
void | closeRequested (int id) |
Signal that indicates that the tab with identifier id is requested to be removed (double click or context menu) More... | |
void | dropOnTab (const QMimeData *data, QWidget *source, int id) |
Signal that is emitted, when a drag-and-drop action ends on a tab. More... | |
void | dropOnWidget (const QMimeData *data, QWidget *source) |
Signal that is emitted, when a drag-and-drop action ends on the unused space on the right side of the tabs. More... | |
Public Member Functions | |
EnhancedTabBar (QWidget *parent=nullptr) | |
Constructor. More... | |
~EnhancedTabBar () override | |
Destructor. More... | |
void | setTabText (const QString &text) |
sets the text of the current tab More... | |
int | addTab (const String &text, int id) |
Adds a new tab with the name text and the identifier id . More... | |
void | show (int id) |
Selects the tab with identifier id . More... | |
Reimplemented Qt events | |
void | mouseDoubleClickEvent (QMouseEvent *e) override |
void | contextMenuEvent (QContextMenuEvent *e) override |
void | dragEnterEvent (QDragEnterEvent *e) override |
void | dropEvent (QDropEvent *e) override |
int | tabAt_ (const QPoint &pos) |
Returns the QTabBar index of the tab at position pos . If there is no tab at that position -1 is returned. More... | |
void | currentChanged_ (int id) |
Slot that translates the currentChanged(int) signal to currentIdChanged(int) More... | |
Convenience tab bar implementation.
This tab bar differs in several ways form the QTabBar:
EnhancedTabBar | ( | QWidget * | parent = nullptr | ) |
Constructor.
|
override |
Destructor.
int addTab | ( | const String & | text, |
int | id | ||
) |
Adds a new tab with the name text
and the identifier id
.
Referenced by TOPPASBase::TOPPASBase(), and TOPPViewBase::TOPPViewBase().
|
signal |
Signal that indicates that the tab with identifier id
is requested to be removed (double click or context menu)
Referenced by TOPPASBase::TOPPASBase(), and TOPPViewBase::TOPPViewBase().
|
overrideprotected |
|
protectedslot |
Slot that translates the currentChanged(int) signal to currentIdChanged(int)
|
signal |
Signal that indicates that the current tab changed, giving the id
of the Tab.
Referenced by TOPPASBase::TOPPASBase(), and TOPPViewBase::TOPPViewBase().
|
overrideprotected |
|
overrideprotected |
|
signal |
Signal that is emitted, when a drag-and-drop action ends on a tab.
Referenced by TOPPViewBase::TOPPViewBase().
|
signal |
Signal that is emitted, when a drag-and-drop action ends on the unused space on the right side of the tabs.
Referenced by TOPPViewBase::TOPPViewBase().
|
overrideprotected |
|
slot |
Remove the tab with identifier id
.
Referenced by TOPPASBase::TOPPASBase(), and TOPPViewBase::TOPPViewBase().
void setTabText | ( | const QString & | text | ) |
sets the text of the current tab
Referenced by TOPPASBase::refreshParameters(), TOPPASBase::saveCurrentPipelineAs(), TOPPASBase::savePipeline(), and TOPPASBase::updateMenu().
void show | ( | int | id | ) |
Selects the tab with identifier id
.
Referenced by TOPPASBase::updateTabBar().
|
protected |
Returns the QTabBar index of the tab at position pos
. If there is no tab at that position -1 is returned.