Commit 371ba541 authored by Bart van der Velden's avatar Bart van der Velden

- Add a menu

- Show the About... and About Qt... in the proper place (#68)
parent 4c2c59a4
......@@ -19,6 +19,7 @@
#include "ui_mainwindow.h"
#include "ui/about.h"
#include <QFileDialog>
//#include <QMessageBox>
#include "FileTypeResolver.h"
#include "taglib.h"
......@@ -29,9 +30,15 @@ MainWindow::MainWindow(QWidget *parent) :
m_ui->setupUi(this);
// Connect signals and slots
connect(m_ui->aboutButton, SIGNAL(clicked()), SLOT(ShowAboutDialog()));
connect(m_ui->browseButton, SIGNAL(clicked()), SLOT(BrowseForFile()));
connect(m_ui->lookupButton, &QPushButton::clicked, this, &MainWindow::LookupFile);
connect(m_ui->action_about_musiccollection, SIGNAL(triggered()), SLOT(ShowAboutDialog()));
connect(m_ui->action_about_qt, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
connect(m_ui->actionExit, SIGNAL(triggered()), qApp, SLOT(quit()));
// Set icons
m_ui->action_about_musiccollection->setIcon(QIcon(":/icon.png"));
m_ui->action_about_qt->setIcon(QIcon(":/qt-project.org/qmessagebox/images/qtlogo-64.png"));
}
MainWindow::~MainWindow()
......
......@@ -17,7 +17,11 @@
</sizepolicy>
</property>
<property name="windowTitle">
<string>MainWindow</string>
<string>MusicCollection</string>
</property>
<property name="windowIcon">
<iconset resource="../../data/data.qrc">
<normaloff>:/icon.png</normaloff>:/icon.png</iconset>
</property>
<widget class="QWidget" name="centralWidget">
<widget class="QGroupBox" name="groupBox">
......@@ -85,19 +89,6 @@
</property>
</widget>
</widget>
<widget class="QPushButton" name="aboutButton">
<property name="geometry">
<rect>
<x>490</x>
<y>360</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>About...</string>
</property>
</widget>
</widget>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">
......@@ -108,6 +99,21 @@
<height>18</height>
</rect>
</property>
<widget class="QMenu" name="menuHelp">
<property name="title">
<string>Help</string>
</property>
<addaction name="action_about_musiccollection"/>
<addaction name="action_about_qt"/>
</widget>
<widget class="QMenu" name="menuFile">
<property name="title">
<string>File</string>
</property>
<addaction name="actionExit"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuHelp"/>
</widget>
<widget class="QToolBar" name="mainToolBar">
<attribute name="toolBarArea">
......@@ -118,8 +124,28 @@
</attribute>
</widget>
<widget class="QStatusBar" name="statusBar"/>
<action name="action_about_qt">
<property name="text">
<string>About Qt...</string>
</property>
</action>
<action name="action_about_musiccollection">
<property name="text">
<string>About MusicCollection...</string>
</property>
</action>
<action name="actionExit">
<property name="text">
<string>Exit</string>
</property>
<property name="shortcut">
<string>Ctrl+Q</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources/>
<resources>
<include location="../../data/data.qrc"/>
</resources>
<connections/>
</ui>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment