Skip to content

Commit

Permalink
Minor UI changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
chirs241097 committed Apr 21, 2016
1 parent 32568af commit 7457599
Show file tree
Hide file tree
Showing 4 changed files with 393 additions and 353 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2016-04-21 0.7.2 beta
Minor change to the main window.
Added "click to copy" to the file information window.

2016-04-20 0.7.2 beta
UI refinements:
Use Qt layouts in most of the dialogs.
Expand Down
18 changes: 18 additions & 0 deletions qmidiplayer-desktop/qmpinfowindow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,29 @@
#define QMPINFOWINDOW_HPP

#include <QDialog>
#include <QLabel>
#include <QMouseEvent>
#include <QApplication>
#include <QClipboard>

namespace Ui {
class qmpInfoWindow;
}

class QClickableLabel : public QLabel
{
Q_OBJECT
public:
explicit QClickableLabel(QWidget *parent=0):QLabel(parent){}
protected:
void mousePressEvent(QMouseEvent *e)
{
QLabel::mousePressEvent(e);
if(e->buttons()&Qt::LeftButton)
QApplication::clipboard()->setText(text());
}
};

class qmpInfoWindow : public QDialog
{
Q_OBJECT
Expand Down
23 changes: 15 additions & 8 deletions qmidiplayer-desktop/qmpinfowindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="lbFileName">
<widget class="QClickableLabel" name="lbFileName">
<property name="text">
<string>File name: </string>
</property>
Expand All @@ -30,21 +30,21 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="lbTempo">
<widget class="QClickableLabel" name="lbTempo">
<property name="text">
<string>Tempo: </string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lbKeySig">
<widget class="QClickableLabel" name="lbKeySig">
<property name="text">
<string>Key Sig.: </string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lbTimeSig">
<widget class="QClickableLabel" name="lbTimeSig">
<property name="text">
<string>Time Sig.:</string>
</property>
Expand All @@ -53,14 +53,14 @@
</layout>
</item>
<item>
<widget class="QLabel" name="lbTitle">
<widget class="QClickableLabel" name="lbTitle">
<property name="text">
<string>Title: </string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lbCopyright">
<widget class="QClickableLabel" name="lbCopyright">
<property name="text">
<string>Copyright: </string>
</property>
Expand All @@ -69,14 +69,14 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="lbNoteCount">
<widget class="QClickableLabel" name="lbNoteCount">
<property name="text">
<string>Note count: </string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lbFileStandard">
<widget class="QClickableLabel" name="lbFileStandard">
<property name="text">
<string>File standard: </string>
</property>
Expand All @@ -86,6 +86,13 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QClickableLabel</class>
<extends>QLabel</extends>
<header>qmpinfowindow.hpp</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
Loading

0 comments on commit 7457599

Please sign in to comment.