OSDN Git Service

add idou combo.
authorikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Sat, 29 May 2004 07:34:49 +0000 (07:34 +0000)
committerikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Sat, 29 May 2004 07:34:49 +0000 (07:34 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@1108 56b19765-1e22-0410-a548-a0f45d66c51a

kita/src/libkita/kita-utf8.h
kita/src/part/kitathreadview.cpp
kita/src/part/kitathreadview.h
kita/src/part/kitathreadviewbase.ui

index 5b2f00a..c5726c9 100644 (file)
@@ -29,6 +29,7 @@
 #define KITAUTF8_SAIGO  "最後"
 #define KITAUTF8_KOWARE   "ここは壊れています。"
 #define KITAUTF8_ABONE  "あぼ〜ん"
+#define KITAUTF8_GOTO  "移動"
 #define KITAUTF8_FRAME1 "│"
 #define KITAUTF8_FRAME2 "├"
 #define KITAUTF8_FRAME3 "└"
index 3f09630..9f525ca 100644 (file)
@@ -22,6 +22,7 @@
 #include <kdebug.h>
 #include <kapplication.h>
 #include <ktextbrowser.h>
+#include <kcombobox.h>
 
 #include <dom/html_inline.h>
 #include <dom/html_base.h>
@@ -114,6 +115,8 @@ KitaThreadView::KitaThreadView( QWidget* parent, const char* name )
              m_threadPart, SLOT( gobackAnchor() ) );
     connect( ReloadButton, SIGNAL( clicked() ),
              SLOT( slotReloadButton() ) );
+    connect( gotoCombo, SIGNAL( activated( int ) ),
+             SLOT( slotComboActivated( int ) ) );
 
     KParts::BrowserExtension* ext = m_threadPart->browserExtension();
     connect( ext, SIGNAL( openURLRequest( const KURL&, const KParts::URLArgs& ) ),
@@ -1036,6 +1039,16 @@ void KitaThreadView::updateInfo(){
     emit showThreadCompleted( Kita::DatManager::thread_url(m_datURL) );
     m_domtree->findTextInit();
     updateButton();
+    
+    gotoCombo->clear();
+    gotoCombo->insertItem( Kita::ParseMisc::utf8ToUnicode( KITAUTF8_GOTO ) );
+    gotoCombo->insertItem( Kita::ParseMisc::utf8ToUnicode( KITAUTF8_KOKOYON ) );
+    for( int i = 1; i < m_thread->resNum(); i += 100 ) {
+        gotoCombo->insertItem( QString().setNum( i ) + "-" );
+    }
+    gotoCombo->insertItem( Kita::ParseMisc::utf8ToUnicode( KITAUTF8_SAIGO ) );
+    gotoCombo->adjustSize();
+    
     emit thread( m_thread );
     showStatusBar( "" );
     m_threadPart->view() ->setFocus();
@@ -1240,7 +1253,20 @@ void KitaThreadView::slotSearchButton()
 }
 // vim:sw=2:
 
-
+void KitaThreadView::slotComboActivated( int index )
+{
+    if ( index == gotoCombo->count() - 1 ) {
+        // last
+        gotoAnchor( "footer" );
+    } else if ( index == 1 ) {
+        // kokomade yonda
+        gotoAnchor( "kokomade_yonda" );
+    } else if ( index != 0 ) {
+        QString numText = gotoCombo->text( index );
+        numText.truncate( numText.length() - 1 );
+        gotoAnchor( numText );
+    }
+}
 
 /*--------------------------------------------------------*/
 /* These public functions are used for KitaNavi & preview */
index 87d790a..9cf3f2f 100644 (file)
@@ -146,6 +146,7 @@ private slots:
     void slotBookmarkButtonClicked( bool on );
     void slotWriteButtonClicked( QString resstr = QString::null );
     void slotShowErrorDialog( const QString& input, const KURL& urlOfInput = 0 );
+    void slotComboActivated( int index );
     void hidePopup();
 
 signals:
index a266acb..2a82a9b 100644 (file)
@@ -1,4 +1,4 @@
-<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
 <class>KitaThreadViewBase</class>
 <widget class="QWidget">
     <property name="name">
@@ -8,7 +8,7 @@
         <rect>
             <x>0</x>
             <y>0</y>
-            <width>679</width>
+            <width>804</width>
             <height>480</height>
         </rect>
     </property>
@@ -62,8 +62,8 @@
                     <property name="text">
                         <string></string>
                     </property>
-                    <property name="pixmap">
-                        <pixmap>image0</pixmap>
+                    <property name="iconSet">
+                        <iconset>image0</iconset>
                     </property>
                     <property name="toolTip" stdset="0">
                         <string>write</string>
                         <string>reload thread</string>
                     </property>
                 </widget>
+                <widget class="KComboBox">
+                    <property name="name">
+                        <cstring>gotoCombo</cstring>
+                    </property>
+                    <property name="minimumSize">
+                        <size>
+                            <width>200</width>
+                            <height>0</height>
+                        </size>
+                    </property>
+                </widget>
                 <spacer>
                     <property name="name">
                         <cstring>spacer1</cstring>
                     </property>
                     <property name="sizeHint">
                         <size>
-                            <width>32</width>
+                            <width>82</width>
                             <height>20</height>
                         </size>
                     </property>
 </widget>
 <images>
     <image name="image0">
-        <data format="XPM.GZ" length="1310">789c5dd2c972e2301006e03b4fe1821b35e5d8b22ddb353507c8be40c84e32350759928110083b81d4bcfbb8bb2530031cfcfddd965bc24775a7db6939f5a3ca7c211603e9c8be983975b51c8d36bffffcfaae547dee143f1e387ef547a5ea3ad2697f8e355cbf14d7b5d06732c0d21930125ef101fac4288d047006e4cc56b7868997003d601c70c5b13944669ef4b17949b4d573621cc501f0de50c519300226bba56e88b6b96198124f89894ff74e81696887bc23fa898f433e13139586c01152dae63550ec9ac744e631ac0aa4b4d577a2ad6ac39038374c580a7c23a64ae07327c04cd9e7f68132b27c25865e887f4a40b4a7d1210a9de15209316342023951b24c019f2c6504944865b7b021da993f76c4997b8692784d0c427a55164015d9ea3131f0a8fa85d491e20c7845cc384da5887648465442e190b786c517f809d4dcbe84b9a1597948e43ef1c430a2b3aa1125a7edc7869a38d811c758118b0d231f0db5e6c02e7237e4255133aa360d05b16568ee6d0373ae758ebc20e64ce30633641e2621cefc402cead8ec963e3591c9ff32a5f35eff301bbc0f3ffaa3834c8d3f7b93e9ac9cd5e6c3457f345b96b2d5fa6b33996e1bcd7d562c7f5c74355c7797adc6271bb8b1b9cf6aebbc78e2f614ae4d86734dcfcedd7d767179755d74dd344b59ab7ddbb99bdd9b01287b787c7a7e59bae5acfbfae6f9ac79900561c44b0781599c948fcbadfefd59f907bcf223f7</data>
+        <data format="PNG" length="505">89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff61000001c049444154789c9591bf6bdb5014853f1583553054010f76277973a08590adde2ca340253ad4a24b4ab3043a44f560848776ed7fd0d2315bd776eca80c81e7214532a4a00c067b303c0f862a9335185e0739263fdde4cef79cf3dd733521040f1913a544dbc3dbda261a443c7a88b8b2982bb1f79686ed104d4664d329857b27eb4525dabb349a16f2b84f364c48e07e0695c55c85ed5dac170de4499f74298ee0ff27982815bdff80d5b4f87b1a93fd49182dc5d5cec17a02b35454e18e4bc37690c721e9709c27eb3ab5ae8fdf0dee26a82ce64ab43d2cdb617e1a930dc7abe45ad7a7f5cad3ce8663ed5603b35454626f9f46d341f643d2414c028825b6df0d56bb374e30512adc71b16c07797444b6c416ba4eed6340cb76b5b3e178b57f85e0e2cf96ed20e3fc55311002d58e4fcb76b5eb812b83ad677565989b6c7f39442679db17856df602825e705d7bd5205b64e82503ea35b24f9f892b95fce65e40eb755ed85a830ddd204d53e444128fc6fc2857a9760e705fdec4be3c05807af989128e8b7cb74f7f2090b394c39fdf318c0d2e1776a741f2f51bbf7ec7e8cf05ed371e5ae1b1369d9d339d9daf15036842084c5da9d144a2959faec5bd6dfe0143edc069ffe7a2390000000049454e44ae426082</data>
     </image>
 </images>
 <slots>
     <slot>subjectlinkClicked(const QString&amp;)</slot>
 </slots>
 <layoutdefaults spacing="6" margin="11"/>
+<includehints>
+    <includehint>kcombobox.h</includehint>
+</includehints>
 </UI>