OSDN Git Service

show more property.
authorikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Wed, 6 Oct 2004 15:12:40 +0000 (15:12 +0000)
committerikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Wed, 6 Oct 2004 15:12:40 +0000 (15:12 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@1417 56b19765-1e22-0410-a548-a0f45d66c51a

kita/src/kitasubjectview.cpp
kita/src/libkita/cache.cpp
kita/src/libkita/cache.h
kita/src/libkita/datmanager.cpp
kita/src/libkita/datmanager.h
kita/src/threadproperty.ui

index 8380b2a..689ee3b 100644 (file)
@@ -361,6 +361,7 @@ void KitaSubjectView::slotContextMenuRequested( QListViewItem* item, const QPoin
             propertyWidget->threadURLLabel->setText( datURL.url() );
             propertyWidget->threadNameLabel->setText( Kita::DatManager::threadName( datURL ) );
             propertyWidget->cachePathLabel->setText( Kita::DatManager::getCachePath( datURL ) );
+            propertyWidget->indexPathLabel->setText( Kita::DatManager::getCacheIndexPath( datURL ) );
             propertyWidget->show();
         }
         break;
index 2c4c5d7..0fd0cf4 100644 (file)
@@ -34,6 +34,15 @@ QString Cache::getPath( const KURL& datURL )
     return baseDir() + path;
 }
 
+QString Cache::getIndexPath( const KURL& datURL )
+{
+    QString path = getPath( datURL );
+    if ( path == QString::null ) {
+        return QString::null;
+    } else {
+        return path + ".idx";
+    }
+}
 
 /*------------------------------------*/
 /* for Image files                    */
@@ -86,7 +95,7 @@ QString Cache::hashString( const KURL& url )
 /* private */
 QString Cache::getImgBaseDir()
 {
-    QString basedir = baseDir() + "image/";    
+    QString basedir = baseDir() + "image/";
     return basedir;
 }
 
@@ -98,6 +107,6 @@ QString Cache::getImgFileName( const KURL& url )
     host.replace( QChar( '.' ), QChar( '_' ) );
 
     QString filename = url.fileName().lower();
-   
-    return host +  "_" +  hashString( url ) + filename;
+
+    return host + "_" + hashString( url ) + filename;
 }
index 1389c20..3eeef6d 100644 (file)
@@ -23,15 +23,16 @@ namespace Kita
     class Cache
     {
         static QString baseDir();
-       static QString subDir( const KURL& url );
-       static QString hashString( const KURL& url );
-       static QString getImgBaseDir();
-       static QString getImgFileName( const KURL& src);
+        static QString subDir( const KURL& url );
+        static QString hashString( const KURL& url );
+        static QString getImgBaseDir();
+        static QString getImgFileName( const KURL& src );
 
     public:
-        static QString getPath( const KURL& url );
-       static QString getImgPath( const KURL& url);
-       static QString getImgIdxPath( const KURL& url); 
+        static QString getPath( const KURL& datURL );
+        static QString getIndexPath( const KURL& datURL );
+        static QString getImgPath( const KURL& url );
+        static QString getImgIdxPath( const KURL& url );
     };
 
 }
index 78376c9..437c916 100644 (file)
@@ -446,6 +446,14 @@ const QString DatManager::getCachePath( const KURL& url )
     return Kita::Cache::getPath( datURL );
 }
 
+const QString DatManager::getCacheIndexPath( const KURL& url )
+{
+    QMutexLocker locker( &m_mutex );
+
+    KURL datURL = Kita::ParseMisc::parseURLonly( url );
+    return Kita::Cache::getIndexPath( datURL );
+}
+
 /*---------------------------------------*/
 /* HTML data */
 
index 2054f48..bfe222f 100644 (file)
@@ -72,6 +72,7 @@ namespace Kita
         static const QString boardID( const KURL& url );
 
         static const QString getCachePath( const KURL& url );
+        static const QString getCacheIndexPath( const KURL& url );
 
         /* HTML data */
         static QString getHtml( const KURL& url, int startnum, int endnum );
index fceec44..e48cc9c 100644 (file)
@@ -9,7 +9,7 @@
             <x>0</x>
             <y>0</y>
             <width>790</width>
-            <height>492</height>
+            <height>494</height>
         </rect>
     </property>
     <property name="caption">
     </widget>
     <widget class="QLabel">
         <property name="name">
+            <cstring>threadURLLabel</cstring>
+        </property>
+        <property name="geometry">
+            <rect>
+                <x>130</x>
+                <y>10</y>
+                <width>650</width>
+                <height>20</height>
+            </rect>
+        </property>
+        <property name="text">
+            <string></string>
+        </property>
+    </widget>
+    <widget class="QLabel">
+        <property name="name">
+            <cstring>threadNameLabel</cstring>
+        </property>
+        <property name="geometry">
+            <rect>
+                <x>130</x>
+                <y>40</y>
+                <width>650</width>
+                <height>20</height>
+            </rect>
+        </property>
+        <property name="text">
+            <string></string>
+        </property>
+    </widget>
+    <widget class="QLabel">
+        <property name="name">
             <cstring>cachePathLabel0</cstring>
         </property>
         <property name="geometry">
     </widget>
     <widget class="QLabel">
         <property name="name">
-            <cstring>threadURLLabel</cstring>
+            <cstring>cachePathLabel</cstring>
         </property>
         <property name="geometry">
             <rect>
                 <x>130</x>
-                <y>10</y>
+                <y>70</y>
                 <width>650</width>
                 <height>20</height>
             </rect>
     </widget>
     <widget class="QLabel">
         <property name="name">
-            <cstring>threadNameLabel</cstring>
+            <cstring>indexPathLabel0</cstring>
         </property>
         <property name="geometry">
             <rect>
-                <x>130</x>
-                <y>40</y>
-                <width>650</width>
+                <x>10</x>
+                <y>100</y>
+                <width>110</width>
                 <height>20</height>
             </rect>
         </property>
         <property name="text">
-            <string></string>
+            <string>Index Path</string>
         </property>
     </widget>
     <widget class="QLabel">
         <property name="name">
-            <cstring>cachePathLabel</cstring>
+            <cstring>indexPathLabel</cstring>
         </property>
         <property name="geometry">
             <rect>
                 <x>130</x>
-                <y>70</y>
+                <y>100</y>
                 <width>650</width>
                 <height>20</height>
             </rect>