OSDN Git Service

show popup, part 1
authorikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Mon, 30 Jun 2003 15:38:00 +0000 (15:38 +0000)
committerikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Mon, 30 Jun 2003 15:38:00 +0000 (15:38 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@385 56b19765-1e22-0410-a548-a0f45d66c51a

kita/src/part/kitathreadview.cpp
kita/src/part/kitathreadview.h

index f6eb112..3ba5861 100644 (file)
@@ -16,6 +16,7 @@
 #include <qlabel.h>
 #include <qcombobox.h>
 #include <qprogressdialog.h>
+#include <qcursor.h>
 
 #include <time.h>
 
@@ -65,6 +66,7 @@ KitaThreadView::KitaThreadView(QWidget *parent, const char *name)
     , m_parent( parent )
 //    , m_currentJob( 0 )
     , m_labelMaxLength( 60 )
+    , m_popup( 0 )
 {
   m_threadPart = new KitaHTMLPart(threadFrame);
   QHBoxLayout* aLayout = new QHBoxLayout(threadFrame);
@@ -380,6 +382,25 @@ void KitaThreadView::searchNext(const QStringList &query)
 void KitaThreadView::slotOnURL(const QString& url)
 {
   emit signalChangeStatusbar(url);
+
+#if 0
+  // BUG: view¤«¤é¥Þ¥¦¥¹¥«¡¼¥½¥ë¤¬³°¤ì¤¿»þ¤ÎÂнè¤ò¤·¤Æ¤¤¤Ê¤¤
+  if ( ! url.isEmpty() ) {
+    KHTMLView* view = m_threadPart->view();
+
+    if( ! m_popup ) {
+      m_popup = new QLabel( view, "res_popup", WStyle_Customize | WStyle_NoBorder | WStyle_Tool );
+    }
+    m_popup->setText( url );
+
+    m_popup->move( view->mapFromGlobal( QCursor::pos() ) );
+    m_popup->adjustSize();
+
+    m_popup->show();
+  } else {
+    m_popup->hide();
+  }
+#endif
 }
 
 void KitaThreadView::slotPopupMenu( KXMLGUIClient *client, const QPoint &global, const KURL &url, const QString &mimeType, mode_t mode)
index 749062e..0954db6 100644 (file)
@@ -71,6 +71,7 @@ private: // Private attributes
   QWidget * m_parent;
   int m_labelMaxLength;
   Kita::PostInfo m_postInfo;
+  QLabel* m_popup;
 
   void insertSearchCombo();
   KURL filterReadCGI( const KURL& );