aboutsummaryrefslogtreecommitdiff
path: root/src/playlist.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2007-11-18 19:39:47 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2007-11-18 19:39:47 +0000
commitbdfdce7315b4db7b6d2a5c8f3ce418a747dfc9c6 (patch)
tree1574d5189c8dfbd2e325d1e92026f76fdbf51894 /src/playlist.cpp
parent967db4498a7a1fc85f0865f6266482b2c92e1476 (diff)
downloadqmmp-bdfdce7315b4db7b6d2a5c8f3ce418a747dfc9c6.tar.gz
qmmp-bdfdce7315b4db7b6d2a5c8f3ce418a747dfc9c6.tar.bz2
qmmp-bdfdce7315b4db7b6d2a5c8f3ce418a747dfc9c6.zip
added shaded mode for the playlist window
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@188 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/playlist.cpp')
-rw-r--r--src/playlist.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/playlist.cpp b/src/playlist.cpp
index e759e85c4..282463ef0 100644
--- a/src/playlist.cpp
+++ b/src/playlist.cpp
@@ -56,9 +56,6 @@ PlayList::PlayList ( QWidget *parent )
resize ( 275,116 );
setMinimumSize ( 275,116 );
setBaseSize ( 275,116 );
- m_titleBar = new PlayListTitleBar ( this );
- m_titleBar->show();
- m_titleBar->move ( 0,0 );
m_listWidget = new ListWidget ( this );
m_listWidget->show();
m_listWidget->setGeometry ( 12,20,243,58 );
@@ -110,6 +107,8 @@ PlayList::PlayList ( QWidget *parent )
connect ( m_pl_control, SIGNAL ( pauseClicked() ), SIGNAL ( pause() ) );
connect ( m_pl_control, SIGNAL ( stopClicked() ), SIGNAL ( stop() ) );
connect ( m_pl_control, SIGNAL ( ejectClicked() ), SIGNAL ( eject() ) );
+ m_titleBar = new PlayListTitleBar ( this );
+ m_titleBar->move ( 0,0 );
readSettings();
}
@@ -310,6 +309,8 @@ void PlayList::resizeEvent ( QResizeEvent *e )
{
int sx = ( e->size().width()-275 ) /25;
int sy = ( e->size().height()-116 ) /29;
+ if (sx < 0 || sy < 0)
+ return;
m_titleBar->resize ( 275+25*sx,20 );
m_plslider->resize ( 20,58+sy*29 );
@@ -359,8 +360,9 @@ void PlayList::mouseReleaseEvent ( QMouseEvent * )
void PlayList::setModel ( PlayListModel *model )
{
m_playListModel = model;
- m_listWidget->setModel ( model );
- m_keyboardManager->setModel ( model );
+ m_listWidget->setModel (model);
+ m_keyboardManager->setModel (model);
+ m_titleBar->setModel (model);
createActions();
}
@@ -377,14 +379,14 @@ void PlayList::readSettings()
if ( m_update )
{
m_listWidget->readSettings();
+ m_titleBar->readSettings();
}
else
{
- QSettings settings ( QDir::homePath() +"/.qmmp/qmmprc", QSettings::IniFormat );
+ QSettings settings (QDir::homePath() +"/.qmmp/qmmprc", QSettings::IniFormat);
settings.beginGroup ( "PlayList" );
- //geometry
- resize ( settings.value ( "size", QSize ( 275, 116 ) ).toSize() );
- move ( settings.value ( "pos", QPoint ( 100, 332 ) ).toPoint() );
+ //position
+ move ( settings.value ("pos", QPoint ( 100, 332 ) ).toPoint());
settings.endGroup();
m_update = TRUE;
}
@@ -395,8 +397,7 @@ void PlayList::writeSettings()
{
QSettings settings ( QDir::homePath() +"/.qmmp/qmmprc", QSettings::IniFormat );
settings.beginGroup ( "PlayList" );
- //geometry
- settings.setValue ( "size", size() );
+ //position
settings.setValue ( "pos", this->pos() );
settings.endGroup();
}
@@ -437,7 +438,7 @@ QString PlayList::formatTime ( int sec )
return str_minutes + ":" + str_seconds;
}
-void PlayList::setInfo ( const OutputState &st,int length_current, int length_total )
+void PlayList::setInfo (const OutputState &st,int length_current, int length_total)
{
if ( st.type() == OutputState::Info )
{