ArtistView::ArtistView(QWidget *parent) : View(parent) , currentSimilarJob(0) { engine=ContextEngine::create(this); refreshAction = ActionCollection::get()->createAction("refreshartist", i18n("Refresh Artist Information"), "view-refresh"); connect(refreshAction, SIGNAL(triggered()), this, SLOT(refresh())); connect(engine, SIGNAL(searchResult(QString,QString)), this, SLOT(searchResponse(QString,QString))); connect(Covers::self(), SIGNAL(artistImage(Song,QImage,QString)), SLOT(artistImage(Song,QImage,QString))); connect(Covers::self(), SIGNAL(coverUpdated(Song,QImage,QString)), SLOT(artistImageUpdated(Song,QImage,QString))); connect(text, SIGNAL(anchorClicked(QUrl)), SLOT(show(QUrl))); text->setContextMenuPolicy(Qt::CustomContextMenu); connect(text, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showContextMenu(QPoint))); setStandardHeader(i18n("Artist")); int imageHeight=fontMetrics().height()*14; int imageWidth=imageHeight*1.5; setPicSize(QSize(imageWidth, imageHeight)); clear(); if (constCacheAge>0) { clearCache(); QTimer *timer=new QTimer(this); connect(timer, SIGNAL(timeout()), this, SLOT(clearCache())); timer->start((int)((constCacheAge/2.0)*1000*24*60*60)); } }
OnlineView::OnlineView(QWidget *p) : View(p) { setStandardHeader(i18n("Song Information")); int imageSize=fontMetrics().height()*18; setPicSize(QSize(imageSize, imageSize)); }