TTKMusicPlayer
4.1.3.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
TTKModule
TTKCore
musicUtilsKits
musicwidgetutils.h
Go to the documentation of this file.
1
#ifndef MUSICWIDGETUTILS_H
2
#define MUSICWIDGETUTILS_H
3
4
/***************************************************************************
5
* This file is part of the TTK Music Player project
6
* Copyright (C) 2015 - 2025 Greedysky Studio
7
8
* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 3 of the License, or
11
* (at your option) any later version.
12
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
17
18
* You should have received a copy of the GNU General Public License along
19
* with this program; If not, see <http://www.gnu.org/licenses/>.
20
***************************************************************************/
21
22
#include <QPainter>
23
#include "
musicuiobject.h
"
24
#include "
musicglobaldefine.h
"
25
26
class
QMenu;
27
class
QComboBox;
28
32
namespace
TTK
33
{
34
namespace
Widget
35
{
39
TTK_MODULE_EXPORT
void
setFontSize
(QWidget *widget,
int
size
);
43
TTK_MODULE_EXPORT
void
setFontStyle
(QWidget *widget,
TTK::FontStyleMode
type);
44
48
TTK_MODULE_EXPORT
QString
elidedText
(
const
QFont &font,
const
QString &text, Qt::TextElideMode
mode
,
int
width);
52
TTK_MODULE_EXPORT
QString
elidedTitleText
(
const
QFont &font,
const
QString &text,
int
width);
53
57
TTK_MODULE_EXPORT
int
fontTextWidth
(
const
QFont &font,
const
QString &text);
61
TTK_MODULE_EXPORT
int
fontTextHeight
(
const
QFont &font);
62
66
TTK_MODULE_EXPORT
void
adjustMenuPosition
(QMenu *menu);
70
TTK_MODULE_EXPORT
void
adjustWidgetPosition
(QWidget *widget);
71
75
TTK_MODULE_EXPORT
void
setTransparent
(QWidget *widget,
int
alpha
);
79
TTK_MODULE_EXPORT
void
setTransparent
(QWidget *widget,
const
QColor &color);
80
84
TTK_MODULE_EXPORT
void
setComboBoxText
(QComboBox *widget,
const
QString &text);
88
TTK_MODULE_EXPORT
void
widgetToRound
(QWidget *widget,
int
ratioX,
int
ratioY);
89
93
TTK_MODULE_EXPORT
void
generateComboBoxStyle
(QComboBox *widget,
const
QString &style = {});
97
TTK_MODULE_EXPORT
void
generateVScrollAreaStyle
(QWidget *widget, QWidget *parent,
bool
background =
true
);
101
TTK_MODULE_EXPORT
void
generateHScrollAreaStyle
(QWidget *widget, QWidget *parent,
bool
background =
true
);
102
103
}
104
}
105
106
#endif // MUSICWIDGETUTILS_H
TTK_MODULE_EXPORT
#define TTK_MODULE_EXPORT
Definition:
ttkmoduleexport.h:27
TTK::Widget::generateHScrollAreaStyle
TTK_MODULE_EXPORT void generateHScrollAreaStyle(QWidget *widget, QWidget *parent, bool background=true)
Definition:
musicwidgetutils.cpp:143
musicuiobject.h
TTK::Widget::generateComboBoxStyle
TTK_MODULE_EXPORT void generateComboBoxStyle(QComboBox *widget, const QString &style={})
Definition:
musicwidgetutils.cpp:119
size
voidpf void uLong size
Definition:
ioapi.h:136
TTK::Widget::setComboBoxText
TTK_MODULE_EXPORT void setComboBoxText(QComboBox *widget, const QString &text)
Definition:
musicwidgetutils.cpp:98
TTK::Widget::setFontStyle
TTK_MODULE_EXPORT void setFontStyle(QWidget *widget, TTK::FontStyleMode type)
Definition:
musicwidgetutils.cpp:17
TTK::Widget::setFontSize
TTK_MODULE_EXPORT void setFontSize(QWidget *widget, int size)
Definition:
musicwidgetutils.cpp:10
TTK
The namespace of the process utils.
Definition:
ttkcompat.h:24
TTK::FontStyleMode
FontStyleMode
Definition:
musicobject.h:182
TTK::Widget::setTransparent
TTK_MODULE_EXPORT void setTransparent(QWidget *widget, int alpha)
Definition:
musicwidgetutils.cpp:84
TTK::Widget::adjustWidgetPosition
TTK_MODULE_EXPORT void adjustWidgetPosition(QWidget *widget)
Definition:
musicwidgetutils.cpp:78
TTK::Widget::elidedText
TTK_MODULE_EXPORT QString elidedText(const QFont &font, const QString &text, Qt::TextElideMode mode, int width)
Definition:
musicwidgetutils.cpp:34
TTK::Widget::generateVScrollAreaStyle
TTK_MODULE_EXPORT void generateVScrollAreaStyle(QWidget *widget, QWidget *parent, bool background=true)
Definition:
musicwidgetutils.cpp:126
musicglobaldefine.h
TTK::Widget::fontTextWidth
TTK_MODULE_EXPORT int fontTextWidth(const QFont &font, const QString &text)
Definition:
musicwidgetutils.cpp:49
TTK::Widget::elidedTitleText
TTK_MODULE_EXPORT QString elidedTitleText(const QFont &font, const QString &text, int width)
Definition:
musicwidgetutils.cpp:40
alpha
static unsigned char alpha[symbols+1]
Definition:
rsecc.c:50
mode
const char int mode
Definition:
ioapi.h:135
TTK::Widget::widgetToRound
TTK_MODULE_EXPORT void widgetToRound(QWidget *widget, int ratioX, int ratioY)
Definition:
musicwidgetutils.cpp:114
TTK::Widget::fontTextHeight
TTK_MODULE_EXPORT int fontTextHeight(const QFont &font)
Definition:
musicwidgetutils.cpp:55
TTK::Widget::adjustMenuPosition
TTK_MODULE_EXPORT void adjustMenuPosition(QMenu *menu)
Definition:
musicwidgetutils.cpp:61
Generated on Tue Jan 21 2025 21:07:13 for TTKMusicPlayer by
1.8.8