From a8e0d6dea2da5b59d7404a3581a2e96acc747b2a Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Mon, 20 Jan 2020 13:44:39 -0500 Subject: new features --- about.ui | 48 ++++++++++++++++++++++++++++++++++++++++++------ build/.qmake.stash | 21 --------------------- build/AleePlayer | Bin 1603976 -> 0 bytes player.cpp | 16 ++++++++++++++++ player.h | 2 ++ player.ui | 31 +++++++++++++++++++++++++++++++ 6 files changed, 91 insertions(+), 27 deletions(-) delete mode 100644 build/.qmake.stash delete mode 100755 build/AleePlayer diff --git a/about.ui b/about.ui index bee1c35..76acb4b 100644 --- a/about.ui +++ b/about.ui @@ -6,8 +6,8 @@ 0 0 - 400 - 300 + 516 + 391 @@ -16,8 +16,8 @@ - 90 - 80 + 130 + 70 215 30 @@ -34,8 +34,8 @@ - 30 - 40 + 80 + 30 340 30 @@ -49,6 +49,42 @@ AleePlayer 0.1 by Alee Productions + + + + 20 + 130 + 471 + 241 + + + + true + + + <!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> + + 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 deleted file mode 100755 index d2db124..0000000 Binary files a/build/AleePlayer and /dev/null differ diff --git a/player.cpp b/player.cpp index ffbc39c..0b8d451 100644 --- a/player.cpp +++ b/player.cpp @@ -5,6 +5,7 @@ #include #include #include +#include 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(); } diff --git a/player.h b/player.h index 8d26e48..26a8377 100644 --- a/player.h +++ b/player.h @@ -28,6 +28,8 @@ private slots: void on_pushButton_pressed(); + void on_actionOpen_triggered(); + private: Ui::Player *ui; }; diff --git a/player.ui b/player.ui index 8cb0eda..902e4a4 100644 --- a/player.ui +++ b/player.ui @@ -26,6 +26,12 @@ Play Audio + + false + + + false + @@ -53,6 +59,24 @@ Set Media + + + + 30 + 70 + 81 + 31 + + + + + 14 + + + + Nothing + + @@ -67,6 +91,8 @@ File + + @@ -83,6 +109,11 @@ About + + + Open + + -- cgit v1.2.3