TTKMusicPlayer
4.1.3.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
|
The class of the function tool box top widget. More...
#include <musicfunctiontoolboxwidget.h>
Signals | |
void | itemIndexChanged (int index) |
void | swapDragItemIndex (int start, int end) |
Public Member Functions | |
MusicFunctionToolBoxTopWidget (int index, const QString &text, QWidget *parent=nullptr) | |
~MusicFunctionToolBoxTopWidget () | |
void | setIndex (int index) |
int | index () const |
bool | isActive () |
void | setExpand (bool expand) |
bool | isExpand () const |
void | setTitle (const QString &text) |
QString | title (bool suffix) |
Protected Member Functions | |
virtual bool | isItemEnabled () const |
virtual void | dragEnterEvent (QDragEnterEvent *event) overridefinal |
virtual void | dragMoveEvent (QDragMoveEvent *event) overridefinal |
virtual void | dragLeaveEvent (QDragLeaveEvent *event) overridefinal |
virtual void | dropEvent (QDropEvent *event) overridefinal |
virtual void | mousePressEvent (QMouseEvent *event) overridefinal |
virtual void | mouseMoveEvent (QMouseEvent *event) overridefinal |
virtual void | paintEvent (QPaintEvent *event) override |
Protected Attributes | |
int | m_index |
QLabel * | m_labelIcon |
QLabel * | m_labelText |
bool | m_isDrawTopState |
bool | m_isDrawMoveState |
bool | m_isBlockMoveExpand |
bool | m_isActive |
QPoint | m_mousePressedAt |
The class of the function tool box top widget.
Definition at line 30 of file musicfunctiontoolboxwidget.h.
|
explicit |
Object constructor.
Definition at line 12 of file musicfunctiontoolboxwidget.cpp.
References TTK::Bold, TTK::UI::ColorStyle02, m_labelIcon, m_labelText, and TTK::Widget::setFontStyle().
MusicFunctionToolBoxTopWidget::~MusicFunctionToolBoxTopWidget | ( | ) |
Object destructor.
Definition at line 42 of file musicfunctiontoolboxwidget.cpp.
References m_labelIcon, and m_labelText.
|
finaloverrideprotectedvirtual |
Override the widget event.
Definition at line 97 of file musicfunctiontoolboxwidget.cpp.
References DRAG_FORMAT.
|
finaloverrideprotectedvirtual |
Definition at line 120 of file musicfunctiontoolboxwidget.cpp.
References m_isDrawMoveState, and m_isDrawTopState.
|
finaloverrideprotectedvirtual |
Definition at line 110 of file musicfunctiontoolboxwidget.cpp.
References DRAG_FORMAT, isItemEnabled(), m_isDrawMoveState, and m_isDrawTopState.
|
finaloverrideprotectedvirtual |
Definition at line 128 of file musicfunctiontoolboxwidget.cpp.
References DRAG_FORMAT, isItemEnabled(), m_index, m_isDrawMoveState, and swapDragItemIndex().
|
inline |
Get index.
Definition at line 51 of file musicfunctiontoolboxwidget.h.
Referenced by MusicSongsContainerWidget::setItemTitle(), setTitle(), and title().
bool MusicFunctionToolBoxTopWidget::isActive | ( | ) |
Get active.
Definition at line 48 of file musicfunctiontoolboxwidget.cpp.
References m_isActive.
Referenced by MusicFunctionToolBoxWidgetItem::isActive().
bool MusicFunctionToolBoxTopWidget::isExpand | ( | ) | const |
Get expand.
Definition at line 60 of file musicfunctiontoolboxwidget.cpp.
References m_labelIcon, and QtLablePixmap.
Referenced by mouseMoveEvent().
|
protectedvirtual |
Check the item is enable or not.
Reimplemented in MusicSongsToolBoxTopWidget.
Definition at line 92 of file musicfunctiontoolboxwidget.cpp.
Referenced by dragMoveEvent(), dropEvent(), and mouseMoveEvent().
|
signal |
Current top widget is pressed.
Referenced by mouseMoveEvent(), and mousePressEvent().
|
finaloverrideprotectedvirtual |
Definition at line 149 of file musicfunctiontoolboxwidget.cpp.
References DRAG_FORMAT, TTKDesktopWrapper::grabWidget(), isExpand(), isItemEnabled(), itemIndexChanged(), m_index, m_isBlockMoveExpand, m_mousePressedAt, and title().
|
finaloverrideprotectedvirtual |
Definition at line 139 of file musicfunctiontoolboxwidget.cpp.
References itemIndexChanged(), m_index, and m_mousePressedAt.
|
overrideprotectedvirtual |
Reimplemented in MusicSongsToolBoxMaskWidget, and MusicSongsToolBoxTopWidget.
Definition at line 172 of file musicfunctiontoolboxwidget.cpp.
References m_isDrawMoveState, and m_isDrawTopState.
Referenced by MusicSongsToolBoxTopWidget::paintEvent().
void MusicFunctionToolBoxTopWidget::setExpand | ( | bool | expand | ) |
Set expand.
Definition at line 55 of file musicfunctiontoolboxwidget.cpp.
References m_labelIcon.
Referenced by MusicFunctionToolBoxWidgetItem::setExpand(), and MusicSongsContainerWidget::sliderValueChanaged().
|
inline |
Set index.
Definition at line 47 of file musicfunctiontoolboxwidget.h.
Referenced by MusicSongsContainerWidget::sliderValueChanaged().
void MusicFunctionToolBoxTopWidget::setTitle | ( | const QString & | text | ) |
Set top label title.
Definition at line 66 of file musicfunctiontoolboxwidget.cpp.
References TTK::Widget::elidedText(), TTK::Widget::elidedTitleText(), index(), m_labelText, and RENAME_WIDTH.
Referenced by MusicSongsContainerWidget::setItemTitle(), MusicFunctionToolBoxWidgetItem::setTitle(), and MusicSongsContainerWidget::sliderValueChanaged().
Swap the item index by drag adn drop.
Referenced by dropEvent().
QString MusicFunctionToolBoxTopWidget::title | ( | bool | suffix | ) |
Get top label title.
Definition at line 81 of file musicfunctiontoolboxwidget.cpp.
References index(), and m_labelText.
Referenced by MusicSongsToolBoxTopWidget::changRowItemNameChanged(), and mouseMoveEvent().
|
protected |
Definition at line 102 of file musicfunctiontoolboxwidget.h.
Referenced by MusicSongsToolBoxTopWidget::addNewDirChanged(), MusicSongsToolBoxTopWidget::addNewFilesChanged(), MusicSongsToolBoxTopWidget::addToPlayedList(), MusicSongsToolBoxTopWidget::addToPlayLater(), MusicSongsToolBoxTopWidget::changItemName(), MusicSongsToolBoxTopWidget::deleteAllItemsChanged(), MusicSongsToolBoxTopWidget::deleteRowItemChanged(), dropEvent(), MusicSongsToolBoxTopWidget::exportSongsItem(), MusicSongsToolBoxTopWidget::isItemEnabled(), mouseMoveEvent(), mousePressEvent(), MusicSongsToolBoxTopWidget::paintEvent(), MusicSongsToolBoxTopWidget::showMenu(), and MusicSongsToolBoxTopWidget::songListSortBy().
|
protected |
Definition at line 106 of file musicfunctiontoolboxwidget.h.
Referenced by isActive(), and MusicSongsToolBoxTopWidget::paintEvent().
|
protected |
Definition at line 106 of file musicfunctiontoolboxwidget.h.
Referenced by mouseMoveEvent().
|
protected |
Definition at line 105 of file musicfunctiontoolboxwidget.h.
Referenced by dragLeaveEvent(), dragMoveEvent(), dropEvent(), and paintEvent().
|
protected |
Definition at line 105 of file musicfunctiontoolboxwidget.h.
Referenced by dragLeaveEvent(), dragMoveEvent(), and paintEvent().
|
protected |
Definition at line 103 of file musicfunctiontoolboxwidget.h.
Referenced by MusicSongsToolBoxTopWidget::changRowItemNameChanged(), isExpand(), MusicFunctionToolBoxTopWidget(), setExpand(), and ~MusicFunctionToolBoxTopWidget().
|
protected |
Definition at line 103 of file musicfunctiontoolboxwidget.h.
Referenced by MusicFunctionToolBoxTopWidget(), setTitle(), title(), and ~MusicFunctionToolBoxTopWidget().
|
protected |
Definition at line 107 of file musicfunctiontoolboxwidget.h.
Referenced by mouseMoveEvent(), and mousePressEvent().