Initial structure. New abstract levels: dataobjecst, storage
authorNikolay Tischenko <niktischenko@gmail.com>
Sat, 4 Sep 2010 13:10:47 +0000 (20:10 +0700)
committerNikolay Tischenko <niktischenko@gmail.com>
Sat, 4 Sep 2010 13:10:47 +0000 (20:10 +0700)
23 files changed:
someplayer.pro
someplayer.pro.user
src/dbstorage.cpp [new file with mode: 0644]
src/dbstorage.h [new file with mode: 0644]
src/filestorage.cpp [new file with mode: 0644]
src/filestorage.h [new file with mode: 0644]
src/library.cpp [new file with mode: 0644]
src/library.h [new file with mode: 0644]
src/main.cpp
src/mainwindow.cpp
src/mainwindow.h
src/player.cpp [new file with mode: 0644]
src/player.h [new file with mode: 0644]
src/playlist.cpp [new file with mode: 0644]
src/playlist.h [new file with mode: 0644]
src/someplayer.h [new file with mode: 0644]
src/storage.cpp [new file with mode: 0644]
src/storage.h [new file with mode: 0644]
src/track.cpp [new file with mode: 0644]
src/track.h [new file with mode: 0644]
src/trackmetainformation.cpp [new file with mode: 0644]
src/trackmetainformation.h [new file with mode: 0644]
src/ui/mainwindow.ui

index 27ee601..2a3ceb9 100644 (file)
@@ -4,16 +4,33 @@
 #
 #-------------------------------------------------
 
 #
 #-------------------------------------------------
 
-QT       += core gui
+QT       += core gui phonon
 
 TARGET = someplayer
 TEMPLATE = app
 
 
 SOURCES += src/main.cpp\
 
 TARGET = someplayer
 TEMPLATE = app
 
 
 SOURCES += src/main.cpp\
-        src/mainwindow.cpp
-
-HEADERS  += src/mainwindow.h
+        src/mainwindow.cpp \
+        src/player.cpp \
+        src/track.cpp \
+    src/trackmetainformation.cpp \
+    src/playlist.cpp \
+    src/library.cpp \
+    src/storage.cpp \
+    src/filestorage.cpp \
+    src/dbstorage.cpp
+
+HEADERS  += src/mainwindow.h \
+        src/player.h \
+        src/track.h \
+    src/trackmetainformation.h \
+    src/playlist.h \
+    src/someplayer.h \
+    src/library.h \
+    src/storage.h \
+    src/filestorage.h \
+    src/dbstorage.h
 
 FORMS    += src/ui/mainwindow.ui
 
 
 FORMS    += src/ui/mainwindow.ui
 
index 37e020b..ff27c4c 100644 (file)
@@ -2,7 +2,7 @@
 <qtcreator>
  <data>
   <variable>ProjectExplorer.Project.ActiveTarget</variable>
 <qtcreator>
  <data>
   <variable>ProjectExplorer.Project.ActiveTarget</variable>
-  <value type="int">2</value>
+  <value type="int">1</value>
  </data>
  <data>
   <variable>ProjectExplorer.Project.EditorSettings</variable>
  </data>
  <data>
   <variable>ProjectExplorer.Project.EditorSettings</variable>
   <valuemap type="QVariantMap">
    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Maemo</value>
    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.MaemoDeviceTarget</value>
   <valuemap type="QVariantMap">
    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Maemo</value>
    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.MaemoDeviceTarget</value>
-   <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">0</value>
+   <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">1</value>
    <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
    <valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
     <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
    <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
    <valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
     <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
      <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
      <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MaemoPackageCreationStep</value>
      <valuelist key="Qt4ProjectManager.BuildStep.MaemoPackage.LocalFiles" type="QVariantList"/>
      <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
      <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MaemoPackageCreationStep</value>
      <valuelist key="Qt4ProjectManager.BuildStep.MaemoPackage.LocalFiles" type="QVariantList"/>
-     <value key="Qt4ProjectManager.BuildStep.MaemoPackage.Modified" type="bool">true</value>
-     <value key="Qt4ProjectManager.BuildStep.MaemoPackage.RemoteExe" type="QString"></value>
+     <value key="Qt4ProjectManager.BuildStep.MaemoPackage.Modified" type="bool">false</value>
+     <value key="Qt4ProjectManager.BuildStep.MaemoPackage.RemoteExe" type="QString">/usr/local/bin/someplayer</value>
      <valuelist key="Qt4ProjectManager.BuildStep.MaemoPackage.RemoteFiles" type="QVariantList"/>
     </valuemap>
     <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">3</value>
      <valuelist key="Qt4ProjectManager.BuildStep.MaemoPackage.RemoteFiles" type="QVariantList"/>
     </valuemap>
     <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">3</value>
      <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
      <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MaemoPackageCreationStep</value>
      <valuelist key="Qt4ProjectManager.BuildStep.MaemoPackage.LocalFiles" type="QVariantList"/>
      <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
      <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MaemoPackageCreationStep</value>
      <valuelist key="Qt4ProjectManager.BuildStep.MaemoPackage.LocalFiles" type="QVariantList"/>
-     <value key="Qt4ProjectManager.BuildStep.MaemoPackage.Modified" type="bool">true</value>
-     <value key="Qt4ProjectManager.BuildStep.MaemoPackage.RemoteExe" type="QString"></value>
+     <value key="Qt4ProjectManager.BuildStep.MaemoPackage.Modified" type="bool">false</value>
+     <value key="Qt4ProjectManager.BuildStep.MaemoPackage.RemoteExe" type="QString">/opt/someplayer/someplayer</value>
      <valuelist key="Qt4ProjectManager.BuildStep.MaemoPackage.RemoteFiles" type="QVariantList"/>
     </valuemap>
     <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">3</value>
      <valuelist key="Qt4ProjectManager.BuildStep.MaemoPackage.RemoteFiles" type="QVariantList"/>
     </valuemap>
     <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">3</value>
    <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">2</value>
    <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
     <value key=".ProFile" type="QString">someplayer.pro</value>
    <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">2</value>
    <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
     <value key=".ProFile" type="QString">someplayer.pro</value>
-    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">New Maemo Run Configuration</value>
+    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">N900</value>
     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MaemoRunConfiguration</value>
     <valuelist key="Qt4ProjectManager.MaemoRunConfiguration.Arguments" type="QVariantList"/>
     <valuemap key="Qt4ProjectManager.MaemoRunConfiguration.DebuggingHelpersLastDeployed" type="QVariantMap"/>
     <value key="Qt4ProjectManager.MaemoRunConfiguration.DeviceId" type="qulonglong">1</value>
     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MaemoRunConfiguration</value>
     <valuelist key="Qt4ProjectManager.MaemoRunConfiguration.Arguments" type="QVariantList"/>
     <valuemap key="Qt4ProjectManager.MaemoRunConfiguration.DebuggingHelpersLastDeployed" type="QVariantMap"/>
     <value key="Qt4ProjectManager.MaemoRunConfiguration.DeviceId" type="qulonglong">1</value>
-    <valuemap key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployed" type="QVariantMap"/>
+    <valuemap key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployed" type="QVariantMap">
+     <value key="192.168.77.2" type="QDateTime">2010-09-04T19:46:35</value>
+    </valuemap>
    </valuemap>
    <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
   </valuemap>
    </valuemap>
    <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
   </valuemap>
diff --git a/src/dbstorage.cpp b/src/dbstorage.cpp
new file mode 100644 (file)
index 0000000..764f616
--- /dev/null
@@ -0,0 +1 @@
+#include "dbstorage.h"
diff --git a/src/dbstorage.h b/src/dbstorage.h
new file mode 100644 (file)
index 0000000..21f0572
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef DB_STORAGE
+#define DB_STORAGE
+
+#include "someplayer.h"
+#include "storage.h"
+
+// represents database storage
+// it store date into some database (e.g. tracks)
+
+namespace SomePlayer {
+       namespace Storage {
+
+               class DbStorage : public Storage {
+               };
+       };
+};
+
+#endif
diff --git a/src/filestorage.cpp b/src/filestorage.cpp
new file mode 100644 (file)
index 0000000..966af8c
--- /dev/null
@@ -0,0 +1 @@
+#include "filestorage.h"
diff --git a/src/filestorage.h b/src/filestorage.h
new file mode 100644 (file)
index 0000000..bc9c803
--- /dev/null
@@ -0,0 +1,19 @@
+#ifndef FILE_STORAGE
+#define FILE_STORAGE
+
+#include "someplayer.h"
+#include "storage.h"
+
+// represents file-level storage
+// it store data into separate files (e.g. playlist)
+
+namespace SomePlayer {
+       namespace Storage {
+
+               class FileStorage : public Storage {
+               };
+
+       };
+};
+
+#endif
diff --git a/src/library.cpp b/src/library.cpp
new file mode 100644 (file)
index 0000000..6d25561
--- /dev/null
@@ -0,0 +1 @@
+#include "library.h"
diff --git a/src/library.h b/src/library.h
new file mode 100644 (file)
index 0000000..b98aabe
--- /dev/null
@@ -0,0 +1,19 @@
+#ifndef LIBRARY
+#define LIBRARY
+
+#include "someplayer.h"
+
+// represents media library: tracks, playlists
+// it uses different media storages for tracks and playlists
+// but dinamyc playlits will be stored with tracks into the same storage
+
+namespace SomePlayer {
+       namespace DataObjects {
+
+               class Library {
+               };
+
+       };
+};
+
+#endif
index 5360a7c..68544fe 100644 (file)
@@ -3,13 +3,14 @@
 
 int main(int argc, char *argv[])
 {
 
 int main(int argc, char *argv[])
 {
-    QApplication a(argc, argv);
-    MainWindow w;
+       QApplication a(argc, argv);
+       a.setApplicationName("someplayer");
+       MainWindow w;
 #if defined(Q_WS_S60)
 #if defined(Q_WS_S60)
-    w.showMaximized();
+       w.showMaximized();
 #else
 #else
-    w.show();
+       w.show();
 #endif
 
 #endif
 
-    return a.exec();
+       return a.exec();
 }
 }
index 49d64fc..67141bc 100644 (file)
@@ -1,14 +1,26 @@
 #include "mainwindow.h"
 #include "ui_mainwindow.h"
 #include "mainwindow.h"
 #include "ui_mainwindow.h"
+#include <QFileDialog>
+#include <QMessageBox>
+#include "player.h"
 
 MainWindow::MainWindow(QWidget *parent) :
 
 MainWindow::MainWindow(QWidget *parent) :
-    QMainWindow(parent),
-    ui(new Ui::MainWindow)
+       QMainWindow(parent),
+       ui(new Ui::MainWindow)
 {
 {
-    ui->setupUi(this);
+       ui->setupUi(this);
+       connect(ui->actionOpen, SIGNAL(triggered()), this, SLOT(openMedia()));
+       player = new Player();
 }
 
 MainWindow::~MainWindow()
 {
 }
 
 MainWindow::~MainWindow()
 {
-    delete ui;
+       delete ui;
+}
+
+void MainWindow::openMedia()
+{
+       QString filename = QFileDialog::getOpenFileName(this, "Open media", "/home/user/");
+       player->playSong(filename);
+
 }
 }
index c9fd6a9..1a9e1f4 100644 (file)
@@ -2,21 +2,26 @@
 #define MAINWINDOW_H
 
 #include <QMainWindow>
 #define MAINWINDOW_H
 
 #include <QMainWindow>
+#include "player.h"
 
 namespace Ui {
 
 namespace Ui {
-    class MainWindow;
+       class MainWindow;
 }
 
 class MainWindow : public QMainWindow
 {
 }
 
 class MainWindow : public QMainWindow
 {
-    Q_OBJECT
+       Q_OBJECT
 
 public:
 
 public:
-    explicit MainWindow(QWidget *parent = 0);
-    ~MainWindow();
+       explicit MainWindow(QWidget *parent = 0);
+       ~MainWindow();
 
 private:
 
 private:
-    Ui::MainWindow *ui;
+       Ui::MainWindow *ui;
+       Player *player;
+
+public slots:
+       void openMedia();
 };
 
 #endif // MAINWINDOW_H
 };
 
 #endif // MAINWINDOW_H
diff --git a/src/player.cpp b/src/player.cpp
new file mode 100644 (file)
index 0000000..2b1caaa
--- /dev/null
@@ -0,0 +1,18 @@
+#include "player.h"
+
+Player::Player() : QObject()
+{
+object = new Phonon::MediaObject(this);
+       output = new Phonon::AudioOutput(Phonon::MusicCategory, this);
+       Phonon::createPath(object, output);
+}
+
+Player::~Player()
+{
+}
+
+void Player::playSong(QString filename)
+{
+       object->setCurrentSource(Phonon::MediaSource(filename));
+       object->play();
+}
diff --git a/src/player.h b/src/player.h
new file mode 100644 (file)
index 0000000..0350e02
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef PLAYER_H
+#define PLAYER_H
+#include <QObject>
+#include <phonon/audiooutput.h>
+#include <phonon/seekslider.h>
+#include <phonon/mediaobject.h>
+#include <phonon/volumeslider.h>
+#include <phonon/backendcapabilities.h>
+
+class Player : public QObject
+{
+       Q_OBJECT
+public:
+       explicit Player();
+       ~Player();
+private:
+       Phonon::MediaObject *object;
+       Phonon::AudioOutput *output;
+
+public slots:
+       void playSong(QString filename);
+};
+
+#endif // PLAYER_H
diff --git a/src/playlist.cpp b/src/playlist.cpp
new file mode 100644 (file)
index 0000000..86a4ae6
--- /dev/null
@@ -0,0 +1,25 @@
+#include "playlist.h"
+
+using namespace SomePlayer::DataObjects;
+
+Playlist::Playlist()
+{
+       _name = "New playlist";
+}
+
+QString Playlist::name() const {
+       return _name;
+}
+
+QList<Track> Playlist::tracks() const {
+       return _tracks;
+}
+
+void Playlist::setName(QString name) {
+       _name = name;
+}
+
+void Playlist::addTrack(Track track) {
+       _tracks.append(track);
+}
+
diff --git a/src/playlist.h b/src/playlist.h
new file mode 100644 (file)
index 0000000..6898eae
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef PLAYLIST
+#define PLAYLIST
+
+#include <QString>
+#include <QList>
+#include "track.h"
+#include "someplayer.h"
+
+// represents playlist: list of tracks, name
+
+namespace SomePlayer {
+       namespace DataObjects {
+               class Playlist {
+               public:
+                       Playlist();
+
+                       QString name() const;
+                       QList<Track> tracks() const;
+
+                       void setName(QString name);
+                       void addTrack(Track track);
+
+               private:
+                       QString _name;
+                       QList<Track> _tracks;
+               };
+       };
+};
+
+#endif
diff --git a/src/someplayer.h b/src/someplayer.h
new file mode 100644 (file)
index 0000000..3213fea
--- /dev/null
@@ -0,0 +1,13 @@
+#ifndef SOMEPLAYER
+#define SOMEPLAYER
+
+// common settings, constants and so on
+
+namespace SomePlayer {
+       namespace DataObjects {
+       };
+       namespace Storage {
+       };
+};
+
+#endif
diff --git a/src/storage.cpp b/src/storage.cpp
new file mode 100644 (file)
index 0000000..85252e6
--- /dev/null
@@ -0,0 +1 @@
+#include "storage.h"
diff --git a/src/storage.h b/src/storage.h
new file mode 100644 (file)
index 0000000..5f66bb1
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef STORAGE
+#define STORAGE
+
+#include "someplayer.h"
+
+// represent abstract storage
+// abstract class
+
+namespace SomePlayer{
+       namespace Storage {
+
+               class Storage {
+               };
+
+       };
+};
+
+#endif
diff --git a/src/track.cpp b/src/track.cpp
new file mode 100644 (file)
index 0000000..728056c
--- /dev/null
@@ -0,0 +1,23 @@
+#include "track.h"
+
+using namespace SomePlayer::DataObjects;
+
+Track::Track() {
+}
+
+Track::Track(TrackMetadata metadata, QUrl source) {
+       _metadata = metadata;
+       _source = source;
+}
+
+TrackMetadata Track::metadata() {
+       return _metadata;
+}
+
+QUrl Track::source() const {
+       return _source;
+}
+
+void Track::setSource(QUrl source) {
+       _source = source;
+}
diff --git a/src/track.h b/src/track.h
new file mode 100644 (file)
index 0000000..36c2278
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef TRACK_H
+#define TRACK_H
+
+#include "someplayer.h"
+#include "trackmetainformation.h"
+#include <QUrl>
+
+// represents some track: metainformation + source url
+
+namespace SomePlayer {
+       namespace DataObjects {
+
+               class Track
+               {
+               public:
+                       Track();
+                       Track(TrackMetadata metadata, QUrl source);
+                       TrackMetadata metadata(); //read-write
+                       QUrl source() const;
+                       void setSource (QUrl source);
+
+               private:
+                       TrackMetadata _metadata;
+                       QUrl _source;
+               };
+
+       };
+};
+
+
+#endif // TRACK_H
diff --git a/src/trackmetainformation.cpp b/src/trackmetainformation.cpp
new file mode 100644 (file)
index 0000000..0ef9e5c
--- /dev/null
@@ -0,0 +1,61 @@
+#include "trackmetainformation.h"
+
+using namespace SomePlayer::DataObjects;
+
+TrackMetadata::TrackMetadata() {
+}
+
+TrackMetadata::TrackMetadata(QString title = "", QString artist = "", QString album = "", QString genre = "") {
+       _metadata["TITLE"] = title;
+       _metadata["ARTIST"] = artist;
+       _metadata["ALBUM"] = album;
+       _metadata["GENRE"] = genre;
+}
+
+QString TrackMetadata::title() {
+       if (_metadata.contains("TITLE")) {
+               return _metadata["TITLE"];
+       } else {
+               return "Unknown title";
+       }
+}
+
+QString TrackMetadata::artist() {
+       if (_metadata.contains("ARTIST")) {
+               return _metadata["ARTIST"];
+       } else {
+               return "Unknown artist";
+       }
+}
+
+QString TrackMetadata::album() {
+       if (_metadata.contains("ALBUM")) {
+               return _metadata["ALBUM"];
+       } else {
+               return "Unknown album";
+       }
+}
+
+QString TrackMetadata::genre() {
+       if (_metadata.contains("GENRE")) {
+               return _metadata["GENRE"];
+       } else {
+               return "Unknown genre";
+       }
+}
+
+void TrackMetadata::setTitle(QString title) {
+       _metadata["TITLE"] = title;
+}
+
+void TrackMetadata::setArtist(QString artist) {
+       _metadata["ARTIST"] = artist;
+}
+
+void TrackMetadata::setAlbum(QString album) {
+       _metadata["ALBUM"] = album;
+}
+
+void TrackMetadata::setGenre(QString genre) {
+       _metadata["GENRE"] = genre;
+}
diff --git a/src/trackmetainformation.h b/src/trackmetainformation.h
new file mode 100644 (file)
index 0000000..2010fa4
--- /dev/null
@@ -0,0 +1,35 @@
+#ifndef TRACK_METAINFORMATION
+#define TRACK_METAINFORMATION
+
+#include <QString>
+#include <QMap>
+#include "someplayer.h"
+
+// represents track metainformation only.
+// now it contains TITLE, ARTIST, ALBUM, GENRE
+
+namespace SomePlayer {
+       namespace DataObjects {
+               class TrackMetadata {
+
+               public:
+                       TrackMetadata();
+                       TrackMetadata(QString title, QString artist, QString album, QString genre);
+
+                       QString title();
+                       QString artist();
+                       QString album();
+                       QString genre();
+
+                       void setTitle(QString title);
+                       void setArtist(QString artist);
+                       void setAlbum(QString album);
+                       void setGenre(QString genre);
+
+               private:
+                       QMap<QString, QString> _metadata;
+               };
+       };
+};
+
+#endif
index 7ebf873..38afdfc 100644 (file)
@@ -1,7 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <ui version="4.0">
  <class>MainWindow</class>
 <ui version="4.0">
  <class>MainWindow</class>
- <widget class="QMainWindow" name="MainWindow" >
-  <property name="geometry" >
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
    <rect>
     <x>0</x>
     <y>0</y>
     <height>480</height>
    </rect>
   </property>
     <height>480</height>
    </rect>
   </property>
-  <property name="windowTitle" >
-   <string>MainWindow</string>
+  <property name="windowTitle">
+   <string>someplayer</string>
   </property>
   </property>
-  <widget class="QWidget" name="centralWidget" />
+  <widget class="QWidget" name="centralWidget"/>
+  <widget class="QMenuBar" name="menuBar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>800</width>
+     <height>23</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menuFile">
+    <property name="title">
+     <string>File</string>
+    </property>
+    <addaction name="actionOpen"/>
+   </widget>
+   <addaction name="menuFile"/>
+  </widget>
+  <action name="actionOpen">
+   <property name="text">
+    <string>Open media</string>
+   </property>
+  </action>
+  <action name="actionQuit">
+   <property name="text">
+    <string>Quit</string>
+   </property>
+  </action>
  </widget>
  </widget>
- <layoutDefault spacing="6" margin="11" />
- <pixmapfunction></pixmapfunction>
+ <layoutdefault spacing="6" margin="11"/>
  <resources/>
  <resources/>
- <connections/>
+ <connections>
+  <connection>
+   <sender>actionQuit</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>399</x>
+     <y>239</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
 </ui>
 </ui>