|
|
|
@ -53,7 +53,7 @@
|
|
|
|
|
using namespace InfoDisplay;
|
|
|
|
|
|
|
|
|
|
CHTMLReadDisplay::CHTMLReadDisplay(CReadWindow* readWindow, TQWidget* parentWidget)
|
|
|
|
|
: KHTMLPart((m_view = new CHTMLReadDisplayView(this, parentWidget ? parentWidget : readWindow)), TQT_TQOBJECT(readWindow ? readWindow : parentWidget)),
|
|
|
|
|
: TDEHTMLPart((m_view = new CHTMLReadDisplayView(this, parentWidget ? parentWidget : readWindow)), TQT_TQOBJECT(readWindow ? readWindow : parentWidget)),
|
|
|
|
|
CReadDisplay(readWindow),
|
|
|
|
|
m_currentAnchorCache(TQString()) {
|
|
|
|
|
setDNDEnabled(false);
|
|
|
|
@ -187,17 +187,17 @@ void CHTMLReadDisplay::setText( const TQString& newText ) {
|
|
|
|
|
|
|
|
|
|
/** No descriptions */
|
|
|
|
|
const bool CHTMLReadDisplay::hasSelection() {
|
|
|
|
|
return KHTMLPart::hasSelection();
|
|
|
|
|
return TDEHTMLPart::hasSelection();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Reimplementation. */
|
|
|
|
|
TQScrollView* CHTMLReadDisplay::view() {
|
|
|
|
|
return KHTMLPart::view();
|
|
|
|
|
return TDEHTMLPart::view();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CHTMLReadDisplay::selectAll() {
|
|
|
|
|
KHTMLPart::selectAll();
|
|
|
|
|
TDEHTMLPart::selectAll();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** No descriptions */
|
|
|
|
@ -212,7 +212,7 @@ void CHTMLReadDisplay::moveToAnchor( const TQString& anchor ) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CHTMLReadDisplay::urlSelected( const TQString& url, int button, int state, const TQString& _target, KParts::URLArgs args) {
|
|
|
|
|
KHTMLPart::urlSelected(url, button, state, _target, args);
|
|
|
|
|
TDEHTMLPart::urlSelected(url, button, state, _target, args);
|
|
|
|
|
m_urlWorkaroundData.doWorkaround = false;
|
|
|
|
|
// tqWarning("clicked: %s", url.latin1());
|
|
|
|
|
if (!url.isEmpty() && CReferenceManager::isHyperlink(url)) {
|
|
|
|
@ -246,7 +246,7 @@ void CHTMLReadDisplay::urlSelected( const TQString& url, int button, int state,
|
|
|
|
|
|
|
|
|
|
/** Reimplementation. */
|
|
|
|
|
void CHTMLReadDisplay::tdehtmlMouseReleaseEvent( tdehtml::MouseReleaseEvent* event ) {
|
|
|
|
|
KHTMLPart::tdehtmlMouseReleaseEvent(event);
|
|
|
|
|
TDEHTMLPart::tdehtmlMouseReleaseEvent(event);
|
|
|
|
|
|
|
|
|
|
m_dndData.mousePressed = false;
|
|
|
|
|
m_dndData.isDragging = false;
|
|
|
|
@ -300,7 +300,7 @@ void CHTMLReadDisplay::tdehtmlMousePressEvent( tdehtml::MousePressEvent* event )
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
KHTMLPart::tdehtmlMousePressEvent(event);
|
|
|
|
|
TDEHTMLPart::tdehtmlMousePressEvent(event);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Reimplementation for our drag&drop system. Also needed for the mouse tracking */
|
|
|
|
@ -324,13 +324,13 @@ void CHTMLReadDisplay::tdehtmlMouseMoveEvent( tdehtml::MouseMoveEvent* e ) {
|
|
|
|
|
CDragDropMgr::ItemList dndItems;
|
|
|
|
|
//no description!
|
|
|
|
|
dndItems.append( CDragDropMgr::Item(module, key, TQString()) );
|
|
|
|
|
d = CDragDropMgr::dragObject(dndItems, KHTMLPart::view()->viewport());
|
|
|
|
|
d = CDragDropMgr::dragObject(dndItems, TDEHTMLPart::view()->viewport());
|
|
|
|
|
}
|
|
|
|
|
else if ((m_dndData.dragType == DNDData::Text) && !m_dndData.selection.isEmpty()) {
|
|
|
|
|
// create a new plain text drag!
|
|
|
|
|
CDragDropMgr::ItemList dndItems;
|
|
|
|
|
dndItems.append( CDragDropMgr::Item(m_dndData.selection) ); //no description!
|
|
|
|
|
d = CDragDropMgr::dragObject(dndItems, KHTMLPart::view()->viewport());
|
|
|
|
|
d = CDragDropMgr::dragObject(dndItems, TDEHTMLPart::view()->viewport());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (d) {
|
|
|
|
@ -362,7 +362,7 @@ void CHTMLReadDisplay::tdehtmlMouseMoveEvent( tdehtml::MouseMoveEvent* e ) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
KHTMLPart::tdehtmlMouseMoveEvent(e);
|
|
|
|
|
TDEHTMLPart::tdehtmlMouseMoveEvent(e);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** The Mag window update happens here if the mouse has not moved to another node after starting the timer.*/
|
|
|
|
@ -422,7 +422,7 @@ void CHTMLReadDisplay::timerEvent( TQTimerEvent *e ) {
|
|
|
|
|
|
|
|
|
|
// ---------------------
|
|
|
|
|
|
|
|
|
|
CHTMLReadDisplayView::CHTMLReadDisplayView(CHTMLReadDisplay* displayWidget, TQWidget* parent) : KHTMLView(displayWidget, parent), m_display(displayWidget) {
|
|
|
|
|
CHTMLReadDisplayView::CHTMLReadDisplayView(CHTMLReadDisplay* displayWidget, TQWidget* parent) : TDEHTMLView(displayWidget, parent), m_display(displayWidget) {
|
|
|
|
|
viewport()->setAcceptDrops(true);
|
|
|
|
|
setMarginWidth(4);
|
|
|
|
|
setMarginHeight(4);
|
|
|
|
@ -441,7 +441,7 @@ void CHTMLReadDisplayView::popupMenu( const TQString& url, const TQPoint& pos) {
|
|
|
|
|
|
|
|
|
|
/** Reimplementation from TQScrollView. Sets the right slots */
|
|
|
|
|
void CHTMLReadDisplayView::polish() {
|
|
|
|
|
KHTMLView::polish();
|
|
|
|
|
TDEHTMLView::polish();
|
|
|
|
|
connect( part(), TQT_SIGNAL(popupMenu(const TQString&, const TQPoint&)),
|
|
|
|
|
this, TQT_SLOT(popupMenu(const TQString&, const TQPoint&)));
|
|
|
|
|
}
|
|
|
|
|