connect( Kita::FavoriteBoards::getInstance(), SIGNAL( changed() ), SLOT( refreshFavoriteBoards() ) );
connect( this, SIGNAL( openURLRequestExt( const KURL&, const KParts::URLArgs&, QString, int, const KURL& ) ),
signalCollection, SIGNAL( openURLRequestExt( const KURL& , const KParts::URLArgs&, QString, int, const KURL& ) ) );
+ connect( this, SIGNAL( openBoard( const KURL& ) ), signalCollection, SIGNAL( openBoard( const KURL& ) ) );
connect( SearchCombo, SIGNAL( textChanged( const QString& ) ),
SLOT( filter( const QString& ) ) );
}
return ;
}
- emit openURLRequestExt( boardURL, KParts::URLArgs(), "kita_open_2chboard", 1 );
+ emit openBoard( boardURL );
}
void KitaBBSView::setFont( const QFont& font )
emit openURLRequestExt( boardURL, KParts::URLArgs(), "text/html" );
break;
case Menu_OpenWithNewTab:
- emit openURLRequestExt( boardURL, KParts::URLArgs(), "kita_open_2chboard", 1 );
+ emit openBoard( boardURL );
break;
case Menu_CopyURL:
clipboard->setText( boardURL_upToDate.prettyURL(), QClipboard::Clipboard );
switch ( button ) {
case MidButton:
- emit openURLRequestExt( boardURL, KParts::URLArgs(), "kita_open_2chboard", 1 );
+ emit openBoard( boardURL );
break;
case LeftButton:
- emit openURLRequestExt( boardURL, KParts::URLArgs(), "kita_open_2chboard", 1 );
+ emit openBoard( boardURL );
break;
}
}
bool downloadBoardList();
signals:
+ void openBoard( const KURL& url );
void openURLRequestExt( const KURL& url, const KParts::URLArgs& args = KParts::URLArgs(),
QString mimetype = QString::null,
int usr1 = 0,
/* to : KitaMainWindow */
void bookmarked( const QString& datURL, bool on );
+ void openBoard( const KURL& url );
void openURLRequest( const KURL& url, const KParts::URLArgs& args = KParts::URLArgs() );
/**
*
* @param url URL to open.
* @param args arguments of URL. @see KParts::URLArgs
* @param mimetype MIME Type to open.
- * "kita_open_2chboard" : open the board.
* "kita_open_2chthread" : open the thread.
* "text/html" : open url with web browser.
* QString::null : use KIO::NetAccess::mimetype to decide mime type of url.
// allow the view to change the statusbar and caption
Kita::SignalCollection* signalCollection = Kita::SignalCollection::getInstance();
+ connect( signalCollection, SIGNAL( openBoard( const KURL& ) ), SLOT( slotOpenBoard( const KURL& ) ) );
connect( signalCollection, SIGNAL( openURLRequest( const KURL&, const KParts::URLArgs& ) ),
SLOT( slotOpenURLRequest( const KURL&, const KParts::URLArgs& ) ) );
slotOpenURLRequestExt( url, args );
}
+void KitaMainWindow::slotOpenBoard( const KURL& url )
+{
+ m_boardTab->loadBoard( url );
+}
/* open url */
/*
.arg( args.newTab() ? "yes" : "no" )
.arg( args.reload ? "yes" : "no" ) << endl;
- /* open 2ch board */
- /* if usr1 == 1, open the board with new tab. */
- if ( mimetype == "kita_open_2chboard" ) {
- m_boardTab->loadBoard( url );
- return ;
- }
-
/* open 2ch thread */
/* if usr1 == 1, open the thread with new tab. */
if ( mimetype == "kita_open_2chthread" ) {
void slotCheckSubjectToggleAction( bool check );
void slotCheckWriteToggleAction( bool check );
void slotEditCopy();
+ void slotOpenBoard( const KURL& url );
void slotOpenURLRequest( const KURL& url, const KParts::URLArgs& );
void slotOpenURLRequestExt( const KURL& url, const KParts::URLArgs& args,
QString mimetype = QString::null,
* (at your option) any later version. *
***************************************************************************/
#include "newthreadwriteview.h"
+#include "libkita/signalcollection.h"
#include "libkita/qcp932codec.h"
#include "libkita/boardmanager.h"
#include "libkita/datmanager.h"
initUI();
initThreadNameField( newThreadName );
+
+ connect( this, SIGNAL( openBoard( const KURL& ) ),
+ Kita::SignalCollection::getInstance(), SIGNAL( openBoard( const KURL& ) ) );
}
/* reload board */
QString board = Kita::BoardManager::boardURL( m_datURL );
- emit openURLRequestExt( board, KParts::URLArgs(), "kita_open_2chboard", 0 );
+ emit openBoard( board );
emit closeCurrentTab(); /* to KitaWriteTabWidget */
}
*/
class KitaNewThreadWriteView : public KitaWriteView
{
+ Q_OBJECT
+
QString getPostStr();
QString getMachiBBSPostStr();
QString getJBBSPostStr();
~KitaNewThreadWriteView();
+signals:
+ void openBoard( const KURL& url );
};
#endif