-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 4 | ||||
-rw-r--r-- | noncore/multimedia/tonleiter/editinst.cpp | 4 | ||||
-rw-r--r-- | noncore/multimedia/tonleiter/editscale.cpp | 4 |
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 @@ -15,48 +15,50 @@ ._= =} : or (at your option) any later version. .%`+i> _;_. .i_,=:_. -<s. This program is distributed in the hope that + . -:. = it will be useful, but WITHOUT ANY WARRANTY; : .. .:, . . . without even the implied warranty of =_ + =;=|` MERCHANTABILITY or FITNESS FOR A _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU ..}^=.= = ; Library General Public License for more ++= -. .` .: details. : = ...= . :.=- -. .:....=;==+<; You should have received a copy of the GNU -_. . . )=. = Library General Public License along with -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "audiowidget.h" #include "mediaplayerstate.h" #include "playlistwidget.h" +#include <qpe/qpeapplication.h> + namespace { const int xo = -2; // movable x offset const int yo = 22; // movable y offset const MediaWidget::SkinButtonInfo skinInfo[] = { { MediaWidget::Play, "play", MediaWidget::ToggleButton }, { MediaWidget::Stop, "stop", MediaWidget::NormalButton }, { MediaWidget::Next, "next", MediaWidget::NormalButton }, { MediaWidget::Previous, "prev", MediaWidget::NormalButton }, { MediaWidget::VolumeUp, "up", MediaWidget::NormalButton }, { MediaWidget::VolumeDown, "down", MediaWidget::NormalButton }, { MediaWidget::Loop, "loop", MediaWidget::ToggleButton }, { MediaWidget::PlayList, "playlist", MediaWidget::NormalButton }, { MediaWidget::Forward, "forward", MediaWidget::NormalButton }, { MediaWidget::Back, "back", MediaWidget::NormalButton } }; const uint buttonCount = sizeof( skinInfo ) / sizeof( skinInfo[ 0 ] ); void changeTextColor( QWidget * w) { QPalette p = w->palette(); @@ -124,49 +126,49 @@ void AudioWidget::sliderPressed() { void AudioWidget::sliderReleased() { audioSliderBeingMoved = FALSE; if ( slider.width() == 0 ) return; long val = long((double)slider.value() * mediaPlayerState.length() / slider.width()); mediaPlayerState.setPosition( val ); } void AudioWidget::setPosition( long i ) { // qDebug("<<<<<<<<<<<<<<<<<<<<<<<<set position %d",i); updateSlider( i, mediaPlayerState.length() ); } void AudioWidget::setLength( long max ) { updateSlider( mediaPlayerState.position(), max ); } void AudioWidget::setDisplayType( MediaPlayerState::DisplayType mediaType ) { if ( mediaType == MediaPlayerState::Audio ) { // startTimer( 150 ); - showMaximized(); + QPEApplication::showDialog( this ); return; } killTimers(); hide(); } void AudioWidget::loadSkin() { loadDefaultSkin( guiInfo() ); songInfo.setFocusPolicy( QWidget::NoFocus ); // changeTextColor( &songInfo ); // songInfo.setBackgroundColor( QColor( 167, 212, 167 )); // songInfo.setFrameStyle( QFrame::NoFrame); songInfo.setFrameStyle( QFrame::WinPanel | QFrame::Sunken ); // songInfo.setForegroundColor(Qt::white); slider.setFixedHeight( 20 ); slider.setMinValue( 0 ); slider.setMaxValue( 1 ); slider.setFocusPolicy( QWidget::NoFocus ); slider.setBackgroundPixmap( backgroundPixmap ); 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,29 +1,31 @@ #include "editinst.h" #include <qlabel.h> #include <qpushbutton.h> +#include <qpe/qpeapplication.h> + Menu::InstEditDialog::InstEditDialog(TonleiterData* data,QWidget* parent,const char* name) :QDialog(parent,name,true,0),data(data) { setCaption("Tonleiter::"+tr("Instrument")); QBoxLayout* masterlayout=new QBoxLayout(this,QBoxLayout::TopToBottom); instid=data->getCurrentInstrumentID(); stringlist.setAutoDelete(true); QBoxLayout* toplayout=new QBoxLayout(masterlayout,QBoxLayout::LeftToRight); //Name combo + Add + Delete boxInst=new QComboBox(this,"boxInst"); boxInst->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum)); connect(boxInst,SIGNAL(activated(int)),this,SLOT(setCurrentInstrumetID(int))); for(int i=0;i<data->noOfInstruments();i++) { Instrument inst=data->getInstrument(i); QString name=inst.instName(); if(name.isNull()) continue; boxInst->insertItem(name,i); } boxInst->setCurrentItem(instid); toplayout->addWidget(boxInst); @@ -33,49 +35,49 @@ Menu::InstEditDialog::InstEditDialog(TonleiterData* data,QWidget* parent,const c QPushButton* delButton=new QPushButton(tr("Delete"),this,"delButton"); connect(delButton,SIGNAL(pressed()),this,SLOT(deleteInstrument())); toplayout->addWidget(delButton); QPushButton* addhighButton=new QPushButton(tr("Add High String"),this,"addhighButton"); masterlayout->addWidget(addhighButton); scrollview=new QScrollView(this); scrollview->setVScrollBarMode(QScrollView::AlwaysOn); scrollview->setHScrollBarMode(QScrollView::AlwaysOff); stringwidget=new QVBox(scrollview->viewport()); stringwidget->setSizePolicy(QSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum)); stringwidget->setSpacing(10); scrollview->addChild(stringwidget); scrollview->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum)); masterlayout->addWidget(scrollview); loadInstrument(); QPushButton* addlowButton=new QPushButton(tr("Add Low String"),this,"addlowButton"); masterlayout->addWidget(addlowButton); //make dialog fit the screen - showMaximized(); + QPEApplication::showDialog( this ); } //**************************************************************************** Menu::InstEditDialog::~InstEditDialog() { } //**************************************************************************** void Menu::InstEditDialog::setCurrentInstrumetID(int id) { saveInstrument(); instid=id; data->setCurrentInstrumetID(id); loadInstrument(); } //**************************************************************************** void Menu::InstEditDialog::addInstrument() { } //**************************************************************************** void Menu::InstEditDialog::deleteInstrument() { } //**************************************************************************** void Menu::InstEditDialog::addLowString() { 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,46 +1,48 @@ #include "editscale.h" #include <qlayout.h> #include <qpushbutton.h> +#include <qpe/qpeapplication.h> + Menu::ScaleEditDialog::ScaleEditDialog(TonleiterData* data,QWidget* parent,const char* name) :QDialog(parent,name,true,0),data(data) { setCaption("Tonleiter::"+tr("Scale")); QBoxLayout* masterlayout=new QBoxLayout(this,QBoxLayout::TopToBottom); QBoxLayout* toplayout=new QBoxLayout(masterlayout,QBoxLayout::LeftToRight); boxScale=new QComboBox(this,"boxScale"); for(int s=0;s<data->noOfScales();s++) { Scale scale=data->getScale(s); QString name=scale.scaleName(); if(name.isNull()) continue; //boxScale->insertItem(name,s); } boxScale->setCurrentItem(data->getCurrentScaleID()); boxScale->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum)); connect(boxScale,SIGNAL(activated(int)),data,SLOT(setCurrentScaleID(int))); toplayout->addWidget(boxScale); QPushButton* addButton=new QPushButton(tr("Add"),this,"addButton"); connect(addButton,SIGNAL(pressed()),this,SLOT(addInstrument())); toplayout->addWidget(addButton); QPushButton* delButton=new QPushButton(tr("Delete"),this,"delButton"); connect(delButton,SIGNAL(pressed()),this,SLOT(deleteInstrument())); toplayout->addWidget(delButton); pianoscale=new PianoScale(this); masterlayout->addWidget(pianoscale); //make dialog fit the screen - showMaximized(); + QPEApplication::showDialog( this ); } //**************************************************************************** Menu::ScaleEditDialog::~ScaleEditDialog() { } //**************************************************************************** //**************************************************************************** |