break;
case Menu_Favorites:
if ( isFavorites ) {
- emit bookmarked( datURL, false );
+ ViewMediator::getInstance()->bookmark( datURL, false );
} else {
- emit bookmarked( datURL, true );
+ ViewMediator::getInstance()->bookmark( datURL, true );
}
break;
case Menu_DeleteLog:
clipboard->setText( cliptxt , QClipboard::Selection );
break;
case Menu_RemoveFromFavorites:
- emit bookmarked( datURL, false );
+ ViewMediator::getInstance()->bookmark( datURL, false );
break;
default:
break;
/*--------------------------------*/
/* to : KitaMainWindow */
- void bookmarked( const QString& datURL, bool on );
void openURLRequest( const KURL& url, const KParts::URLArgs& args = KParts::URLArgs() );
/**
*
connect( signalCollection, SIGNAL( openURLRequestExt( const KURL&, const QString ) ),
SLOT( slotOpenURLRequestExt( const KURL&, const QString ) ) );
- connect( signalCollection, SIGNAL( bookmarked( const QString&, bool ) ),
- SLOT( bookmark( const QString&, bool ) ) );
-
connect( this, SIGNAL( favoritesUpdated() ),
signalCollection, SIGNAL( favoritesUpdated() ) );
void load( const KURL& url );
void slotSetMainStatusbar( const QString& statusStr );
void setUrl( const KURL& url );
+ void bookmark( const QString& datURL, bool on );
private slots:
- void bookmark( const QString& datURL, bool on );
void closeSubjectView();
void login();
void newToolbarConfig();
SLOT( slotHideButton( bool ) ) );
connect( subjectList, SIGNAL( mouseButtonClicked( int, QListViewItem*, const QPoint&, int ) ),
SLOT( slotMouseButtonClicked( int, QListViewItem* ) ) );
- connect( this, SIGNAL( bookmarked( const QString&, bool ) ),
- Kita::SignalCollection::getInstance(), SIGNAL( bookmarked( const QString&, bool ) ) );
connect( this, SIGNAL( openURLRequestExt( const KURL&, const QString ) ),
Kita::SignalCollection::getInstance(), SIGNAL( openURLRequestExt( const KURL&, const QString ) ) );
}
signals:
void openURLRequestExt( const KURL& url, const QString mimetype = QString::null );
- void bookmarked( const QString& datURL, bool on );
};
}
SLOT( slotCloseButton() ) );
Kita::SignalCollection* signalCollection = Kita::SignalCollection::getInstance();
- connect( this, SIGNAL( bookmarked( const QString&, bool ) ),
- signalCollection, SIGNAL( bookmarked( const QString&, bool ) ) );
connect( this, SIGNAL( updateSubjectTab( const KURL& ) ),
signalCollection, SIGNAL( updateSubjectTab( const KURL& ) ) );
connect( this, SIGNAL( updateThreadTab( const KURL& ) ),
void KitaThreadView::slotBookmarkButtonClicked( bool on )
{
- emit bookmarked( m_datURL.prettyURL(), on );
+ ViewMediator::getInstance()->bookmark( m_datURL.prettyURL(), on );
}
void popupMenu( KXMLGUIClient*, const QPoint&, const KURL&, const QString&, mode_t );
void updateSubjectTab( const KURL& datURL );
void updateThreadTab( const KURL& datURL );
- void bookmarked( const QString& datURL, bool on );
void showThreadCompleted(); /* to KitaThreadPart */
void openURLRequestExt( const KURL& url, const QString mimetype = QString::null );
m_mainWindow->setCaption( str );
}
+
+void ViewMediator::bookmark( const QString& datURL, bool on )
+{
+ Q_ASSERT( m_mainWindow );
+
+ m_mainWindow->bookmark( datURL, on );
+}
void setMainStatusBar( const QString& statusStr );
void setMainURLLine( const KURL& url );
void setMainCaption( const QString& str );
+ void bookmark( const QString& datURL, bool on );
};
#endif