[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/multimedia/amarok/src
From: Nadeem Hasan <nhasan () kde ! org>
Date: 2005-11-05 5:35:58
Message-ID: 1131168958.811791.12936.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 477789 by nhasan:
Make this a bit more usable.
M +21 -14 statistics.cpp
M +16 -42 statisticsbase.ui
--- trunk/extragear/multimedia/amarok/src/statistics.cpp #477788:477789
@@ -23,6 +23,7 @@
#include <qlayout.h>
#include <qpixmap.h>
#include <qtabwidget.h>
+#include <qtextedit.h>
//////////////////////////////////////////////////////////////////////////////////////////
/// CLASS Statistics
@@ -151,8 +152,7 @@
void
Statistics::loadDetails( int index ) //SLOT
{
- m_gui->m_btrLabel->setText( i18n("Please hold...") );
- m_gui->m_bbrLabel->clear();
+ m_gui->m_btrView->setText( i18n("Please hold...") );
m_gui->m_topCoverLabel->clear();
m_gui->m_topCoverLabel->setFrameShape( QFrame::NoFrame );
m_gui->m_bottomCoverLabel->clear();
@@ -221,8 +221,9 @@
if( i + qb.countReturnValues() != faveAlbums.count() )
text += "<br>";
}
- m_gui->m_btrLabel->setText( text );
+ text += "<br><br>";
+
qb.clear();
qb.addReturnValue( QueryBuilder::tabAlbum, QueryBuilder::valName );
qb.addReturnValue( QueryBuilder::tabArtist, QueryBuilder::valName );
@@ -239,14 +240,15 @@
m_gui->m_bottomCoverLabel->setPixmap( QPixmap( image_recent ) );
m_gui->m_bottomCoverLabel->setFrameShape( QFrame::StyledPanel );
- text = "<b>" + i18n("Newest Albums") + "</b><br>";
+ text += "<b>" + i18n("Newest Albums") + "</b><br>";
for( uint i=0; i < recentAlbums.count(); i += qb.countReturnValues() )
{
text += "<i>" + recentAlbums[i] + "</i>" + i18n(" - " ) + recentAlbums[i+1];
if( i + qb.countReturnValues() != recentAlbums.count() )
text += "<br>";
}
- m_gui->m_bbrLabel->setText( text );
+
+ m_gui->m_btrView->setText( text );
}
void
@@ -272,8 +274,9 @@
if( i + qb.countReturnValues() != fave.count() )
text += "<br>";
}
- m_gui->m_btrLabel->setText( text );
+ text += "<br><br>";
+
qb.clear();
qb.addReturnValue( QueryBuilder::tabSong, QueryBuilder::valTitle );
qb.addReturnValue( QueryBuilder::tabArtist, QueryBuilder::valName );
@@ -283,7 +286,7 @@
QStringList mostPlayed = qb.run();
///Most Played
- text = "<b>" + i18n("Most Played Songs") + "</b><br>";
+ text += "<b>" + i18n("Most Played Songs") + "</b><br>";
for( uint i=0; i < mostPlayed.count(); i += qb.countReturnValues() )
{
text += i18n("<i>%1</i> - %2 (Playcount: %3)")
@@ -293,7 +296,8 @@
if( i + qb.countReturnValues() != mostPlayed.count() )
text += "<br>";
}
- m_gui->m_bbrLabel->setText( text );
+
+ m_gui->m_btrView->setText( text );
}
void
@@ -318,8 +322,9 @@
if( i + qb.countReturnValues() != faveArtists.count() )
text += "<br>";
}
- m_gui->m_btrLabel->setText( text );
+ text += "<br><br>";
+
qb.clear();
qb.addReturnValue( QueryBuilder::tabArtist, QueryBuilder::valName );
qb.addReturnFunctionValue( QueryBuilder::funcCount, QueryBuilder::tabSong, QueryBuilder::valTrack );
@@ -329,7 +334,7 @@
QStringList mostSongs = qb.run();
///Artists with the Most Songs
- text = "<b>" + i18n("Artist Dominance") + "</b><br>"; // sebr: dominance an appropriate word?! :)
+ text += "<b>" + i18n("Artist Dominance") + "</b><br>"; // sebr: dominance an appropriate word?! :)
for( uint i=0; i < mostSongs.count(); i += qb.countReturnValues() )
{
text += i18n("<i>%1</i> (Count: %2)")
@@ -338,7 +343,8 @@
if( i + qb.countReturnValues() != mostSongs.count() )
text += "<br>";
}
- m_gui->m_bbrLabel->setText( text );
+
+ m_gui->m_btrView->setText( text );
}
void
@@ -364,8 +370,8 @@
if( i + qb.countReturnValues() != faveGenres.count() )
text += "<br>";
}
- m_gui->m_btrLabel->setText( text );
+ text += "<br><br>";
qb.clear();
qb.addReturnValue( QueryBuilder::tabGenre, QueryBuilder::valName );
@@ -377,7 +383,7 @@
QStringList mostGenres = qb.run();
///Genres with the Most Songs
- text = "<b>" + i18n("Genre Population") + "</b><br>"; // sebr: dominance an appropriate word?! :)
+ text += "<b>" + i18n("Genre Population") + "</b><br>"; // sebr: dominance an appropriate word?! :)
for( uint i=0; i < mostGenres.count(); i += qb.countReturnValues() )
{
text += i18n("<i>%1</i> (Count: %2)")
@@ -386,7 +392,8 @@
if( i + qb.countReturnValues() != mostGenres.count() )
text += "<br>";
}
- m_gui->m_bbrLabel->setText( text );
+
+ m_gui->m_btrView->setText( text );
}
#include "statistics.moc"
--- trunk/extragear/multimedia/amarok/src/statisticsbase.ui #477788:477789
@@ -56,52 +56,26 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="1">
+ <widget class="QTextEdit" row="0" column="2">
<property name="name">
- <cstring>layout10</cstring>
+ <cstring>m_btrView</cstring>
</property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QLabel">
- <property name="name">
- <cstring>m_btrLabel</cstring>
- </property>
- <property name="text">
- <string></string>
- </property>
- </widget>
- <spacer>
- <property name="name">
- <cstring>spacer3_2</cstring>
- </property>
- <property name="orientation">
- <enum>Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>10</height>
- </size>
- </property>
- </spacer>
- <widget class="QLabel">
- <property name="name">
- <cstring>m_bbrLabel</cstring>
- </property>
- <property name="text">
- <string></string>
- </property>
- </widget>
- </vbox>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="frameShape">
+ <enum>LineEditPanel</enum>
+ </property>
+ <property name="textFormat">
+ <enum>RichText</enum>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
</widget>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="QLayoutWidget" row="0" column="0" rowspan="2" colspan="2">
<property name="name">
- <cstring>layout8_2</cstring>
+ <cstring>m_coverBox</cstring>
</property>
<vbox>
<property name="name">
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic