Procházet zdrojové kódy

2019-03-21

1.更新界面细节
叶海辉 před 6 roky
rodič
revize
bd6afc48a5

+ 1 - 1
VideoPlayer.pro.user

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE QtCreatorProject>
-<!-- Written by QtCreator 4.0.3, 2019-03-19T14:15:01. -->
+<!-- Written by QtCreator 4.0.3, 2019-03-20T18:30:20. -->
 <qtcreator>
  <data>
   <variable>EnvironmentId</variable>

binární
bin/VideoPlayer.exe


+ 2 - 0
module/VideoPlayer/src/VideoPlayer/Audio/VideoPlayer_AudioThread.cpp

@@ -155,6 +155,8 @@ int VideoPlayer::decodeAudioFrame(bool isBlock)
 
         if (got_frame)
         {
+            /// ffmpeg解码之后得到的音频数据不是SDL想要的,
+            /// 因此这里需要重采样成44100 双声道 AV_SAMPLE_FMT_S16
             if (aFrame_ReSample == NULL)
             {
                 aFrame_ReSample = av_frame_alloc();

+ 1 - 0
module/VideoPlayer/src/VideoPlayer/VideoPlayer.h

@@ -74,6 +74,7 @@ public:
 
     void setMute(bool isMute){mIsMute = isMute;}
     void setVolume(float value);
+    float getVolume(){return mVolume;}
 
     int64_t getTotalTime(); //单位微秒
     double getCurrentTime(); //单位秒

binární
resources/image/stop1_normal.png


binární
resources/image/stop_focus.png


binární
resources/image/stop_normal.png


binární
resources/image/volume.psd


binární
resources/image/volume_mute.png


binární
resources/image/volume_normal.png


+ 5 - 0
resources/resources.qrc

@@ -12,5 +12,10 @@
         <file>image/showmaxsizebtn.png</file>
         <file>image/showminisizebtn.png</file>
         <file>image/shownormalbtn.png</file>
+        <file>image/stop_focus.png</file>
+        <file>image/stop_normal.png</file>
+        <file>image/stop1_normal.png</file>
+        <file>image/volume_mute.png</file>
+        <file>image/volume_normal.png</file>
     </qresource>
 </RCC>

+ 84 - 12
src/Widget/VideoPlayerWidget.cpp

@@ -44,22 +44,27 @@ VideoPlayerWidget::VideoPlayerWidget(QWidget *parent) :
     connect(ui->pushButton_play, &QPushButton::clicked, this, &VideoPlayerWidget::slotBtnClick);
     connect(ui->pushButton_pause,&QPushButton::clicked, this, &VideoPlayerWidget::slotBtnClick);
     connect(ui->pushButton_stop, &QPushButton::clicked, this, &VideoPlayerWidget::slotBtnClick);
+    connect(ui->pushButton_volume, &QPushButton::clicked, this, &VideoPlayerWidget::slotBtnClick);
 
     connect(ui->horizontalSlider, SIGNAL(sig_valueChanged(int)), this, SLOT(slotSliderMoved(int)));
     connect(ui->horizontalSlider_volume, SIGNAL(valueChanged(int)), this, SLOT(slotSliderMoved(int)));
 
+    ui->widget_container->installEventFilter(this);
+
     mPlayer = this;
 
     mTimer = new QTimer; //定时器-获取当前视频时间
     connect(mTimer,SIGNAL(timeout()),this,SLOT(slotTimerTimeOut()));
     mTimer->setInterval(500);
 
-    ui->widget_video->hide();
+    ui->stackedWidget->setCurrentWidget(ui->page_open);
     ui->pushButton_pause->hide();
 
     resize(1024,768);
     setTitle(QStringLiteral("我的播放器-V%1").arg(AppConfig::VERSION_NAME));
 
+    mVolume = mPlayer->getVolume();
+
 }
 
 VideoPlayerWidget::~VideoPlayerWidget()
@@ -67,12 +72,6 @@ VideoPlayerWidget::~VideoPlayerWidget()
     delete ui;
 }
 
-void VideoPlayerWidget::doClose()
-{
-    mPlayer->stop(true);
-    close();
-}
-
 void VideoPlayerWidget::slotSliderMoved(int value)
 {
     if (QObject::sender() == ui->horizontalSlider)
@@ -81,6 +80,7 @@ void VideoPlayerWidget::slotSliderMoved(int value)
     }
     else if (QObject::sender() == ui->horizontalSlider_volume)
     {
+        qDebug()<<__FUNCTION__;
         mPlayer->setVolume(value / 100.0);
         ui->label_volume->setText(QString("%1").arg(value));
     }
@@ -103,7 +103,7 @@ void VideoPlayerWidget::slotTimerTimeOut()
     }
 }
 
-void VideoPlayerWidget::slotBtnClick()
+void VideoPlayerWidget::slotBtnClick(bool isChecked)
 {
     if (QObject::sender() == ui->pushButton_play)
     {
@@ -131,6 +131,30 @@ void VideoPlayerWidget::slotBtnClick()
             mPlayer->startPlay(s.toStdString());
         }
     }
+    else if (QObject::sender() == ui->pushButton_volume)
+    {
+       qDebug()<<isChecked;
+
+        bool isMute = isChecked;
+        mPlayer->setMute(isMute);
+
+        if (isMute)
+        {
+            mVolume = mPlayer->getVolume();
+
+            ui->horizontalSlider_volume->setValue(0);
+            ui->horizontalSlider_volume->setEnabled(false);
+            ui->label_volume->setText(QString("%1").arg(0));
+        }
+        else
+        {
+            int volume = mVolume * 100.0;
+            ui->horizontalSlider_volume->setValue(volume);
+            ui->horizontalSlider_volume->setEnabled(true);
+            ui->label_volume->setText(QString("%1").arg(volume));
+        }
+
+    }
 
 }
 
@@ -187,8 +211,8 @@ void VideoPlayerWidget::slotStateChanged(VideoPlayer::PlayerState state)
 {
     if (state == VideoPlayer::Stop)
     {
-        ui->widget_video->hide();
-        ui->widget_showopen->show();
+        ui->stackedWidget->setCurrentWidget(ui->page_open);
+
         ui->pushButton_pause->hide();
         ui->widget_videoPlayer->clear();
 
@@ -201,8 +225,7 @@ void VideoPlayerWidget::slotStateChanged(VideoPlayer::PlayerState state)
     }
     else if (state == VideoPlayer::Playing)
     {
-        ui->widget_showopen->hide();
-        ui->widget_video->show();
+        ui->stackedWidget->setCurrentWidget(ui->page_video);
 
         ui->pushButton_play->hide();
         ui->pushButton_pause->show();
@@ -235,4 +258,53 @@ void VideoPlayerWidget::slotDisplayVideo(const QImage &image)
     ui->widget_videoPlayer->inputOneFrame(image);
 }
 
+//图片显示部件时间过滤器处理
+bool VideoPlayerWidget::eventFilter(QObject *target, QEvent *event)
+{
+    if(target == ui->widget_container)
+    {
+        if(event->type() == QEvent::Resize)
+        {
+            QResizeEvent * e = (QResizeEvent*)event;
+            int w = e->size().width();
+            int h = e->size().height();
+            ui->stackedWidget->move(0, 0);
+            ui->stackedWidget->resize(w, h);
+
+            int x = 0;
+            int y = h - ui->widget_controller->height();
+            ui->widget_controller->move(x, y);
+            ui->widget_controller->resize(w, ui->widget_controller->height());
+        }
+//        else if(event->type() == QEvent::Enter)
+//        {
+//            qDebug("Enter...");
+//        }
+//        else if(event->type() == QEvent::Leave)
+//        {
+//            qDebug("Leave...");
+//        }
+
+//        qDebug("The imageWidget generate the event!");
+//        if(event->type() == QEvent::MouseButtonPress)
+//        {
+//            QMouseEvent *mouseEvent = static_cast<QMouseEvent *>(event);
+//            if(mouseEvent->buttons() & Qt::LeftButton)
+//            {
+//                qDebug("The Left Button Event!");
+
+//            }
+//            else if(mouseEvent->buttons() & Qt::RightButton)
+//            {
+//                qDebug("The Right Button Event!");
+
+//            }
+
+//            return true;
+//        }
+    }
+
+    //其它部件产生的事件则交给基类处理
+    return DragAbleWidget::eventFilter(target, event);
+}
 

+ 4 - 2
src/Widget/VideoPlayerWidget.h

@@ -31,7 +31,7 @@ public:
     ~VideoPlayerWidget();
 
 protected:
-    void doClose();
+    bool eventFilter(QObject *target, QEvent *event);
 
 private:
     Ui::VideoPlayerWidget *ui;
@@ -39,11 +39,13 @@ private:
     VideoPlayer *mPlayer; //播放线程
     QTimer *mTimer; //定时器-获取当前视频时间
 
+    float mVolume;
+
 private slots:
     ///播放器相关的槽函数
     void slotSliderMoved(int value);
     void slotTimerTimeOut();
-    void slotBtnClick();
+    void slotBtnClick(bool isChecked);
 
 
     ///以下函数,用于输出信息给界面

+ 469 - 376
src/Widget/VideoPlayerWidget.ui

@@ -38,27 +38,29 @@
 }
 </string>
      </property>
-     <layout class="QVBoxLayout" name="verticalLayout_3">
-      <property name="spacing">
-       <number>0</number>
+     <widget class="QStackedWidget" name="stackedWidget">
+      <property name="geometry">
+       <rect>
+        <x>80</x>
+        <y>40</y>
+        <width>711</width>
+        <height>321</height>
+       </rect>
       </property>
-      <property name="leftMargin">
-       <number>0</number>
+      <property name="currentIndex">
+       <number>1</number>
       </property>
-      <property name="topMargin">
-       <number>0</number>
-      </property>
-      <property name="rightMargin">
-       <number>0</number>
-      </property>
-      <property name="bottomMargin">
-       <number>0</number>
-      </property>
-      <item>
-       <layout class="QHBoxLayout" name="horizontalLayout_6">
+      <widget class="QWidget" name="page_open">
+       <layout class="QVBoxLayout" name="verticalLayout_6">
         <property name="spacing">
          <number>0</number>
         </property>
+        <property name="leftMargin">
+         <number>0</number>
+        </property>
+        <property name="topMargin">
+         <number>0</number>
+        </property>
         <property name="rightMargin">
          <number>0</number>
         </property>
@@ -66,143 +68,342 @@
          <number>0</number>
         </property>
         <item>
-         <layout class="QVBoxLayout" name="verticalLayout_4">
-          <property name="spacing">
-           <number>0</number>
-          </property>
-          <property name="topMargin">
-           <number>0</number>
-          </property>
-          <property name="rightMargin">
-           <number>0</number>
+         <widget class="QWidget" name="widget_showopen" native="true">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
           </property>
-          <item>
-           <widget class="QWidget" name="widget_showopen" native="true">
-            <property name="sizePolicy">
-             <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
-            </property>
-            <property name="styleSheet">
-             <string notr="true">QWidget#widget_showopen
+          <property name="styleSheet">
+           <string notr="true">QWidget#widget_showopen
 {
 	
 	background-color: rgba(60, 65, 68,100);
 }</string>
-            </property>
-            <layout class="QVBoxLayout" name="verticalLayout_5">
+          </property>
+          <layout class="QVBoxLayout" name="verticalLayout_5">
+           <item>
+            <layout class="QHBoxLayout" name="horizontalLayout_3">
              <item>
-              <layout class="QHBoxLayout" name="horizontalLayout_3">
-               <item>
-                <spacer name="horizontalSpacer">
-                 <property name="orientation">
-                  <enum>Qt::Horizontal</enum>
-                 </property>
-                 <property name="sizeHint" stdset="0">
-                  <size>
-                   <width>40</width>
-                   <height>20</height>
-                  </size>
-                 </property>
-                </spacer>
-               </item>
-               <item>
-                <widget class="QToolButton" name="toolButton_open">
-                 <property name="minimumSize">
-                  <size>
-                   <width>160</width>
-                   <height>50</height>
-                  </size>
-                 </property>
-                 <property name="text">
-                  <string>打开文件</string>
-                 </property>
-                </widget>
-               </item>
-               <item>
-                <spacer name="horizontalSpacer_2">
-                 <property name="orientation">
-                  <enum>Qt::Horizontal</enum>
-                 </property>
-                 <property name="sizeHint" stdset="0">
-                  <size>
-                   <width>40</width>
-                   <height>20</height>
-                  </size>
-                 </property>
-                </spacer>
-               </item>
-              </layout>
+              <spacer name="horizontalSpacer">
+               <property name="orientation">
+                <enum>Qt::Horizontal</enum>
+               </property>
+               <property name="sizeHint" stdset="0">
+                <size>
+                 <width>40</width>
+                 <height>20</height>
+                </size>
+               </property>
+              </spacer>
              </item>
-            </layout>
-           </widget>
-          </item>
-          <item>
-           <widget class="QWidget" name="widget_video" native="true">
-            <property name="sizePolicy">
-             <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
-            </property>
-            <property name="styleSheet">
-             <string notr="true"/>
-            </property>
-            <layout class="QVBoxLayout" name="verticalLayout_2">
              <item>
-              <widget class="ShowVideoWidget" name="widget_videoPlayer" native="true">
-               <property name="enabled">
-                <bool>true</bool>
+              <widget class="QToolButton" name="toolButton_open">
+               <property name="minimumSize">
+                <size>
+                 <width>160</width>
+                 <height>50</height>
+                </size>
                </property>
-               <property name="sizePolicy">
-                <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
-                 <horstretch>0</horstretch>
-                 <verstretch>0</verstretch>
-                </sizepolicy>
+               <property name="text">
+                <string>打开文件</string>
                </property>
-               <property name="mouseTracking">
-                <bool>true</bool>
+              </widget>
+             </item>
+             <item>
+              <spacer name="horizontalSpacer_2">
+               <property name="orientation">
+                <enum>Qt::Horizontal</enum>
                </property>
-               <property name="styleSheet">
-                <string notr="true">QWidget#widget_videoPlayer
-{
-	background-color: rgb(255, 55, 195);
-}</string>
+               <property name="sizeHint" stdset="0">
+                <size>
+                 <width>40</width>
+                 <height>20</height>
+                </size>
                </property>
-              </widget>
+              </spacer>
              </item>
             </layout>
-           </widget>
-          </item>
-         </layout>
+           </item>
+          </layout>
+         </widget>
         </item>
        </layout>
-      </item>
-      <item>
-       <widget class="QWidget" name="widget_controller" native="true">
-        <property name="minimumSize">
-         <size>
-          <width>0</width>
-          <height>60</height>
-         </size>
+      </widget>
+      <widget class="QWidget" name="page_video">
+       <layout class="QVBoxLayout" name="verticalLayout_8">
+        <property name="spacing">
+         <number>0</number>
         </property>
-        <property name="styleSheet">
-         <string notr="true">QWidget#widget_controller
+        <property name="leftMargin">
+         <number>0</number>
+        </property>
+        <property name="topMargin">
+         <number>0</number>
+        </property>
+        <property name="rightMargin">
+         <number>0</number>
+        </property>
+        <property name="bottomMargin">
+         <number>0</number>
+        </property>
+        <item>
+         <widget class="ShowVideoWidget" name="widget_videoPlayer" native="true">
+          <property name="enabled">
+           <bool>true</bool>
+          </property>
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="mouseTracking">
+           <bool>true</bool>
+          </property>
+          <property name="styleSheet">
+           <string notr="true">QWidget#widget_videoPlayer
 {
-	background-color: rgba(60, 65, 68,100);
+	background-color: rgb(255, 55, 195);
 }</string>
-        </property>
-        <layout class="QVBoxLayout" name="verticalLayout_7">
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </widget>
+     </widget>
+     <widget class="QWidget" name="widget_controller" native="true">
+      <property name="geometry">
+       <rect>
+        <x>70</x>
+        <y>480</y>
+        <width>971</width>
+        <height>60</height>
+       </rect>
+      </property>
+      <property name="styleSheet">
+       <string notr="true">QWidget#widget_controller
+{
+	background-color: rgba(60, 65, 68,160);
+}</string>
+      </property>
+      <layout class="QVBoxLayout" name="verticalLayout_7">
+       <property name="leftMargin">
+        <number>6</number>
+       </property>
+       <property name="topMargin">
+        <number>6</number>
+       </property>
+       <property name="rightMargin">
+        <number>6</number>
+       </property>
+       <property name="bottomMargin">
+        <number>6</number>
+       </property>
+       <item>
+        <layout class="QHBoxLayout" name="horizontalLayout_2">
+         <property name="spacing">
+          <number>1</number>
+         </property>
+         <property name="rightMargin">
+          <number>0</number>
+         </property>
          <item>
-          <layout class="QHBoxLayout" name="horizontalLayout_2">
-           <item>
-            <widget class="VideoSlider" name="horizontalSlider">
-             <property name="cursor">
-              <cursorShape>PointingHandCursor</cursorShape>
-             </property>
-             <property name="styleSheet">
-              <string notr="true">QSlider::groove:horizontal {
+          <widget class="QPushButton" name="pushButton_open">
+           <property name="minimumSize">
+            <size>
+             <width>36</width>
+             <height>36</height>
+            </size>
+           </property>
+           <property name="cursor">
+            <cursorShape>PointingHandCursor</cursorShape>
+           </property>
+           <property name="styleSheet">
+            <string notr="true">QPushButton{ 
+image: url(:image/open_normal.png);
+border-radius:0px; 
+} 
+QPushButton:hover{ 
+image: url(:image/open_focus.png);
+border-radius:0px; 
+} 
+QPushButton:pressed{ 
+image: url(:image/open_normal.png);
+border-radius:0px; 
+}
+</string>
+           </property>
+           <property name="text">
+            <string/>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <spacer name="horizontalSpacer_3">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeType">
+            <enum>QSizePolicy::Fixed</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>6</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item>
+          <widget class="QPushButton" name="pushButton_play">
+           <property name="minimumSize">
+            <size>
+             <width>36</width>
+             <height>36</height>
+            </size>
+           </property>
+           <property name="cursor">
+            <cursorShape>PointingHandCursor</cursorShape>
+           </property>
+           <property name="styleSheet">
+            <string notr="true">QPushButton{ 
+image: url(:image/start_normal.png);
+border-radius:0px; 
+}  
+QPushButton:hover{ 
+image: url(:image/start_focus.png);
+border-radius:0px; 
+} 
+QPushButton:pressed{ 
+image: url(:image/start_normal.png);
+border-radius:0px; 
+}
+</string>
+           </property>
+           <property name="text">
+            <string/>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <spacer name="horizontalSpacer_4">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeType">
+            <enum>QSizePolicy::Fixed</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>6</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item>
+          <widget class="QPushButton" name="pushButton_pause">
+           <property name="minimumSize">
+            <size>
+             <width>36</width>
+             <height>36</height>
+            </size>
+           </property>
+           <property name="cursor">
+            <cursorShape>PointingHandCursor</cursorShape>
+           </property>
+           <property name="styleSheet">
+            <string notr="true">QPushButton{ 
+image: url(:image/pause_normal.png);
+border-radius:0px; 
+} 
+QPushButton:hover{ 
+image: url(:image/pause_focus.png);
+border-radius:0px; 
+} 
+QPushButton:pressed{ 
+image: url(:image/pause_normal.png);
+border-radius:0px; 
+}
+</string>
+           </property>
+           <property name="text">
+            <string/>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <spacer name="horizontalSpacer_5">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeType">
+            <enum>QSizePolicy::Fixed</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>6</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item>
+          <widget class="QPushButton" name="pushButton_stop">
+           <property name="minimumSize">
+            <size>
+             <width>36</width>
+             <height>36</height>
+            </size>
+           </property>
+           <property name="cursor">
+            <cursorShape>PointingHandCursor</cursorShape>
+           </property>
+           <property name="styleSheet">
+            <string notr="true">QPushButton{ 
+image: url(:image/stop_normal.png);
+border-radius:0px; 
+}  
+QPushButton:hover{ 
+image: url(:image/stop_focus.png);
+border-radius:0px; 
+} 
+QPushButton:pressed{ 
+image: url(:image/stop_normal.png);
+border-radius:0px; 
+}
+</string>
+           </property>
+           <property name="text">
+            <string/>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <spacer name="horizontalSpacer_6">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeType">
+            <enum>QSizePolicy::Fixed</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>6</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item>
+          <widget class="VideoSlider" name="horizontalSlider">
+           <property name="cursor">
+            <cursorShape>PointingHandCursor</cursorShape>
+           </property>
+           <property name="styleSheet">
+            <string notr="true">QSlider::groove:horizontal {
 border: 0px solid #bbb;
 }
 
@@ -267,237 +468,131 @@ border-radius:5px;  /*边框拐角*/
 }
 
 </string>
-             </property>
-             <property name="orientation">
-              <enum>Qt::Horizontal</enum>
-             </property>
-            </widget>
-           </item>
+           </property>
+           <property name="maximum">
+            <number>100</number>
+           </property>
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <layout class="QHBoxLayout" name="horizontalLayout">
+           <property name="spacing">
+            <number>3</number>
+           </property>
            <item>
-            <layout class="QHBoxLayout" name="horizontalLayout">
-             <item>
-              <widget class="QLabel" name="label_currenttime">
-               <property name="styleSheet">
-                <string notr="true">QLabel{
-	border-radius:0px;
-	color: #F0F0F0;
-	background-color:rgba(0,0,0,0);
-	border-style:none;
-font: 10pt &quot;微软雅黑&quot;;
-font-size:20px;
-font-weight:bold;
-}
-</string>
-               </property>
-               <property name="text">
-                <string>00:00:00</string>
-               </property>
-              </widget>
-             </item>
-             <item>
-              <widget class="QLabel" name="label_2">
-               <property name="styleSheet">
-                <string notr="true">QLabel{
-	border-radius:0px;
-	color: #F0F0F0;
-	background-color:rgba(0,0,0,0);
-	border-style:none;
-font: 10pt &quot;微软雅黑&quot;;
-font-size:20px;
-font-weight:bold;
-}
-</string>
-               </property>
-               <property name="text">
-                <string>/</string>
-               </property>
-              </widget>
-             </item>
-             <item>
-              <widget class="QLabel" name="label_totaltime">
-               <property name="styleSheet">
-                <string notr="true">QLabel{
+            <widget class="QLabel" name="label_currenttime">
+             <property name="styleSheet">
+              <string notr="true">QLabel{
 	border-radius:0px;
 	color: #F0F0F0;
 	background-color:rgba(0,0,0,0);
 	border-style:none;
-font: 10pt &quot;微软雅黑&quot;;
-font-size:20px;
-font-weight:bold;
-}
-</string>
-               </property>
-               <property name="text">
-                <string>00:00:00</string>
-               </property>
-              </widget>
-             </item>
-            </layout>
-           </item>
-          </layout>
-         </item>
-         <item>
-          <layout class="QHBoxLayout" name="horizontalLayout_4">
-           <item>
-            <widget class="QPushButton" name="pushButton_open">
-             <property name="minimumSize">
-              <size>
-               <width>36</width>
-               <height>36</height>
-              </size>
-             </property>
-             <property name="cursor">
-              <cursorShape>PointingHandCursor</cursorShape>
-             </property>
-             <property name="styleSheet">
-              <string notr="true">QPushButton{ 
-image: url(:image/open_normal.png);
-border-radius:0px; 
-} 
-QPushButton:hover{ 
-image: url(:image/open_focus.png);
-border-radius:0px; 
-} 
-QPushButton:pressed{ 
-image: url(:image/open_normal.png);
-border-radius:0px; 
-}
-</string>
-             </property>
-             <property name="text">
-              <string/>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <spacer name="horizontalSpacer_3">
-             <property name="orientation">
-              <enum>Qt::Horizontal</enum>
-             </property>
-             <property name="sizeHint" stdset="0">
-              <size>
-               <width>40</width>
-               <height>20</height>
-              </size>
-             </property>
-            </spacer>
-           </item>
-           <item>
-            <widget class="QPushButton" name="pushButton_play">
-             <property name="minimumSize">
-              <size>
-               <width>50</width>
-               <height>50</height>
-              </size>
-             </property>
-             <property name="cursor">
-              <cursorShape>PointingHandCursor</cursorShape>
-             </property>
-             <property name="styleSheet">
-              <string notr="true">QPushButton{ 
-image: url(:image/start_normal.png);
-border-radius:0px; 
-}  
-QPushButton:hover{ 
-image: url(:image/start_focus.png);
-border-radius:0px; 
-} 
-QPushButton:pressed{ 
-image: url(:image/start_normal.png);
-border-radius:0px; 
+font-family:&quot;微软雅黑&quot;;
+font-size:16px;
 }
 </string>
              </property>
              <property name="text">
-              <string/>
+              <string>00:00:00</string>
              </property>
             </widget>
            </item>
            <item>
-            <widget class="QPushButton" name="pushButton_pause">
-             <property name="minimumSize">
-              <size>
-               <width>50</width>
-               <height>50</height>
-              </size>
-             </property>
-             <property name="cursor">
-              <cursorShape>PointingHandCursor</cursorShape>
-             </property>
+            <widget class="QLabel" name="label_2">
              <property name="styleSheet">
-              <string notr="true">QPushButton{ 
-image: url(:image/pause_normal.png);
-border-radius:0px; 
-} 
-QPushButton:hover{ 
-image: url(:image/pause_focus.png);
-border-radius:0px; 
-} 
-QPushButton:pressed{ 
-image: url(:image/pause_normal.png);
-border-radius:0px; 
+              <string notr="true">QLabel{
+	border-radius:0px;
+	color: #F0F0F0;
+	background-color:rgba(0,0,0,0);
+	border-style:none;
+font-family:&quot;微软雅黑&quot;;
+font-size:16px;
 }
 </string>
              </property>
              <property name="text">
-              <string/>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QPushButton" name="pushButton_stop">
-             <property name="cursor">
-              <cursorShape>PointingHandCursor</cursorShape>
-             </property>
-             <property name="text">
-              <string>停止</string>
+              <string>/</string>
              </property>
             </widget>
            </item>
            <item>
-            <spacer name="horizontalSpacer_4">
-             <property name="orientation">
-              <enum>Qt::Horizontal</enum>
-             </property>
-             <property name="sizeHint" stdset="0">
-              <size>
-               <width>40</width>
-               <height>20</height>
-              </size>
-             </property>
-            </spacer>
-           </item>
-           <item>
-            <widget class="QLabel" name="label_63">
+            <widget class="QLabel" name="label_totaltime">
              <property name="styleSheet">
               <string notr="true">QLabel{
 	border-radius:0px;
 	color: #F0F0F0;
 	background-color:rgba(0,0,0,0);
 	border-style:none;
-font: 16px &quot;微软雅黑&quot;;
-
+font-family:&quot;微软雅黑&quot;;
+font-size:16px;
 }
 </string>
              </property>
              <property name="text">
-              <string>音量</string>
-             </property>
-             <property name="alignment">
-              <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+              <string>00:00:00</string>
              </property>
             </widget>
            </item>
-           <item>
-            <widget class="QSlider" name="horizontalSlider_volume">
-             <property name="maximumSize">
-              <size>
-               <width>150</width>
-               <height>16777215</height>
-              </size>
-             </property>
-             <property name="styleSheet">
-              <string notr="true">QSlider::groove:horizontal {
+          </layout>
+         </item>
+         <item>
+          <widget class="QPushButton" name="pushButton_volume">
+           <property name="minimumSize">
+            <size>
+             <width>36</width>
+             <height>36</height>
+            </size>
+           </property>
+           <property name="cursor">
+            <cursorShape>PointingHandCursor</cursorShape>
+           </property>
+           <property name="styleSheet">
+            <string notr="true">QPushButton{ 
+image: url(:/image/volume_normal.png);
+border-radius:0px; 
+padding:5px;
+}  
+QPushButton:hover{ 
+image: url(:image/stop_focus.png);
+border-radius:0px; 
+padding:3px;
+} 
+QPushButton:!checked{ 
+image: url(:/image/volume_normal.png);
+} 
+QPushButton:checked{ 
+image: url(:/image/volume_mute.png);
+} 
+
+</string>
+           </property>
+           <property name="text">
+            <string/>
+           </property>
+           <property name="checkable">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QSlider" name="horizontalSlider_volume">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="maximumSize">
+            <size>
+             <width>150</width>
+             <height>16777215</height>
+            </size>
+           </property>
+           <property name="styleSheet">
+            <string notr="true">QSlider::groove:horizontal {
 border: 0px solid #bbb;
 }
 
@@ -519,11 +614,11 @@ margin-bottom:8px;
 QSlider::handle:horizontal {
 background: rgb(255,153,102); 
 border: 1px solid rgb(255,153,102); 
-width: 14px;
-height:10px;
-border-radius: 7px;
-margin-top:2px;
-margin-bottom:2px;
+width: 8px;
+height:8px;
+border-radius: 2px;
+margin-top:6px;
+margin-bottom:6px;
 }
 
 QSlider::handle:horizontal:hover {
@@ -549,57 +644,55 @@ border-radius: 4px;
 }
 
 </string>
-             </property>
-             <property name="maximum">
-              <number>100</number>
-             </property>
-             <property name="singleStep">
-              <number>0</number>
-             </property>
-             <property name="pageStep">
-              <number>0</number>
-             </property>
-             <property name="value">
-              <number>100</number>
-             </property>
-             <property name="orientation">
-              <enum>Qt::Horizontal</enum>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QLabel" name="label_volume">
-             <property name="minimumSize">
-              <size>
-               <width>20</width>
-               <height>0</height>
-              </size>
-             </property>
-             <property name="styleSheet">
-              <string notr="true">QLabel{
+           </property>
+           <property name="maximum">
+            <number>100</number>
+           </property>
+           <property name="singleStep">
+            <number>0</number>
+           </property>
+           <property name="pageStep">
+            <number>0</number>
+           </property>
+           <property name="value">
+            <number>100</number>
+           </property>
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QLabel" name="label_volume">
+           <property name="minimumSize">
+            <size>
+             <width>20</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="styleSheet">
+            <string notr="true">QLabel{
 	border-radius:0px;
 	color: #F0F0F0;
 	background-color:rgba(0,0,0,0);
 	border-style:none;
 font: 16px &quot;微软雅黑&quot;;
-font-weight:bold;
+
 }
 </string>
-             </property>
-             <property name="text">
-              <string>100</string>
-             </property>
-             <property name="alignment">
-              <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
-             </property>
-            </widget>
-           </item>
-          </layout>
+           </property>
+           <property name="text">
+            <string>100</string>
+           </property>
+           <property name="alignment">
+            <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+           </property>
+          </widget>
          </item>
         </layout>
-       </widget>
-      </item>
-     </layout>
+       </item>
+      </layout>
+     </widget>
     </widget>
    </item>
   </layout>