summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp4
-rw-r--r--noncore/multimedia/tonleiter/editinst.cpp4
-rw-r--r--noncore/multimedia/tonleiter/editscale.cpp4
3 files changed, 9 insertions, 3 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index 2c54ae6..4242aa6 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -23,32 +23,34 @@
23++=   -.     .`     .: details. 23++=   -.     .`     .: details.
24 :     =  ...= . :.=- 24 :     =  ...= . :.=-
25 -.   .:....=;==+<; You should have received a copy of the GNU 25 -.   .:....=;==+<; You should have received a copy of the GNU
26  -_. . .   )=.  = Library General Public License along with 26  -_. . .   )=.  = Library General Public License along with
27    --        :-=` this library; see the file COPYING.LIB. 27    --        :-=` this library; see the file COPYING.LIB.
28 If not, write to the Free Software Foundation, 28 If not, write to the Free Software Foundation,
29 Inc., 59 Temple Place - Suite 330, 29 Inc., 59 Temple Place - Suite 330,
30 Boston, MA 02111-1307, USA. 30 Boston, MA 02111-1307, USA.
31 31
32*/ 32*/
33 33
34 34
35#include "audiowidget.h" 35#include "audiowidget.h"
36#include "mediaplayerstate.h" 36#include "mediaplayerstate.h"
37#include "playlistwidget.h" 37#include "playlistwidget.h"
38 38
39#include <qpe/qpeapplication.h>
40
39namespace 41namespace
40{ 42{
41 43
42const int xo = -2; // movable x offset 44const int xo = -2; // movable x offset
43const int yo = 22; // movable y offset 45const int yo = 22; // movable y offset
44 46
45const MediaWidget::SkinButtonInfo skinInfo[] = 47const MediaWidget::SkinButtonInfo skinInfo[] =
46{ 48{
47 { MediaWidget::Play, "play", MediaWidget::ToggleButton }, 49 { MediaWidget::Play, "play", MediaWidget::ToggleButton },
48 { MediaWidget::Stop, "stop", MediaWidget::NormalButton }, 50 { MediaWidget::Stop, "stop", MediaWidget::NormalButton },
49 { MediaWidget::Next, "next", MediaWidget::NormalButton }, 51 { MediaWidget::Next, "next", MediaWidget::NormalButton },
50 { MediaWidget::Previous, "prev", MediaWidget::NormalButton }, 52 { MediaWidget::Previous, "prev", MediaWidget::NormalButton },
51 { MediaWidget::VolumeUp, "up", MediaWidget::NormalButton }, 53 { MediaWidget::VolumeUp, "up", MediaWidget::NormalButton },
52 { MediaWidget::VolumeDown, "down", MediaWidget::NormalButton }, 54 { MediaWidget::VolumeDown, "down", MediaWidget::NormalButton },
53 { MediaWidget::Loop, "loop", MediaWidget::ToggleButton }, 55 { MediaWidget::Loop, "loop", MediaWidget::ToggleButton },
54 { MediaWidget::PlayList, "playlist", MediaWidget::NormalButton }, 56 { MediaWidget::PlayList, "playlist", MediaWidget::NormalButton },
@@ -132,33 +134,33 @@ void AudioWidget::sliderReleased() {
132} 134}
133 135
134void AudioWidget::setPosition( long i ) { 136void AudioWidget::setPosition( long i ) {
135 // qDebug("<<<<<<<<<<<<<<<<<<<<<<<<set position %d",i); 137 // qDebug("<<<<<<<<<<<<<<<<<<<<<<<<set position %d",i);
136 updateSlider( i, mediaPlayerState.length() ); 138 updateSlider( i, mediaPlayerState.length() );
137} 139}
138 140
139 141
140void AudioWidget::setLength( long max ) { 142void AudioWidget::setLength( long max ) {
141 updateSlider( mediaPlayerState.position(), max ); 143 updateSlider( mediaPlayerState.position(), max );
142} 144}
143 145
144 146
145void AudioWidget::setDisplayType( MediaPlayerState::DisplayType mediaType ) { 147void AudioWidget::setDisplayType( MediaPlayerState::DisplayType mediaType ) {
146 if ( mediaType == MediaPlayerState::Audio ) { 148 if ( mediaType == MediaPlayerState::Audio ) {
147 // startTimer( 150 ); 149 // startTimer( 150 );
148 showMaximized(); 150 QPEApplication::showDialog( this );
149 return; 151 return;
150 } 152 }
151 153
152 killTimers(); 154 killTimers();
153 hide(); 155 hide();
154} 156}
155 157
156void AudioWidget::loadSkin() 158void AudioWidget::loadSkin()
157{ 159{
158 loadDefaultSkin( guiInfo() ); 160 loadDefaultSkin( guiInfo() );
159 161
160 songInfo.setFocusPolicy( QWidget::NoFocus ); 162 songInfo.setFocusPolicy( QWidget::NoFocus );
161// changeTextColor( &songInfo ); 163// changeTextColor( &songInfo );
162// songInfo.setBackgroundColor( QColor( 167, 212, 167 )); 164// songInfo.setBackgroundColor( QColor( 167, 212, 167 ));
163// songInfo.setFrameStyle( QFrame::NoFrame); 165// songInfo.setFrameStyle( QFrame::NoFrame);
164 songInfo.setFrameStyle( QFrame::WinPanel | QFrame::Sunken ); 166 songInfo.setFrameStyle( QFrame::WinPanel | QFrame::Sunken );
diff --git a/noncore/multimedia/tonleiter/editinst.cpp b/noncore/multimedia/tonleiter/editinst.cpp
index f172ef8..5616569 100644
--- a/noncore/multimedia/tonleiter/editinst.cpp
+++ b/noncore/multimedia/tonleiter/editinst.cpp
@@ -1,21 +1,23 @@
1#include "editinst.h" 1#include "editinst.h"
2 2
3#include <qlabel.h> 3#include <qlabel.h>
4#include <qpushbutton.h> 4#include <qpushbutton.h>
5 5
6#include <qpe/qpeapplication.h>
7
6Menu::InstEditDialog::InstEditDialog(TonleiterData* data,QWidget* parent,const char* name) 8Menu::InstEditDialog::InstEditDialog(TonleiterData* data,QWidget* parent,const char* name)
7:QDialog(parent,name,true,0),data(data) 9:QDialog(parent,name,true,0),data(data)
8{ 10{
9 setCaption("Tonleiter::"+tr("Instrument")); 11 setCaption("Tonleiter::"+tr("Instrument"));
10 QBoxLayout* masterlayout=new QBoxLayout(this,QBoxLayout::TopToBottom); 12 QBoxLayout* masterlayout=new QBoxLayout(this,QBoxLayout::TopToBottom);
11 instid=data->getCurrentInstrumentID(); 13 instid=data->getCurrentInstrumentID();
12 stringlist.setAutoDelete(true); 14 stringlist.setAutoDelete(true);
13 15
14 QBoxLayout* toplayout=new QBoxLayout(masterlayout,QBoxLayout::LeftToRight); 16 QBoxLayout* toplayout=new QBoxLayout(masterlayout,QBoxLayout::LeftToRight);
15 17
16 //Name combo + Add + Delete 18 //Name combo + Add + Delete
17 boxInst=new QComboBox(this,"boxInst"); 19 boxInst=new QComboBox(this,"boxInst");
18 boxInst->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum)); 20 boxInst->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum));
19 connect(boxInst,SIGNAL(activated(int)),this,SLOT(setCurrentInstrumetID(int))); 21 connect(boxInst,SIGNAL(activated(int)),this,SLOT(setCurrentInstrumetID(int)));
20 for(int i=0;i<data->noOfInstruments();i++) 22 for(int i=0;i<data->noOfInstruments();i++)
21 { 23 {
@@ -41,33 +43,33 @@ Menu::InstEditDialog::InstEditDialog(TonleiterData* data,QWidget* parent,const c
41 scrollview=new QScrollView(this); 43 scrollview=new QScrollView(this);
42 scrollview->setVScrollBarMode(QScrollView::AlwaysOn); 44 scrollview->setVScrollBarMode(QScrollView::AlwaysOn);
43 scrollview->setHScrollBarMode(QScrollView::AlwaysOff); 45 scrollview->setHScrollBarMode(QScrollView::AlwaysOff);
44 stringwidget=new QVBox(scrollview->viewport()); 46 stringwidget=new QVBox(scrollview->viewport());
45 stringwidget->setSizePolicy(QSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum)); 47 stringwidget->setSizePolicy(QSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum));
46 stringwidget->setSpacing(10); 48 stringwidget->setSpacing(10);
47 scrollview->addChild(stringwidget); 49 scrollview->addChild(stringwidget);
48 scrollview->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum)); 50 scrollview->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum));
49 masterlayout->addWidget(scrollview); 51 masterlayout->addWidget(scrollview);
50 52
51 loadInstrument(); 53 loadInstrument();
52 54
53 QPushButton* addlowButton=new QPushButton(tr("Add Low String"),this,"addlowButton"); 55 QPushButton* addlowButton=new QPushButton(tr("Add Low String"),this,"addlowButton");
54 masterlayout->addWidget(addlowButton); 56 masterlayout->addWidget(addlowButton);
55 57
56 //make dialog fit the screen 58 //make dialog fit the screen
57 showMaximized(); 59 QPEApplication::showDialog( this );
58} 60}
59//**************************************************************************** 61//****************************************************************************
60Menu::InstEditDialog::~InstEditDialog() 62Menu::InstEditDialog::~InstEditDialog()
61{ 63{
62} 64}
63//**************************************************************************** 65//****************************************************************************
64void Menu::InstEditDialog::setCurrentInstrumetID(int id) 66void Menu::InstEditDialog::setCurrentInstrumetID(int id)
65{ 67{
66 saveInstrument(); 68 saveInstrument();
67 instid=id; 69 instid=id;
68 data->setCurrentInstrumetID(id); 70 data->setCurrentInstrumetID(id);
69 loadInstrument(); 71 loadInstrument();
70} 72}
71//**************************************************************************** 73//****************************************************************************
72void Menu::InstEditDialog::addInstrument() 74void Menu::InstEditDialog::addInstrument()
73{ 75{
diff --git a/noncore/multimedia/tonleiter/editscale.cpp b/noncore/multimedia/tonleiter/editscale.cpp
index 0be0058..28bd579 100644
--- a/noncore/multimedia/tonleiter/editscale.cpp
+++ b/noncore/multimedia/tonleiter/editscale.cpp
@@ -1,21 +1,23 @@
1#include "editscale.h" 1#include "editscale.h"
2 2
3#include <qlayout.h> 3#include <qlayout.h>
4#include <qpushbutton.h> 4#include <qpushbutton.h>
5 5
6#include <qpe/qpeapplication.h>
7
6Menu::ScaleEditDialog::ScaleEditDialog(TonleiterData* data,QWidget* parent,const char* name) 8Menu::ScaleEditDialog::ScaleEditDialog(TonleiterData* data,QWidget* parent,const char* name)
7:QDialog(parent,name,true,0),data(data) 9:QDialog(parent,name,true,0),data(data)
8{ 10{
9 setCaption("Tonleiter::"+tr("Scale")); 11 setCaption("Tonleiter::"+tr("Scale"));
10 QBoxLayout* masterlayout=new QBoxLayout(this,QBoxLayout::TopToBottom); 12 QBoxLayout* masterlayout=new QBoxLayout(this,QBoxLayout::TopToBottom);
11 13
12 QBoxLayout* toplayout=new QBoxLayout(masterlayout,QBoxLayout::LeftToRight); 14 QBoxLayout* toplayout=new QBoxLayout(masterlayout,QBoxLayout::LeftToRight);
13 15
14 boxScale=new QComboBox(this,"boxScale"); 16 boxScale=new QComboBox(this,"boxScale");
15 for(int s=0;s<data->noOfScales();s++) 17 for(int s=0;s<data->noOfScales();s++)
16 { 18 {
17 Scale scale=data->getScale(s); 19 Scale scale=data->getScale(s);
18 QString name=scale.scaleName(); 20 QString name=scale.scaleName();
19 if(name.isNull()) continue; 21 if(name.isNull()) continue;
20 //boxScale->insertItem(name,s); 22 //boxScale->insertItem(name,s);
21 } 23 }
@@ -23,24 +25,24 @@ Menu::ScaleEditDialog::ScaleEditDialog(TonleiterData* data,QWidget* parent,const
23 boxScale->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum)); 25 boxScale->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum));
24 connect(boxScale,SIGNAL(activated(int)),data,SLOT(setCurrentScaleID(int))); 26 connect(boxScale,SIGNAL(activated(int)),data,SLOT(setCurrentScaleID(int)));
25 toplayout->addWidget(boxScale); 27 toplayout->addWidget(boxScale);
26 28
27 QPushButton* addButton=new QPushButton(tr("Add"),this,"addButton"); 29 QPushButton* addButton=new QPushButton(tr("Add"),this,"addButton");
28 connect(addButton,SIGNAL(pressed()),this,SLOT(addInstrument())); 30 connect(addButton,SIGNAL(pressed()),this,SLOT(addInstrument()));
29 toplayout->addWidget(addButton); 31 toplayout->addWidget(addButton);
30 32
31 QPushButton* delButton=new QPushButton(tr("Delete"),this,"delButton"); 33 QPushButton* delButton=new QPushButton(tr("Delete"),this,"delButton");
32 connect(delButton,SIGNAL(pressed()),this,SLOT(deleteInstrument())); 34 connect(delButton,SIGNAL(pressed()),this,SLOT(deleteInstrument()));
33 toplayout->addWidget(delButton); 35 toplayout->addWidget(delButton);
34 36
35 pianoscale=new PianoScale(this); 37 pianoscale=new PianoScale(this);
36 masterlayout->addWidget(pianoscale); 38 masterlayout->addWidget(pianoscale);
37 39
38 //make dialog fit the screen 40 //make dialog fit the screen
39 showMaximized(); 41 QPEApplication::showDialog( this );
40} 42}
41//**************************************************************************** 43//****************************************************************************
42Menu::ScaleEditDialog::~ScaleEditDialog() 44Menu::ScaleEditDialog::~ScaleEditDialog()
43{ 45{
44} 46}
45//**************************************************************************** 47//****************************************************************************
46//**************************************************************************** 48//****************************************************************************