#include <QtGui/QVBoxLayout>
#include <QtGui/QContextMenuEvent>
#include <QtGui/QCursor>
-#include <QtGui/QAction>
+#include <QtGui/QLabel>
#include <KLocale>
QList<Tag> resourceTags;
- QAction* changeTagsAction;
-
void showTaggingPopup( const QPoint& );
void _k_slotShowTaggingPopup();
};
layout->setMargin( 0 );
d->resourceTagCloud = new TagCloud( this );
layout->addWidget( d->resourceTagCloud );
-
- d->changeTagsAction = new QAction( i18n( "Change tags..." ), this );
- d->resourceTagCloud->setCustomNewTagAction( d->changeTagsAction );
+ QLabel* changeTagsLabel = new QLabel( "<p align=center><a style=\"font-size:small;\" href=\"dummy\">" + i18n( "Change tags..." ) + "</a>", this );
+ connect( changeTagsLabel, SIGNAL( linkActivated( const QString ) ),
+ this, SLOT( _k_slotShowTaggingPopup() ) );
+ layout->addWidget( changeTagsLabel );
// the popup tag cloud
d->popup = new TaggingPopup;
connect( d->popup, SIGNAL( tagAdded( const Nepomuk::Tag& ) ),
this, SLOT( slotTagAdded( const Nepomuk::Tag& ) ) );
- connect( d->changeTagsAction, SIGNAL( activated() ),
- this, SLOT( _k_slotShowTaggingPopup() ) );
-
connect( d->resourceTagCloud, SIGNAL( tagClicked( const Nepomuk::Tag& ) ),
this, SIGNAL( tagClicked( const Nepomuk::Tag& ) ) );
}
QSize Nepomuk::TagCloud::minimumSizeHint() const
{
+ return QFrame::minimumSizeHint();
// If we have tags d->rebuildCloud() has been called at least once,
// thus, we have proper rects (i.e. needed sizes)
if ( d->nodes.isEmpty() && !d->newTagButtonEnabled ) {
// If we have tags d->rebuildCloud() has been called at least once,
// thus, we have proper rects (i.e. needed sizes)
+ // FIXME: add zoom here
+
if ( d->cachedHfwWidth != contentsWidth ) {
// have to keep in mind the frame
contentsWidth -= frameWidth()*2;