aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--about.ui48
-rw-r--r--build/.qmake.stash21
-rwxr-xr-xbuild/AleePlayerbin1603976 -> 0 bytes
-rw-r--r--player.cpp16
-rw-r--r--player.h2
-rw-r--r--player.ui31
6 files changed, 91 insertions, 27 deletions
diff --git a/about.ui b/about.ui
index bee1c35..76acb4b 100644
--- a/about.ui
+++ b/about.ui
@@ -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>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Noto Sans'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot;-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';&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Sans';&quot;&gt; AleePlayer: Music player in Qt &lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Sans';&quot;&gt; Copyright (C) 2020 Alee Productions&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-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';&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Sans';&quot;&gt; This program is free software: you can redistribute it and/or modify&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Sans';&quot;&gt; it under the terms of the GNU General Public License as published by&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Sans';&quot;&gt; the Free Software Foundation, either version 3 of the License, or&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Sans';&quot;&gt; (at your option) any later version.&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-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';&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Sans';&quot;&gt; This program is distributed in the hope that it will be useful,&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Sans';&quot;&gt; but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Sans';&quot;&gt; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Sans';&quot;&gt; GNU General Public License for more details.&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-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';&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Sans';&quot;&gt; You should have received a copy of the GNU General Public License&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Sans';&quot;&gt; along with this program. If not, see &amp;lt;https://www.gnu.org/licenses/&amp;gt;.&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-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';&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</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
deleted file mode 100755
index d2db124..0000000
--- a/build/AleePlayer
+++ /dev/null
Binary files differ
diff --git a/player.cpp b/player.cpp
index ffbc39c..0b8d451 100644
--- a/player.cpp
+++ b/player.cpp
@@ -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();
}
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 @@
<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/>