[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdenetwork/knewsticker
From: Frerich Raabe <raabe () kde ! org>
Date: 2007-10-31 21:31:25
Message-ID: 1193866285.787369.10262.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 731508 by raabe:
- Show the description of feed items as a tooltip (maybe I should add a
guard against super long descriptions)
M +5 -1 knewsticker.cpp
M +2 -0 knewsticker.h
--- trunk/KDE/kdenetwork/knewsticker/knewsticker.cpp #731507:731508
@@ -81,6 +81,7 @@
}
NewsTickerItem::NewsTickerItem( const QString &text, const QUrl &url,
+ const QString &description,
QGraphicsItem *parentItem )
: QGraphicsItemGroup( parentItem )
{
@@ -98,6 +99,7 @@
m_headlineItem = new HyperlinkItem( text, url, this );
m_headlineItem->setPos( xpos, 0 );
+ m_headlineItem->setToolTip( description );
addToGroup( m_headlineItem );
m_separatorItem = new SeparatorItem( this );
@@ -265,7 +267,8 @@
return;
}
- NewsTickerItem *i = new NewsTickerItem( item.text, item.url, m_scrollerItem );
+ NewsTickerItem *i = new NewsTickerItem( item.text, item.url, item.description,
+ m_scrollerItem );
connect( i->headlineItem(), SIGNAL( activated( const QString & ) ),
this, SLOT( openFeedItem( const QString & ) ) );
i->setPos( *xpos, *ypos );
@@ -319,6 +322,7 @@
i.text = item->title();
i.text.replace( """, "\"" );
i.url = item->link();
+ i.description = item->description();
m_items.append( i );
}
}
--- trunk/KDE/kdenetwork/knewsticker/knewsticker.h #731507:731508
@@ -61,6 +61,7 @@
static const int Type = UserType + 3;
NewsTickerItem( const QString &text, const QUrl &url,
+ const QString &description,
QGraphicsItem *parentItem );
virtual int type() const { return Type; }
@@ -101,6 +102,7 @@
struct Item {
QString text;
QString url;
+ QString description;
};
void relayoutItems();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic