diff options
| -rw-r--r-- | about.ui | 48 | ||||
| -rw-r--r-- | build/.qmake.stash | 21 | ||||
| -rwxr-xr-x | build/AleePlayer | bin | 1603976 -> 0 bytes | |||
| -rw-r--r-- | player.cpp | 16 | ||||
| -rw-r--r-- | player.h | 2 | ||||
| -rw-r--r-- | player.ui | 31 |
6 files changed, 91 insertions, 27 deletions
@@ -6,8 +6,8 @@ <rect> <x>0</x> <y>0</y> - <width>400</width> - <height>300</height> + <width>516</width> + <height>391</height> </rect> </property> <property name="windowTitle"> @@ -16,8 +16,8 @@ <widget class="QLabel" name="label_2"> <property name="geometry"> <rect> - <x>90</x> - <y>80</y> + <x>130</x> + <y>70</y> <width>215</width> <height>30</height> </rect> @@ -34,8 +34,8 @@ <widget class="QLabel" name="label"> <property name="geometry"> <rect> - <x>30</x> - <y>40</y> + <x>80</x> + <y>30</y> <width>340</width> <height>30</height> </rect> @@ -49,6 +49,42 @@ <string>AleePlayer 0.1 by Alee Productions</string> </property> </widget> + <widget class="QTextEdit" name="textEdit"> + <property name="geometry"> + <rect> + <x>20</x> + <y>130</y> + <width>471</width> + <height>241</height> + </rect> + </property> + <property name="readOnly"> + <bool>true</bool> + </property> + <property name="html"> + <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Noto Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Sans';"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Sans';"> AleePlayer: Music player in Qt </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Sans';"> Copyright (C) 2020 Alee Productions</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Sans';"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Sans';"> This program is free software: you can redistribute it and/or modify</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Sans';"> it under the terms of the GNU General Public License as published by</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Sans';"> the Free Software Foundation, either version 3 of the License, or</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Sans';"> (at your option) any later version.</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Sans';"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Sans';"> This program is distributed in the hope that it will be useful,</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Sans';"> but WITHOUT ANY WARRANTY; without even the implied warranty of</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Sans';"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Sans';"> GNU General Public License for more details.</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Sans';"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Sans';"> You should have received a copy of the GNU General Public License</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Sans';"> along with this program. If not, see &lt;https://www.gnu.org/licenses/&gt;.</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Sans';"><br /></p></body></html></string> + </property> + </widget> </widget> <resources/> <connections/> diff --git a/build/.qmake.stash b/build/.qmake.stash deleted file mode 100644 index d389915..0000000 --- a/build/.qmake.stash +++ /dev/null @@ -1,21 +0,0 @@ -QMAKE_CXX.QT_COMPILER_STDCXX = 201402L -QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 9 -QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 2 -QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0 -QMAKE_CXX.COMPILER_MACROS = \ - QT_COMPILER_STDCXX \ - QMAKE_GCC_MAJOR_VERSION \ - QMAKE_GCC_MINOR_VERSION \ - QMAKE_GCC_PATCH_VERSION -QMAKE_CXX.INCDIRS = \ - /usr/include/c++/9.2.0 \ - /usr/include/c++/9.2.0/x86_64-pc-linux-gnu \ - /usr/include/c++/9.2.0/backward \ - /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include \ - /usr/local/include \ - /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include-fixed \ - /usr/include -QMAKE_CXX.LIBDIRS = \ - /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0 \ - /usr/lib \ - /lib diff --git a/build/AleePlayer b/build/AleePlayer Binary files differdeleted file mode 100755 index d2db124..0000000 --- a/build/AleePlayer +++ /dev/null @@ -5,6 +5,7 @@ #include <QMediaPlayer> #include <QDebug> #include <QFileDialog> +#include <QMessageBox> Player::Player(QWidget *parent) @@ -49,10 +50,25 @@ void Player::on_pauseButton_pressed() mPlayer->pause(); } + void Player::on_pushButton_pressed() { QString mFile; + QMessageBox msgbox; + mFile = QFileDialog::getOpenFileName(this, "Open any audio file", QDir::homePath(), tr("Audio Files (*.mp3)")); + mPlayer->setMedia(QUrl::fromLocalFile(mFile)); + qDebug() << "Opening" << mFile; + msgbox.setText("This audio file has been loaded."); + msgbox.exec(); +} + +void Player::on_actionOpen_triggered() +{ + QString mFile; + QMessageBox msgbox; mFile = QFileDialog::getOpenFileName(this, "Open any audio file", QDir::homePath(), tr("Audio Files (*.mp3)")); mPlayer->setMedia(QUrl::fromLocalFile(mFile)); qDebug() << "Opening" << mFile; + msgbox.setText("This audio file has been loaded."); + msgbox.exec(); } @@ -28,6 +28,8 @@ private slots: void on_pushButton_pressed(); + void on_actionOpen_triggered(); + private: Ui::Player *ui; }; @@ -26,6 +26,12 @@ <property name="text"> <string>Play Audio</string> </property> + <property name="checkable"> + <bool>false</bool> + </property> + <property name="checked"> + <bool>false</bool> + </property> </widget> <widget class="QPushButton" name="pauseButton"> <property name="geometry"> @@ -53,6 +59,24 @@ <string>Set Media</string> </property> </widget> + <widget class="QLabel" name="titleLabel"> + <property name="geometry"> + <rect> + <x>30</x> + <y>70</y> + <width>81</width> + <height>31</height> + </rect> + </property> + <property name="font"> + <font> + <pointsize>14</pointsize> + </font> + </property> + <property name="text"> + <string>Nothing</string> + </property> + </widget> </widget> <widget class="QMenuBar" name="menubar"> <property name="geometry"> @@ -67,6 +91,8 @@ <property name="title"> <string>File</string> </property> + <addaction name="actionOpen"/> + <addaction name="separator"/> <addaction name="actionAbout"/> <addaction name="actionQuit"/> </widget> @@ -83,6 +109,11 @@ <string>About</string> </property> </action> + <action name="actionOpen"> + <property name="text"> + <string>Open</string> + </property> + </action> </widget> <resources/> <connections/> |
