aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop
diff options
context:
space:
mode:
Diffstat (limited to 'qmidiplayer-desktop')
-rw-r--r--qmidiplayer-desktop/qmpchanneleditor.cpp2
-rw-r--r--qmidiplayer-desktop/qmpchannelswindow.cpp2
-rw-r--r--qmidiplayer-desktop/qmpefxwindow.cpp2
-rw-r--r--qmidiplayer-desktop/qmphelpwindow.cpp2
-rw-r--r--qmidiplayer-desktop/qmpinfowindow.cpp2
-rw-r--r--qmidiplayer-desktop/qmpmainwindow.cpp4
-rw-r--r--qmidiplayer-desktop/qmpmainwindow.ui1035
-rw-r--r--qmidiplayer-desktop/qmpplistwindow.cpp2
-rw-r--r--qmidiplayer-desktop/qmpplugin.cpp17
-rw-r--r--qmidiplayer-desktop/qmpplugin.hpp4
-rw-r--r--qmidiplayer-desktop/qmpsettingswindow.cpp2
11 files changed, 547 insertions, 527 deletions
diff --git a/qmidiplayer-desktop/qmpchanneleditor.cpp b/qmidiplayer-desktop/qmpchanneleditor.cpp
index 206a2fa..2c58793 100644
--- a/qmidiplayer-desktop/qmpchanneleditor.cpp
+++ b/qmidiplayer-desktop/qmpchanneleditor.cpp
@@ -8,6 +8,8 @@ qmpChannelEditor::qmpChannelEditor(QWidget *parent) :
ui(new Ui::qmpChannelEditor)
{
ui->setupUi(this);ch=0;
+ int w=size().width(),h=size().height();w=w*(logicalDpiX()/96.);h=h*(logicalDpiY()/96.);
+ setMaximumWidth(w);setMaximumHeight(h);setMinimumWidth(w);setMinimumHeight(h);
styl=new QDialSkulptureStyle();
QList<QDial*> dials=findChildren<QDial*>();
for(int i=0;i<dials.count();++i)
diff --git a/qmidiplayer-desktop/qmpchannelswindow.cpp b/qmidiplayer-desktop/qmpchannelswindow.cpp
index e0a1522..a692852 100644
--- a/qmidiplayer-desktop/qmpchannelswindow.cpp
+++ b/qmidiplayer-desktop/qmpchannelswindow.cpp
@@ -11,6 +11,8 @@ qmpChannelsWindow::qmpChannelsWindow(QWidget *parent) :
ui(new Ui::qmpChannelsWindow)
{
ui->setupUi(this);
+ int w=size().width(),h=size().height();w=w*(logicalDpiX()/96.);h=h*(logicalDpiY()/96.);
+ setMaximumWidth(w);setMaximumHeight(h);setMinimumWidth(w);setMinimumHeight(h);
pselectw=new qmpPresetSelector(this);
ceditw=new qmpChannelEditor(this);
connect(this,SIGNAL(dialogClosing()),parent,SLOT(dialogClosed()));
diff --git a/qmidiplayer-desktop/qmpefxwindow.cpp b/qmidiplayer-desktop/qmpefxwindow.cpp
index 7d9c08e..25e9bf4 100644
--- a/qmidiplayer-desktop/qmpefxwindow.cpp
+++ b/qmidiplayer-desktop/qmpefxwindow.cpp
@@ -12,6 +12,8 @@ qmpEfxWindow::qmpEfxWindow(QWidget *parent) :
QList<QDial*> dials=findChildren<QDial*>();
for(int i=0;i<dials.count();++i)
dials.at(i)->setStyle(styl);
+ int w=size().width(),h=size().height();w=w*(logicalDpiX()/96.);h=h*(logicalDpiY()/96.);
+ setMaximumWidth(w);setMaximumHeight(h);setMinimumWidth(w);setMinimumHeight(h);
connect(this,SIGNAL(dialogClosing()),parent,SLOT(dialogClosed()));
//stub. read these from settings after the setting module is implemented
QSettings *settings=qmpSettingsWindow::getSettingsIntf();
diff --git a/qmidiplayer-desktop/qmphelpwindow.cpp b/qmidiplayer-desktop/qmphelpwindow.cpp
index 69e29d0..e3d2897 100644
--- a/qmidiplayer-desktop/qmphelpwindow.cpp
+++ b/qmidiplayer-desktop/qmphelpwindow.cpp
@@ -7,6 +7,8 @@ qmpHelpWindow::qmpHelpWindow(QWidget *parent) :
ui(new Ui::qmpHelpWindow)
{
ui->setupUi(this);
+ int w=size().width(),h=size().height();w=w*(logicalDpiX()/96.);h=h*(logicalDpiY()/96.);
+ setMaximumWidth(w);setMaximumHeight(h);setMinimumWidth(w);setMinimumHeight(h);
ui->textBrowser->setSearchPaths(QStringList(QString(":/doc"))+QStringList(QString(":/img")));
ui->textBrowser->setSource(QUrl("qrc:///doc/index_internal.html"));
}
diff --git a/qmidiplayer-desktop/qmpinfowindow.cpp b/qmidiplayer-desktop/qmpinfowindow.cpp
index 95ad223..a4afd50 100644
--- a/qmidiplayer-desktop/qmpinfowindow.cpp
+++ b/qmidiplayer-desktop/qmpinfowindow.cpp
@@ -13,6 +13,8 @@ qmpInfoWindow::qmpInfoWindow(QWidget *parent) :
ui(new Ui::qmpInfoWindow)
{
ui->setupUi(this);
+ int w=size().width(),h=size().height();w=w*(logicalDpiX()/96.);h=h*(logicalDpiY()/96.);
+ setMaximumWidth(w);setMaximumHeight(h);setMinimumWidth(w);setMinimumHeight(h);
}
qmpInfoWindow::~qmpInfoWindow()
diff --git a/qmidiplayer-desktop/qmpmainwindow.cpp b/qmidiplayer-desktop/qmpmainwindow.cpp
index f634375..c81816c 100644
--- a/qmidiplayer-desktop/qmpmainwindow.cpp
+++ b/qmidiplayer-desktop/qmpmainwindow.cpp
@@ -52,7 +52,9 @@ qmpMainWindow::qmpMainWindow(QWidget *parent) :
{
ui->setupUi(this);
ui->lnPolyphone->display("00000-00000");
- ui->lbFileName->setText("");ref=this;
+ ui->lbFileName->setText("");ref=this;ui->verticalLayout->setAlignment(ui->pushButton,Qt::AlignRight);
+ int w=size().width(),h=size().height();w=w*(logicalDpiX()/96.);h=h*(logicalDpiY()/96.);
+ setMaximumWidth(w);setMaximumHeight(h);setMinimumWidth(w);setMinimumHeight(h);
playing=false;stopped=true;dragging=false;memset(VIs,0,sizeof(VIs));
settingsw=new qmpSettingsWindow(this);pmgr=new qmpPluginManager();
plistw=new qmpPlistWindow(this);player=NULL;timer=NULL;
diff --git a/qmidiplayer-desktop/qmpmainwindow.ui b/qmidiplayer-desktop/qmpmainwindow.ui
index 69a3496..9b4f3c3 100644
--- a/qmidiplayer-desktop/qmpmainwindow.ui
+++ b/qmidiplayer-desktop/qmpmainwindow.ui
@@ -33,525 +33,528 @@
<normaloff>:/img/qmidiplyr.png</normaloff>:/img/qmidiplyr.png</iconset>
</property>
<widget class="QWidget" name="centralWidget">
- <widget class="QPushButton" name="pushButton">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>21</width>
- <height>21</height>
- </rect>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <property name="leftMargin">
+ <number>2</number>
</property>
- <property name="text">
- <string>?</string>
+ <property name="topMargin">
+ <number>2</number>
</property>
- </widget>
- <widget class="QWidget" name="horizontalLayoutWidget">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>441</width>
- <height>241</height>
- </rect>
+ <property name="rightMargin">
+ <number>2</number>
</property>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <property name="leftMargin">
- <number>4</number>
- </property>
- <item>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <property name="spacing">
- <number>0</number>
- </property>
- <item>
- <widget class="QLabel" name="lbFileName">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <pointsize>18</pointsize>
- </font>
- </property>
- <property name="contextMenuPolicy">
- <enum>Qt::CustomContextMenu</enum>
- </property>
- <property name="text">
- <string>somefile.mid</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <property name="spacing">
- <number>0</number>
- </property>
- <item>
- <widget class="QLabel" name="lbCurTime">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>00:00</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QVBoxLayout" name="verticalLayout_3">
- <property name="spacing">
- <number>0</number>
- </property>
- <item>
- <widget class="QLabel" name="lbPolyphone">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Poly&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignBottom|Qt::AlignHCenter</set>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLCDNumber" name="lnPolyphone">
- <property name="maximumSize">
- <size>
- <width>84</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="digitCount">
- <number>11</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Flat</enum>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QLabel" name="lbFinTime">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>00:00</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QClickableSlider" name="hsTimer">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximum">
- <number>100</number>
- </property>
- <property name="pageStep">
- <number>0</number>
- </property>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QVBoxLayout" name="verticalLayout_4">
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_3">
- <property name="spacing">
- <number>0</number>
- </property>
- <item>
- <widget class="QPushButton" name="pbPlayPause">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>34</height>
- </size>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="icon">
- <iconset resource="resources.qrc">
- <normaloff>:/img/play.png</normaloff>:/img/play.png</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>32</width>
- <height>32</height>
- </size>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="pbStop">
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>34</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>34</height>
- </size>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="icon">
- <iconset resource="resources.qrc">
- <normaloff>:/img/stop.png</normaloff>:/img/stop.png</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>32</width>
- <height>32</height>
- </size>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="pbPrev">
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>34</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>34</height>
- </size>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="icon">
- <iconset resource="resources.qrc">
- <normaloff>:/img/prev.png</normaloff>:/img/prev.png</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>32</width>
- <height>32</height>
- </size>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="pbNext">
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>34</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>34</height>
- </size>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="icon">
- <iconset resource="resources.qrc">
- <normaloff>:/img/next.png</normaloff>:/img/next.png</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>32</width>
- <height>32</height>
- </size>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>32</width>
- <height>32</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="pbSettings">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>34</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>34</height>
- </size>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="icon">
- <iconset resource="resources.qrc">
- <normaloff>:/img/settings.png</normaloff>:/img/settings.png</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>32</width>
- <height>32</height>
- </size>
- </property>
- <property name="checkable">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
- <widget class="QPushButton" name="pbChannels">
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>36</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true">text-align:left</string>
- </property>
- <property name="text">
- <string>Channels</string>
- </property>
- <property name="icon">
- <iconset resource="resources.qrc">
- <normaloff>:/img/channel.png</normaloff>:/img/channel.png</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>32</width>
- <height>32</height>
- </size>
- </property>
- <property name="checkable">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QPushButton" name="pbPList">
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>36</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true">text-align:left</string>
- </property>
- <property name="text">
- <string>Playlist</string>
- </property>
- <property name="icon">
- <iconset resource="resources.qrc">
- <normaloff>:/img/list.png</normaloff>:/img/list.png</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>32</width>
- <height>32</height>
- </size>
- </property>
- <property name="checkable">
- <bool>true</bool>
- </property>
- <property name="checked">
- <bool>false</bool>
- </property>
- <property name="flat">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QPushButton" name="pbEfx">
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>36</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true">text-align:left</string>
- </property>
- <property name="text">
- <string>Effects</string>
- </property>
- <property name="icon">
- <iconset resource="resources.qrc">
- <normaloff>:/img/effects.png</normaloff>:/img/effects.png</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>32</width>
- <height>32</height>
- </size>
- </property>
- <property name="checkable">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QPushButton" name="pbVisualization">
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>36</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true">text-align:left</string>
- </property>
- <property name="text">
- <string>Visualization</string>
- </property>
- <property name="icon">
- <iconset resource="resources.qrc">
- <normaloff>:/img/visualization.png</normaloff>:/img/visualization.png</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>32</width>
- <height>32</height>
- </size>
- </property>
- <property name="checkable">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QVBoxLayout" name="verticalLayout">
- <property name="spacing">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>4</number>
- </property>
- <item>
- <widget class="QSlider" name="vsMasterVol">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximum">
- <number>100</number>
- </property>
- <property name="value">
- <number>50</number>
- </property>
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="lbMasterVol">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Master</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- <zorder>horizontalLayoutWidget</zorder>
- <zorder>pushButton</zorder>
+ <property name="bottomMargin">
+ <number>2</number>
+ </property>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="lbFileName">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>18</pointsize>
+ </font>
+ </property>
+ <property name="contextMenuPolicy">
+ <enum>Qt::CustomContextMenu</enum>
+ </property>
+ <property name="text">
+ <string>somefile.mid</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="lbCurTime">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>00:00</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_3">
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="lbPolyphone">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Poly&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignBottom|Qt::AlignHCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLCDNumber" name="lnPolyphone">
+ <property name="maximumSize">
+ <size>
+ <width>84</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="digitCount">
+ <number>11</number>
+ </property>
+ <property name="segmentStyle">
+ <enum>QLCDNumber::Flat</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QLabel" name="lbFinTime">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>00:00</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QClickableSlider" name="hsTimer">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximum">
+ <number>100</number>
+ </property>
+ <property name="pageStep">
+ <number>0</number>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_4">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QPushButton" name="pbPlayPause">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>34</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="resources.qrc">
+ <normaloff>:/img/play.png</normaloff>:/img/play.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>32</width>
+ <height>32</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pbStop">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>34</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>34</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="resources.qrc">
+ <normaloff>:/img/stop.png</normaloff>:/img/stop.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>32</width>
+ <height>32</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pbPrev">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>34</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>34</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="resources.qrc">
+ <normaloff>:/img/prev.png</normaloff>:/img/prev.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>32</width>
+ <height>32</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pbNext">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>34</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>34</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="resources.qrc">
+ <normaloff>:/img/next.png</normaloff>:/img/next.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>32</width>
+ <height>32</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>32</width>
+ <height>32</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pbSettings">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>34</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>34</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="resources.qrc">
+ <normaloff>:/img/settings.png</normaloff>:/img/settings.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>32</width>
+ <height>32</height>
+ </size>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QPushButton" name="pbChannels">
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>36</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">text-align:left</string>
+ </property>
+ <property name="text">
+ <string>Channels</string>
+ </property>
+ <property name="icon">
+ <iconset resource="resources.qrc">
+ <normaloff>:/img/channel.png</normaloff>:/img/channel.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>32</width>
+ <height>32</height>
+ </size>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QPushButton" name="pbPList">
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>36</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">text-align:left</string>
+ </property>
+ <property name="text">
+ <string>Playlist</string>
+ </property>
+ <property name="icon">
+ <iconset resource="resources.qrc">
+ <normaloff>:/img/list.png</normaloff>:/img/list.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>32</width>
+ <height>32</height>
+ </size>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ <property name="flat">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QPushButton" name="pbEfx">
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>36</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">text-align:left</string>
+ </property>
+ <property name="text">
+ <string>Effects</string>
+ </property>
+ <property name="icon">
+ <iconset resource="resources.qrc">
+ <normaloff>:/img/effects.png</normaloff>:/img/effects.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>32</width>
+ <height>32</height>
+ </size>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QPushButton" name="pbVisualization">
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>36</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">text-align:left</string>
+ </property>
+ <property name="text">
+ <string>Visualization</string>
+ </property>
+ <property name="icon">
+ <iconset resource="resources.qrc">
+ <normaloff>:/img/visualization.png</normaloff>:/img/visualization.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>32</width>
+ <height>32</height>
+ </size>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QPushButton" name="pushButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>21</width>
+ <height>21</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>?</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSlider" name="vsMasterVol">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximum">
+ <number>100</number>
+ </property>
+ <property name="value">
+ <number>50</number>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="lbMasterVol">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Master</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
</widget>
</widget>
<layoutdefault spacing="6" margin="11"/>
diff --git a/qmidiplayer-desktop/qmpplistwindow.cpp b/qmidiplayer-desktop/qmpplistwindow.cpp
index 103027c..d315d80 100644
--- a/qmidiplayer-desktop/qmpplistwindow.cpp
+++ b/qmidiplayer-desktop/qmpplistwindow.cpp
@@ -15,6 +15,8 @@ qmpPlistWindow::qmpPlistWindow(QWidget *parent) :
ui(new Ui::qmpPlistWindow)
{
ui->setupUi(this);
+ int w=size().width(),h=size().height();w=w*(logicalDpiX()/96.);h=h*(logicalDpiY()/96.);
+ setMaximumWidth(w);setMaximumHeight(h);setMinimumWidth(w);setMinimumHeight(h);
connect(this,SIGNAL(dialogClosing()),parent,SLOT(dialogClosed()));
connect(this,SIGNAL(selectionChanging()),parent,SLOT(selectionChanged()));
repeat=0;shuffle=0;
diff --git a/qmidiplayer-desktop/qmpplugin.cpp b/qmidiplayer-desktop/qmpplugin.cpp
index 2117bcf..7dfb01f 100644
--- a/qmidiplayer-desktop/qmpplugin.cpp
+++ b/qmidiplayer-desktop/qmpplugin.cpp
@@ -18,23 +18,24 @@ void qmpPluginManager::scanPlugins()
HANDLE dir;
std::vector<std::string> cpluginpaths;
//FindFirstFile, FindNextFile, FindClose
- LPWIN32_FIND_DATA file;
- dir=FindFirstFileA(L".\\plugins\\*.dll",file);
+ LPWIN32_FIND_DATAA file;
+ dir=FindFirstFileA(".\\plugins\\*.dll",file);
if(dir!=INVALID_HANDLE_VALUE)
{
cpluginpaths.push_back(std::string(file->cFileName));
- while(FindNextFile(dir,file))
+ while(FindNextFileA(dir,file))
cpluginpaths.push_back(std::string(file->cFileName));
}
FindClose(dir);
for(unsigned i=0;i<cpluginpaths.size();++i)
{
- HMODULE hso=LoadLibraryA(cpluginpaths[i].c_str());
+ HMODULE hso=LoadLibraryA((std::string(".\\plugins\\")+cpluginpaths[i]).c_str());
if(!hso){fprintf(stderr,"Error while loading library: %d\n",GetLastError());continue;}
FARPROC hndi=GetProcAddress(hso,"qmpPluginGetInterface");
if(!hndi){fprintf(stderr,"file %s doesn't seem to be a qmidiplayer plugin.\n",cpluginpaths[i].c_str());continue;}
qmpPluginEntry e=(qmpPluginEntry)hndi;
qmpPluginIntf* intf=e(pluginAPI);
+ //!!FIXME: Windows version crashes if intf->pluginGetVersion is called. Reason is still unknown.
plugins.push_back(qmpPlugin(std::string(intf->pluginGetName()),std::string(intf->pluginGetVersion()),std::string(cpluginpaths[i]),intf));
}
}
@@ -82,8 +83,8 @@ qmpPluginManager::~qmpPluginManager()
{
for(unsigned i=0;i<plugins.size();++i)
{
- if(plugins[i].initialized)plugins[i].interface->deinit();
- delete plugins[i].interface;
+ if(plugins[i].initialized)plugins[i].pinterface->deinit();
+ delete plugins[i].pinterface;
}
qmw=NULL;qsw=NULL;delete pluginAPI;
}
@@ -97,14 +98,14 @@ void qmpPluginManager::initPlugins()
{
if(!plugins[i].enabled)continue;
printf("Loaded plugin: %s\n",plugins[i].path.c_str());
- plugins[i].interface->init();plugins[i].initialized=true;
+ plugins[i].pinterface->init();plugins[i].initialized=true;
}
}
void qmpPluginManager::deinitPlugins()
{
for(unsigned i=0;i<plugins.size();++i)
{
- if(plugins[i].initialized)plugins[i].interface->deinit();
+ if(plugins[i].initialized)plugins[i].pinterface->deinit();
plugins[i].enabled=plugins[i].initialized=false;
}
}
diff --git a/qmidiplayer-desktop/qmpplugin.hpp b/qmidiplayer-desktop/qmpplugin.hpp
index f689f71..d69adeb 100644
--- a/qmidiplayer-desktop/qmpplugin.hpp
+++ b/qmidiplayer-desktop/qmpplugin.hpp
@@ -7,10 +7,10 @@
struct qmpPlugin
{
std::string name,version,path;
- qmpPluginIntf* interface;
+ qmpPluginIntf* pinterface;
bool enabled,initialized;
qmpPlugin(std::string _n,std::string _v,std::string _p,qmpPluginIntf* _i)
- {name=_n;version=_v;path=_p;interface=_i;enabled=initialized=false;}
+ {name=_n;version=_v;path=_p;pinterface=_i;enabled=initialized=false;}
};
class qmpPluginManager
{
diff --git a/qmidiplayer-desktop/qmpsettingswindow.cpp b/qmidiplayer-desktop/qmpsettingswindow.cpp
index b47c2ba..7e441e8 100644
--- a/qmidiplayer-desktop/qmpsettingswindow.cpp
+++ b/qmidiplayer-desktop/qmpsettingswindow.cpp
@@ -19,6 +19,8 @@ qmpSettingsWindow::qmpSettingsWindow(QWidget *parent) :
ui(new Ui::qmpSettingsWindow)
{
ui->setupUi(this);customOptions.clear();customOptPages.clear();
+ int w=size().width(),h=size().height();w=w*(logicalDpiX()/96.);h=h*(logicalDpiY()/96.);
+ setMaximumWidth(w);setMaximumHeight(h);setMinimumWidth(w);setMinimumHeight(h);
connect(this,SIGNAL(dialogClosing()),parent,SLOT(dialogClosed()));
settings=new QSettings(QDir::homePath()+QString("/.config/qmprc"),QSettings::IniFormat);
settingsInit();outwidget=ui->cbOutputDevice;