提交 7efefffb 编写于 作者: 花狗Fdog's avatar 花狗Fdog

实现了添加音乐,并拖动进度条

上级 d203167a
......@@ -35,3 +35,5 @@ FORMS += \
RESOURCES += \
lib.qrc
QT += multimedia
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.5.0, 2020-08-05T10:52:06. -->
<!-- Written by QtCreator 4.5.0, 2020-08-05T21:02:22. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
......@@ -44,7 +44,7 @@
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
<value type="int" key="EditorConfiguration.TabSize">8</value>
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
<value type="bool" key="EditorConfiguration.UseGlobal">false</value>
<value type="int" key="EditorConfiguration.Utf8BomBehavior">0</value>
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
......@@ -54,7 +54,9 @@
</data>
<data>
<variable>ProjectExplorer.Project.PluginSettings</variable>
<valuemap type="QVariantMap"/>
<valuemap type="QVariantMap">
<valuelist type="QVariantList" key="ClangStaticAnalyzer.SuppressedDiagnostics"/>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
......
......@@ -237,7 +237,9 @@ Makefile: FdogMusicPlayer.pro ..\..\QT\5.10.0\msvc2015_64\mkspecs\win32-msvc\qma
FdogMusicPlayer.pro \
..\..\QT\5.10.0\msvc2015_64\lib\qtmaind.prl \
..\..\QT\5.10.0\msvc2015_64\lib\Qt5Widgets.prl \
..\..\QT\5.10.0\msvc2015_64\lib\Qt5Multimedia.prl \
..\..\QT\5.10.0\msvc2015_64\lib\Qt5Gui.prl \
..\..\QT\5.10.0\msvc2015_64\lib\Qt5Network.prl \
..\..\QT\5.10.0\msvc2015_64\lib\Qt5Core.prl
$(QMAKE) -o Makefile FdogMusicPlayer.pro -spec win32-msvc "CONFIG+=debug" "CONFIG+=qml_debug"
..\..\QT\5.10.0\msvc2015_64\mkspecs\features\spec_pre.prf:
......@@ -402,7 +404,9 @@ Makefile: FdogMusicPlayer.pro ..\..\QT\5.10.0\msvc2015_64\mkspecs\win32-msvc\qma
FdogMusicPlayer.pro:
..\..\QT\5.10.0\msvc2015_64\lib\qtmaind.prl:
..\..\QT\5.10.0\msvc2015_64\lib\Qt5Widgets.prl:
..\..\QT\5.10.0\msvc2015_64\lib\Qt5Multimedia.prl:
..\..\QT\5.10.0\msvc2015_64\lib\Qt5Gui.prl:
..\..\QT\5.10.0\msvc2015_64\lib\Qt5Network.prl:
..\..\QT\5.10.0\msvc2015_64\lib\Qt5Core.prl:
qmake: FORCE
@$(QMAKE) -o Makefile FdogMusicPlayer.pro -spec win32-msvc "CONFIG+=debug" "CONFIG+=qml_debug"
......
此差异已折叠。
此差异已折叠。
# FdogMusicPlayer
基于Qt的音乐播放器
第一次提交:
创建项目
第二次提交:
完成了基础皮肤
第三次提交:
完成基础的添加音乐 音乐时间显示 可调节进度条
\ No newline at end of file
无法预览此类型文件
......@@ -21,8 +21,8 @@ QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_MainWindow_t {
QByteArrayData data[1];
char stringdata0[11];
QByteArrayData data[13];
char stringdata0[186];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
......@@ -31,10 +31,26 @@ struct qt_meta_stringdata_MainWindow_t {
)
static const qt_meta_stringdata_MainWindow_t qt_meta_stringdata_MainWindow = {
{
QT_MOC_LITERAL(0, 0, 10) // "MainWindow"
QT_MOC_LITERAL(0, 0, 10), // "MainWindow"
QT_MOC_LITERAL(1, 11, 21), // "on_pushButton_clicked"
QT_MOC_LITERAL(2, 33, 0), // ""
QT_MOC_LITERAL(3, 34, 14), // "onStateChanged"
QT_MOC_LITERAL(4, 49, 19), // "QMediaPlayer::State"
QT_MOC_LITERAL(5, 69, 5), // "state"
QT_MOC_LITERAL(6, 75, 17), // "onPlaylistChanged"
QT_MOC_LITERAL(7, 93, 8), // "position"
QT_MOC_LITERAL(8, 102, 17), // "onDurationChanged"
QT_MOC_LITERAL(9, 120, 8), // "duration"
QT_MOC_LITERAL(10, 129, 17), // "onPositionChanged"
QT_MOC_LITERAL(11, 147, 32), // "on_horizontalSlider_valueChanged"
QT_MOC_LITERAL(12, 180, 5) // "value"
},
"MainWindow"
"MainWindow\0on_pushButton_clicked\0\0"
"onStateChanged\0QMediaPlayer::State\0"
"state\0onPlaylistChanged\0position\0"
"onDurationChanged\0duration\0onPositionChanged\0"
"on_horizontalSlider_valueChanged\0value"
};
#undef QT_MOC_LITERAL
......@@ -44,22 +60,58 @@ static const uint qt_meta_data_MainWindow[] = {
7, // revision
0, // classname
0, 0, // classinfo
0, 0, // methods
6, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount
// slots: name, argc, parameters, tag, flags
1, 0, 44, 2, 0x08 /* Private */,
3, 1, 45, 2, 0x08 /* Private */,
6, 1, 48, 2, 0x08 /* Private */,
8, 1, 51, 2, 0x08 /* Private */,
10, 1, 54, 2, 0x08 /* Private */,
11, 1, 57, 2, 0x08 /* Private */,
// slots: parameters
QMetaType::Void,
QMetaType::Void, 0x80000000 | 4, 5,
QMetaType::Void, QMetaType::Int, 7,
QMetaType::Void, QMetaType::LongLong, 9,
QMetaType::Void, QMetaType::LongLong, 7,
QMetaType::Void, QMetaType::Int, 12,
0 // eod
};
void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
Q_UNUSED(_o);
Q_UNUSED(_id);
Q_UNUSED(_c);
Q_UNUSED(_a);
if (_c == QMetaObject::InvokeMetaMethod) {
MainWindow *_t = static_cast<MainWindow *>(_o);
Q_UNUSED(_t)
switch (_id) {
case 0: _t->on_pushButton_clicked(); break;
case 1: _t->onStateChanged((*reinterpret_cast< QMediaPlayer::State(*)>(_a[1]))); break;
case 2: _t->onPlaylistChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
case 3: _t->onDurationChanged((*reinterpret_cast< qint64(*)>(_a[1]))); break;
case 4: _t->onPositionChanged((*reinterpret_cast< qint64(*)>(_a[1]))); break;
case 5: _t->on_horizontalSlider_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
default: ;
}
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
switch (_id) {
default: *reinterpret_cast<int*>(_a[0]) = -1; break;
case 1:
switch (*reinterpret_cast<int*>(_a[1])) {
default: *reinterpret_cast<int*>(_a[0]) = -1; break;
case 0:
*reinterpret_cast<int*>(_a[0]) = qRegisterMetaType< QMediaPlayer::State >(); break;
}
break;
}
}
}
const QMetaObject MainWindow::staticMetaObject = {
......@@ -84,6 +136,17 @@ void *MainWindow::qt_metacast(const char *_clname)
int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QMainWindow::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 6)
qt_static_metacall(this, _c, _id, _a);
_id -= 6;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 6)
qt_static_metacall(this, _c, _id, _a);
_id -= 6;
}
return _id;
}
QT_WARNING_POP
......
此差异已折叠。
无法预览此类型文件
......@@ -7,6 +7,10 @@
<file>lib/zanting.png</file>
<file>lib/zuidahua.png</file>
<file>lib/zuixiao.png</file>
<file>lib/关 闭.png</file>
<file>lib/shengyin.png</file>
<file>lib/xunhuan.png</file>
<file>lib/guanbi.png</file>
<file>lib/timg.jpg</file>
<file>lib/timg2.png</file>
</qresource>
</RCC>
#include "mainwindow.h"
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include<QtMultimedia/QMediaPlayer>
#include<QtMultimedia/QMediaPlaylist>
#include<QFileDialog>
#include<QDir>
#include<QPoint>
#if _MSC_VER >= 1600
#pragma execution_character_set("utf-8")
#endif
bool m_bIsWindowMoveable = false;
QPoint m_point;
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
this->setWindowFlags(Qt::FramelessWindowHint);//去掉标题栏
player = new QMediaPlayer(this);
playlist = new QMediaPlaylist(this);
playlist->setPlaybackMode(QMediaPlaylist::Loop);
player->setPlaylist(playlist);
connect(player,SIGNAL(stateChanged(QMediaPlayer::State)),
this,SLOT(onStateChanged(QMediaPlayer::State)));
connect(player,SIGNAL(positionChanged(qint64)),
this,SLOT(onPositionChanged(qint64)));
connect(player,SIGNAL(durationChanged(qint64)),
this,SLOT(onDurationChanged(qint64)));
connect(playlist,SIGNAL(currentIndexChanged(int)),
this,SLOT(onPlaylistChanged(int)));
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::mousePressEvent(QMouseEvent *event)
{
if (event->button() == Qt::LeftButton)
{
m_bIsWindowMoveable = true;
m_point = event->pos();
}
}
void MainWindow::mouseMoveEvent(QMouseEvent *event)
{
if (m_bIsWindowMoveable)
{
move(event->pos() - m_point + pos());
// int dx = event->globalX()-m_point.x();
// int dy = event->globalY()-m_point.y();
// m_point = event->globalPos();
// move(x()+dx,y()+dy);
}
}
void MainWindow::mouseReleaseEvent(QMouseEvent *event)
{
Q_UNUSED(event);
m_bIsWindowMoveable = false;
}
void MainWindow::on_pushButton_clicked()
{
QString curPash =QDir::currentPath();
QString dlgTitle="选择音频文件";
QString filter="音频文件(*.mp3 *.wav *.wma)mp3文件(*.mp3);;wav文件(*.wav);;wma文件(*.wma);;所有文件(*.*)";
QStringList fileList = QFileDialog::getOpenFileNames(this,dlgTitle,curPash,filter);
if(fileList.count()<1)
return;
for(int i = 0;i<fileList.count();i++)
{
QString aFile = fileList.at(i);
playlist->addMedia(QUrl::fromLocalFile(aFile));
QFileInfo fileInfo(aFile);
ui->listWidget->addItem(fileInfo.fileName());
ui->plainTextEdit->appendPlainText(fileList.at(i));
}
if(player->state()!=QMediaPlayer::PlayingState)
{
playlist->setCurrentIndex(0);
}
player->play();
}
void MainWindow::onStateChanged(QMediaPlayer::State state)
{
}
void MainWindow::onPlaylistChanged(int position)
{
}
void MainWindow::onDurationChanged(qint64 duration)
{
ui->horizontalSlider->setMaximum(duration);
int secs = duration/1000;
int mins = secs/60;
secs = secs % 60;
durationTime = QString::asprintf("%d:%d",mins,secs);
ui->label->setText(positionTime+"/"+durationTime);
}
void MainWindow::onPositionChanged(qint64 position)
{
if(ui->horizontalSlider->isSliderDown())
return;
ui->horizontalSlider->setSliderPosition(position);
int secs = position/1000;
int mins = secs/60;
secs = secs % 60;
positionTime = QString::asprintf("%d:%d",mins,secs);
ui->label->setText(positionTime+"/"+durationTime);
}
void MainWindow::on_horizontalSlider_valueChanged(int value)
{
player->setPosition(value);
}
#ifndef MAINWINDOW_H
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include<QtMultimedia/QMediaPlayer>
#include<QtMultimedia/QMediaPlaylist>
namespace Ui {
class MainWindow;
}
......@@ -10,11 +10,28 @@ class MainWindow;
class MainWindow : public QMainWindow
{
Q_OBJECT
private:
QMediaPlayer * player;
QMediaPlaylist * playlist;
QString durationTime;
QString positionTime;
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
private slots:
void on_pushButton_clicked();
void onStateChanged(QMediaPlayer::State state);
void onPlaylistChanged(int position);
void onDurationChanged(qint64 duration);
void onPositionChanged(qint64 position);
void on_horizontalSlider_valueChanged(int value);
private:
Ui::MainWindow *ui;
};
......
......@@ -6,19 +6,23 @@
<rect>
<x>0</x>
<y>0</y>
<width>413</width>
<height>681</height>
<width>405</width>
<height>435</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
<string>旭听音乐</string>
</property>
<property name="windowIcon">
<iconset resource="lib.qrc">
<normaloff>:/lib/timg2.png</normaloff>:/lib/timg2.png</iconset>
</property>
<widget class="QWidget" name="centralWidget">
<widget class="QFrame" name="frame_3">
<property name="geometry">
<rect>
<x>10</x>
<y>519</y>
<x>6</x>
<y>280</y>
<width>391</width>
<height>151</height>
</rect>
......@@ -51,28 +55,6 @@
<enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label_2">
<property name="minimumSize">
<size>
<width>30</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>30</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>0:00</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSlider" name="horizontalSlider">
<property name="enabled">
......@@ -93,7 +75,7 @@
<widget class="QLabel" name="label">
<property name="minimumSize">
<size>
<width>30</width>
<width>83</width>
<height>0</height>
</size>
</property>
......@@ -146,8 +128,8 @@
<widget class="QPushButton" name="pushButton_1">
<property name="minimumSize">
<size>
<width>50</width>
<height>50</height>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="styleSheet">
......@@ -165,7 +147,7 @@
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<width>30</width>
<height>20</height>
</size>
</property>
......@@ -175,8 +157,8 @@
<widget class="QPushButton" name="pushButton_2">
<property name="minimumSize">
<size>
<width>60</width>
<height>60</height>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="styleSheet">
......@@ -194,7 +176,7 @@
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<width>30</width>
<height>20</height>
</size>
</property>
......@@ -204,8 +186,8 @@
<widget class="QPushButton" name="pushButton_3">
<property name="minimumSize">
<size>
<width>50</width>
<height>50</height>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="styleSheet">
......@@ -229,6 +211,54 @@
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_4">
<property name="minimumSize">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/lib/xunhuan.png);</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_7">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>9</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_5">
<property name="minimumSize">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/lib/shengyin.png);</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
......@@ -317,7 +347,7 @@
</size>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/lib/关 闭.png);</string>
<string notr="true">border-image: url(:/lib/guanbi.png);</string>
</property>
<property name="text">
<string/>
......@@ -329,10 +359,10 @@
<widget class="QPlainTextEdit" name="plainTextEdit">
<property name="geometry">
<rect>
<x>33</x>
<x>11</x>
<y>60</y>
<width>341</width>
<height>441</height>
<width>381</width>
<height>71</height>
</rect>
</property>
</widget>
......@@ -365,6 +395,51 @@
<string/>
</property>
</widget>
<widget class="QListWidget" name="listWidget">
<property name="geometry">
<rect>
<x>11</x>
<y>160</y>
<width>381</width>
<height>61</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_4">
<property name="geometry">
<rect>
<x>2</x>
<y>-1</y>
<width>36</width>
<height>31</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/lib/timg2.png);</string>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QLabel" name="label_5">
<property name="geometry">
<rect>
<x>39</x>
<y>4</y>
<width>61</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>旭听音乐</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<zorder>label_3</zorder>
<zorder>horizontalSpacer</zorder>
<zorder>frame_3</zorder>
......@@ -372,9 +447,31 @@
<zorder>horizontalSpacer_6</zorder>
<zorder>plainTextEdit</zorder>
<zorder>pushButton</zorder>
<zorder>listWidget</zorder>
<zorder>label_4</zorder>
<zorder>label_5</zorder>
</widget>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources/>
<connections/>
<resources>
<include location="lib.qrc"/>
</resources>
<connections>
<connection>
<sender>toolButton_4</sender>
<signal>clicked()</signal>
<receiver>MainWindow</receiver>
<slot>close()</slot>
<hints>
<hint type="sourcelabel">
<x>392</x>
<y>13</y>
</hint>
<hint type="destinationlabel">
<x>206</x>
<y>217</y>
</hint>
</hints>
</connection>
</connections>
</ui>
......@@ -17,6 +17,7 @@
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QHeaderView>
#include <QtWidgets/QLabel>
#include <QtWidgets/QListWidget>
#include <QtWidgets/QMainWindow>
#include <QtWidgets/QPlainTextEdit>
#include <QtWidgets/QPushButton>
......@@ -34,7 +35,6 @@ public:
QFrame *frame_3;
QFrame *frame;
QHBoxLayout *horizontalLayout;
QLabel *label_2;
QSlider *horizontalSlider;
QLabel *label;
QFrame *frame_2;
......@@ -46,6 +46,9 @@ public:
QSpacerItem *horizontalSpacer_3;
QPushButton *pushButton_3;
QSpacerItem *horizontalSpacer_5;
QPushButton *pushButton_4;
QSpacerItem *horizontalSpacer_7;
QPushButton *pushButton_5;
QFrame *frame_4;
QHBoxLayout *horizontalLayout_4;
QToolButton *toolButton_1;
......@@ -55,17 +58,23 @@ public:
QPlainTextEdit *plainTextEdit;
QPushButton *pushButton;
QLabel *label_3;
QListWidget *listWidget;
QLabel *label_4;
QLabel *label_5;
void setupUi(QMainWindow *MainWindow)
{
if (MainWindow->objectName().isEmpty())
MainWindow->setObjectName(QStringLiteral("MainWindow"));
MainWindow->resize(413, 681);
MainWindow->resize(405, 435);
QIcon icon;
icon.addFile(QStringLiteral(":/lib/timg2.png"), QSize(), QIcon::Normal, QIcon::Off);
MainWindow->setWindowIcon(icon);
centralWidget = new QWidget(MainWindow);
centralWidget->setObjectName(QStringLiteral("centralWidget"));
frame_3 = new QFrame(centralWidget);
frame_3->setObjectName(QStringLiteral("frame_3"));
frame_3->setGeometry(QRect(10, 519, 391, 151));
frame_3->setGeometry(QRect(6, 280, 391, 151));
frame_3->setMinimumSize(QSize(391, 151));
frame_3->setFrameShape(QFrame::StyledPanel);
frame_3->setFrameShadow(QFrame::Raised);
......@@ -78,14 +87,6 @@ public:
horizontalLayout->setSpacing(6);
horizontalLayout->setContentsMargins(11, 11, 11, 11);
horizontalLayout->setObjectName(QStringLiteral("horizontalLayout"));
label_2 = new QLabel(frame);
label_2->setObjectName(QStringLiteral("label_2"));
label_2->setMinimumSize(QSize(30, 0));
label_2->setMaximumSize(QSize(30, 16777215));
label_2->setAlignment(Qt::AlignCenter);
horizontalLayout->addWidget(label_2);
horizontalSlider = new QSlider(frame);
horizontalSlider->setObjectName(QStringLiteral("horizontalSlider"));
horizontalSlider->setEnabled(true);
......@@ -96,7 +97,7 @@ public:
label = new QLabel(frame);
label->setObjectName(QStringLiteral("label"));
label->setMinimumSize(QSize(30, 0));
label->setMinimumSize(QSize(83, 0));
label->setMaximumSize(QSize(30, 16777215));
label->setAlignment(Qt::AlignCenter);
......@@ -117,29 +118,29 @@ public:
pushButton_1 = new QPushButton(frame_2);
pushButton_1->setObjectName(QStringLiteral("pushButton_1"));
pushButton_1->setMinimumSize(QSize(50, 50));
pushButton_1->setMinimumSize(QSize(40, 40));
pushButton_1->setStyleSheet(QStringLiteral("border-image: url(:/lib/shangyiqu.png);"));
horizontalLayout_3->addWidget(pushButton_1);
horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
horizontalSpacer_2 = new QSpacerItem(30, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
horizontalLayout_3->addItem(horizontalSpacer_2);
pushButton_2 = new QPushButton(frame_2);
pushButton_2->setObjectName(QStringLiteral("pushButton_2"));
pushButton_2->setMinimumSize(QSize(60, 60));
pushButton_2->setMinimumSize(QSize(50, 50));
pushButton_2->setStyleSheet(QStringLiteral("border-image: url(:/lib/stop.png);"));
horizontalLayout_3->addWidget(pushButton_2);
horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
horizontalSpacer_3 = new QSpacerItem(30, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
horizontalLayout_3->addItem(horizontalSpacer_3);
pushButton_3 = new QPushButton(frame_2);
pushButton_3->setObjectName(QStringLiteral("pushButton_3"));
pushButton_3->setMinimumSize(QSize(50, 50));
pushButton_3->setMinimumSize(QSize(40, 40));
pushButton_3->setStyleSheet(QStringLiteral("border-image: url(:/lib/shangyiqu.png);"));
horizontalLayout_3->addWidget(pushButton_3);
......@@ -148,6 +149,24 @@ public:
horizontalLayout_3->addItem(horizontalSpacer_5);
pushButton_4 = new QPushButton(frame_2);
pushButton_4->setObjectName(QStringLiteral("pushButton_4"));
pushButton_4->setMinimumSize(QSize(20, 20));
pushButton_4->setStyleSheet(QStringLiteral("border-image: url(:/lib/xunhuan.png);"));
horizontalLayout_3->addWidget(pushButton_4);
horizontalSpacer_7 = new QSpacerItem(9, 20, QSizePolicy::Fixed, QSizePolicy::Minimum);
horizontalLayout_3->addItem(horizontalSpacer_7);
pushButton_5 = new QPushButton(frame_2);
pushButton_5->setObjectName(QStringLiteral("pushButton_5"));
pushButton_5->setMinimumSize(QSize(20, 20));
pushButton_5->setStyleSheet(QStringLiteral("border-image: url(:/lib/shengyin.png);"));
horizontalLayout_3->addWidget(pushButton_5);
frame_4 = new QFrame(centralWidget);
frame_4->setObjectName(QStringLiteral("frame_4"));
frame_4->setGeometry(QRect(286, -6, 131, 31));
......@@ -185,13 +204,13 @@ public:
toolButton_4 = new QToolButton(frame_4);
toolButton_4->setObjectName(QStringLiteral("toolButton_4"));
toolButton_4->setMinimumSize(QSize(0, 20));
toolButton_4->setStyleSheet(QString::fromUtf8("border-image: url(:/lib/\345\205\263 \351\227\255.png);"));
toolButton_4->setStyleSheet(QStringLiteral("border-image: url(:/lib/guanbi.png);"));
horizontalLayout_4->addWidget(toolButton_4);
plainTextEdit = new QPlainTextEdit(centralWidget);
plainTextEdit->setObjectName(QStringLiteral("plainTextEdit"));
plainTextEdit->setGeometry(QRect(33, 60, 341, 441));
plainTextEdit->setGeometry(QRect(11, 60, 381, 71));
pushButton = new QPushButton(centralWidget);
pushButton->setObjectName(QStringLiteral("pushButton"));
pushButton->setGeometry(QRect(0, 30, 75, 23));
......@@ -199,32 +218,51 @@ public:
label_3->setObjectName(QStringLiteral("label_3"));
label_3->setGeometry(QRect(0, 0, 421, 28));
label_3->setStyleSheet(QStringLiteral("background-color: rgba(170, 85, 255,100);"));
listWidget = new QListWidget(centralWidget);
listWidget->setObjectName(QStringLiteral("listWidget"));
listWidget->setGeometry(QRect(11, 160, 381, 61));
label_4 = new QLabel(centralWidget);
label_4->setObjectName(QStringLiteral("label_4"));
label_4->setGeometry(QRect(2, -1, 36, 31));
label_4->setStyleSheet(QStringLiteral("border-image: url(:/lib/timg2.png);"));
label_4->setAlignment(Qt::AlignCenter);
label_5 = new QLabel(centralWidget);
label_5->setObjectName(QStringLiteral("label_5"));
label_5->setGeometry(QRect(39, 4, 61, 21));
label_5->setAlignment(Qt::AlignCenter);
MainWindow->setCentralWidget(centralWidget);
label_3->raise();
frame_3->raise();
frame_4->raise();
plainTextEdit->raise();
pushButton->raise();
listWidget->raise();
label_4->raise();
label_5->raise();
retranslateUi(MainWindow);
QObject::connect(toolButton_4, SIGNAL(clicked()), MainWindow, SLOT(close()));
QMetaObject::connectSlotsByName(MainWindow);
} // setupUi
void retranslateUi(QMainWindow *MainWindow)
{
MainWindow->setWindowTitle(QApplication::translate("MainWindow", "MainWindow", nullptr));
label_2->setText(QApplication::translate("MainWindow", "0:00", nullptr));
MainWindow->setWindowTitle(QApplication::translate("MainWindow", "\346\227\255\345\220\254\351\237\263\344\271\220", nullptr));
label->setText(QApplication::translate("MainWindow", "4:32", nullptr));
pushButton_1->setText(QString());
pushButton_2->setText(QString());
pushButton_3->setText(QString());
pushButton_4->setText(QString());
pushButton_5->setText(QString());
toolButton_1->setText(QString());
toolButton_2->setText(QString());
toolButton_3->setText(QString());
toolButton_4->setText(QString());
pushButton->setText(QApplication::translate("MainWindow", "\346\267\273\345\212\240\351\237\263\351\242\221", nullptr));
label_3->setText(QString());
label_4->setText(QString());
label_5->setText(QApplication::translate("MainWindow", "\346\227\255\345\220\254\351\237\263\344\271\220", nullptr));
} // retranslateUi
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册