About box
This commit is contained in:
parent
8dd3242cd6
commit
d9727f2731
14
src/about.cpp
Normal file
14
src/about.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include "about.h"
|
||||
#include "ui_about.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
About::About(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
ui_.setupUi(this);
|
||||
|
||||
setWindowTitle("About " + QCoreApplication::applicationName());
|
||||
ui_.title->setText(QCoreApplication::applicationName());
|
||||
ui_.version->setText("Version " + QCoreApplication::applicationVersion());
|
||||
}
|
17
src/about.h
Normal file
17
src/about.h
Normal file
@ -0,0 +1,17 @@
|
||||
#ifndef ABOUT_H
|
||||
#define ABOUT_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
#include "ui_about.h"
|
||||
|
||||
class About : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
About(QWidget* parent = 0);
|
||||
|
||||
private:
|
||||
Ui::About ui_;
|
||||
};
|
||||
|
||||
#endif // ABOUT_H
|
188
src/about.ui
Normal file
188
src/about.ui
Normal file
@ -0,0 +1,188 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>About</class>
|
||||
<widget class="QDialog" name="About">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>488</width>
|
||||
<height>415</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#line {
|
||||
color: lightgrey;
|
||||
}
|
||||
|
||||
#title {
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
#version {
|
||||
font-style: italic;
|
||||
font-size: 10px;
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../data/data.qrc">:/icon.png</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>64</height>
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="title">
|
||||
<property name="text">
|
||||
<string>Title</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="version">
|
||||
<property name="text">
|
||||
<string>Version</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextBrowser" name="textBrowser">
|
||||
<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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://code.google.com/p/clementine-player/"><span style=" text-decoration: underline; color:#0057ae;">http://code.google.com/p/clementine-player/</span></a></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;"></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-weight:600;">Authors:</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">David Sansome &lt;<a href="mailto:me@davidsansome.com"><span style=" text-decoration: underline; color:#0057ae;">me@davidsansome.com</span></a>&gt;</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;"></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-weight:600;">Thanks to:</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Mark Kretschmann &lt;<a href="mailto:markey@web.de"><span style=" text-decoration: underline; color:#0057ae;">markey@web.de</span></a>&gt;</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Max Howell &lt;<a href="mailto:max.howell@methylblue.com"><span style=" text-decoration: underline; color:#0057ae;">max.howell@methylblue.com</span></a>&gt;</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">... and all the Amarok contributors</p></body></html></string>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Close</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../data/data.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>About</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>About</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
@ -14,6 +14,7 @@
|
||||
#include "multiloadingindicator.h"
|
||||
#include "settingsdialog.h"
|
||||
#include "libraryconfigdialog.h"
|
||||
#include "about.h"
|
||||
|
||||
#include "qxtglobalshortcut.h"
|
||||
|
||||
@ -41,6 +42,7 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
edit_tag_dialog_(new EditTagDialog(this)),
|
||||
multi_loading_indicator_(new MultiLoadingIndicator(this)),
|
||||
library_config_dialog_(new LibraryConfigDialog(this)),
|
||||
about_dialog_(new About(this)),
|
||||
radio_model_(new RadioModel(this)),
|
||||
playlist_(new Playlist(this)),
|
||||
player_(new Player(playlist_, radio_model_->GetLastFMService(), this)),
|
||||
@ -96,6 +98,7 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
connect(ui_.action_clear_playlist, SIGNAL(triggered()), playlist_, SLOT(Clear()));
|
||||
connect(ui_.action_edit_track, SIGNAL(triggered()), SLOT(EditTracks()));
|
||||
connect(ui_.action_configure, SIGNAL(triggered()), settings_dialog_, SLOT(show()));
|
||||
connect(ui_.action_about, SIGNAL(triggered()), about_dialog_, SLOT(show()));
|
||||
|
||||
// Give actions to buttons
|
||||
ui_.forward_button->setDefaultAction(ui_.action_next_track);
|
||||
|
@ -18,6 +18,7 @@ class TrackSlider;
|
||||
class EditTagDialog;
|
||||
class MultiLoadingIndicator;
|
||||
class SettingsDialog;
|
||||
class About;
|
||||
|
||||
class QSortFilterProxyModel;
|
||||
class SystemTrayIcon;
|
||||
@ -82,6 +83,7 @@ class MainWindow : public QMainWindow {
|
||||
EditTagDialog* edit_tag_dialog_;
|
||||
MultiLoadingIndicator* multi_loading_indicator_;
|
||||
LibraryConfigDialog* library_config_dialog_;
|
||||
About* about_dialog_;
|
||||
|
||||
RadioModel* radio_model_;
|
||||
Playlist* playlist_;
|
||||
|
@ -52,7 +52,8 @@ SOURCES += main.cpp \
|
||||
settingsdialog.cpp \
|
||||
librarydirectorymodel.cpp \
|
||||
libraryconfigdialog.cpp \
|
||||
lastfmconfigdialog.cpp
|
||||
lastfmconfigdialog.cpp \
|
||||
about.cpp
|
||||
HEADERS += mainwindow.h \
|
||||
player.h \
|
||||
library.h \
|
||||
@ -105,7 +106,8 @@ HEADERS += mainwindow.h \
|
||||
settingsdialog.h \
|
||||
librarydirectorymodel.h \
|
||||
libraryconfigdialog.h \
|
||||
lastfmconfigdialog.h
|
||||
lastfmconfigdialog.h \
|
||||
about.h
|
||||
FORMS += mainwindow.ui \
|
||||
libraryconfig.ui \
|
||||
fileview.ui \
|
||||
@ -116,7 +118,8 @@ FORMS += mainwindow.ui \
|
||||
multiloadingindicator.ui \
|
||||
settingsdialog.ui \
|
||||
libraryconfigdialog.ui \
|
||||
lastfmconfigdialog.ui
|
||||
lastfmconfigdialog.ui \
|
||||
about.ui
|
||||
RESOURCES += ../data/data.qrc
|
||||
OTHER_FILES += ../data/schema.sql \
|
||||
../data/mainwindow.css
|
||||
|
Loading…
x
Reference in New Issue
Block a user