From 19dc5d8a2225822e41efdb432e6598e6cb9c4070 Mon Sep 17 00:00:00 2001 From: ogirin Date: Sun, 23 Mar 2003 08:33:14 +0000 Subject: [PATCH] Move them to part. git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@107 56b19765-1e22-0410-a548-a0f45d66c51a --- kita/src/Makefile.am | 16 +- kita/src/kitathreadview.cpp | 601 -------------------------------------- kita/src/kitathreadview.h | 104 ------- kita/src/kitathreadviewbase.ui | 168 ----------- kita/src/kitawritedialog.cpp | 156 ---------- kita/src/kitawritedialog.h | 87 ------ kita/src/kitawritedialogbase.ui | 184 ------------ kita/src/kitawritedialogbase.ui.h | 21 -- kita/src/pencil.png | Bin 522 -> 0 bytes kita/src/qcp932codec.cpp | 178 ----------- kita/src/qcp932codec.h | 67 ----- 11 files changed, 13 insertions(+), 1569 deletions(-) delete mode 100644 kita/src/kitathreadview.cpp delete mode 100644 kita/src/kitathreadview.h delete mode 100644 kita/src/kitathreadviewbase.ui delete mode 100644 kita/src/kitawritedialog.cpp delete mode 100644 kita/src/kitawritedialog.h delete mode 100644 kita/src/kitawritedialogbase.ui delete mode 100644 kita/src/kitawritedialogbase.ui.h delete mode 100644 kita/src/pencil.png delete mode 100644 kita/src/qcp932codec.cpp delete mode 100644 kita/src/qcp932codec.h diff --git a/kita/src/Makefile.am b/kita/src/Makefile.am index 7d1c0e5..56e9572 100644 --- a/kita/src/Makefile.am +++ b/kita/src/Makefile.am @@ -1,20 +1,26 @@ ## Makefile.am for kita +SUBDIRS = part # this is the program that gets installed. it's name is used for all # of the other Makefile.am variables bin_PROGRAMS = kita kita_client +lib_LTLIBRARIES = kita.la # set the include path for X, qt and KDE -INCLUDES = $(all_includes) +INCLUDES = $(all_includes) -Ipart # the library search path. +kita_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -module -avoid-version kita_LDFLAGS = $(KDE_RPATH) $(all_libraries) # the libraries to link against. -kita_LDADD = -lkhtml $(LIB_KFILE) $(LIB_KDEPRINT) +kita_la_LIBADD = $(LIB_KFILE) $(LIB_KDEPRINT) ./part/libkitapart.la +kita_LDADD = kita.la # which sources should be compiled for kita -kita_SOURCES = main.cpp kita.cpp kitaview.cpp pref.cpp kitaiface.skel kitasubjectview.h kitasubjectview.cpp kitaboardview.h kitaboardview.cpp kitasubjectviewbase.ui kitathreadview.h kitathreadview.cpp kitathreadviewbase.ui kitaboardviewbase.ui kitawritedialogbase.ui kitawritedialog.h kitawritedialog.cpp qcp932codec.h qcp932codec.cpp kitawritedialogbase.ui.h +kita_la_SOURCES = main.cpp kita.cpp kitaview.cpp pref.cpp kitaiface.skel kitasubjectview.h kitasubjectview.cpp kitaboardview.h kitaboardview.cpp kitasubjectviewbase.ui kitaboardviewbase.ui + +kita_SOURCES = dummy.cpp # these are the headers for your project noinst_HEADERS = kita.h kitaview.h pref.h @@ -39,3 +45,7 @@ kdelnk_DATA = kita.desktop # this is where the XML-GUI resource file goes rcdir = $(kde_datadir)/kita rc_DATA = kitaui.rc + +dummy.cpp: + echo > dummy.cpp + diff --git a/kita/src/kitathreadview.cpp b/kita/src/kitathreadview.cpp deleted file mode 100644 index 110b199..0000000 --- a/kita/src/kitathreadview.cpp +++ /dev/null @@ -1,601 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2003 by Hideki Ikemoto * - * ikemo@wakaba.jp * - * linuxÈÄ ¥³¥ó¥«¥é¤×¤é¤°¤¤¤ó¤Î¿Í * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - ***************************************************************************/ - -#include -#include -#include -#include -#include -#include "qcp932codec.h" -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include "kitathreadview.h" -#include "kitawritedialog.h" - -#include - -static QString linkURL(QString); - -KitaThreadView::KitaThreadView(QWidget *parent, const char *name) - : KitaThreadViewBase(parent, name) - , m_parent( parent ) - , m_currentJob( 0 ) - , m_labelMaxLength( 60 ) -{ - threadPart = new KHTMLPart(threadFrame); - QHBoxLayout* aLayout = new QHBoxLayout(threadFrame); - - { // We must use KHTMLView::setFont(), don't we? - QFont font = threadPart->view()->font(); - // Use Mona font with a native scale. -#if 0 - font.setRawMode( true ); - font.setRawName("-mona-gothic-medium-r-normal--12-110-75-75-p-120-jisx0208.1990-0"); -#elif 0 - font.setFamily("Mona [gothic]"); - font.setPixelSize( 12 ); -#else - threadPart->setStandardFont("Gothic [Mona]"); - threadPart->setZoomFactor(120); // 12px; -#endif - threadPart->view()->setFont( font ); -#if 0 // provides you with mona font info. - QString info; - info += view()->font().family(); - info +="\n"; - info += QString("size: %1pt %2px\n").arg( view()->font().pointSizeFloat() ).arg( view()->font().pixelSize() ); - QMessageBox::information( 0, "", info ); -#endif - } - - { - SearchButton->setPixmap( SmallIcon("find") ); - HighLightButton->setPixmap( SmallIcon("idea") ); - } - - threadPart->enableMetaRefresh( false ); - aLayout->addWidget(threadPart->view()); - - connect( writeButton, SIGNAL(clicked()), SLOT(slotWriteButtonClicked())); - connect( threadPart, SIGNAL( nodeActivated(const DOM::Node &) ), SLOT( slotDOMNodeActivated(const DOM::Node &) ) ); - connect( threadPart, SIGNAL( onURL(const QString&) ), SLOT( slotOnURL(const QString&) ) ); - connect( SearchButton, SIGNAL( clicked() ), SLOT( slotSearchButton() ) ); - connect( SearchCombo, SIGNAL( activated(int) ), SLOT( slotSearchButton() ) ); - connect( HighLightButton, SIGNAL( toggled(bool) ), SLOT( slotHighLightenButton(bool) ) ); - - KParts::BrowserExtension * ext = threadPart->browserExtension(); - connect( ext, SIGNAL( openURLRequest(const KURL&, const KParts::URLArgs&) ), - SIGNAL( openURLRequest(const KURL&, const KParts::URLArgs&) ) ); - connect( ext, SIGNAL( createNewWindow (const KURL&, const KParts::URLArgs&) ), - SIGNAL( createNewWindow (const KURL&, const KParts::URLArgs&) ) ); - connect( ext, SIGNAL( setLocationBarURL(const QString &) ), - SIGNAL( setLocationBarURL(const QString &) ) ); - connect( ext, SIGNAL( enableAction(const char*, bool) ), - SIGNAL( enableAction(const char*, bool) ) ); -} - -KitaThreadView::~KitaThreadView() {} - -QString KitaThreadView::threadSubject() const -{ - return m_subject; -} - -void KitaThreadView::slotDOMNodeActivated(const DOM::Node &node) -{ - { //process Anchor tags. Anchor tags not proccessed here cause 'emit KParts::BrowserExtention::openURLRequest()' - DOM::HTMLAnchorElement anchor = node; - - if ( ! anchor.href().isEmpty() ) - { - QString boardName = m_datURL.path().section('/', 1, 1); - QString datnum = m_datURL.filename().section('.', 0, 0); - //QMessageBox::information( 0, "Anchor", QString("Anchor Activated:\n href= %1").arg( anchor.href().string() ) ); - { // treat link as Reference only. - QString href=anchor.href().string(); - if ( href.at(0) == '#' ) { - threadPart->gotoAnchor( href.mid(1) ); - return; - } - } - { // treat link as path. - KURL link; - link.setPath( anchor.href().string() ); - if ( link.path().section('/', -5, -4) == "test/read.cgi" - && link.path().section('/', -3, -3) == boardName - && link.path().section('/', -2, -2) == datnum ) - { - QString target; - bool ok; - link.filename().toInt( &ok ); - if ( ok ) - target = link.filename(); - else if ( link.filename().contains('-') ) { - target = link.filename().section('-', 0, 0); - if( target.isEmpty() ) target = "1"; - } else if ( link.filename().at(0) == 'l' ) - target = QString().setNum( m_rescount - link.filename().remove(0, 1).toInt() ); - // do jump to target. - if ( ! target.isEmpty() ) { - threadPart->gotoAnchor( target ); - return; - } - } - } // end: tread link as path. - } // end: anchor.href().isEmpty() - } // end of Anchor tags. -} - -void KitaThreadView::slotShowThread(const KURL& _datURL, const KURL& _boardURL, const QString& boardName) -{ - { //reset member variables associated with a thread. - m_prevquery = ""; - m_nextHit = 0; - m_hitcount = 0; - m_writeResult = ""; - m_threadData = ""; - m_subject = ""; - m_contents = ""; - } - - if ( _datURL.protocol() != "k2ch" ) { - KIO::SlaveConfig::self()->setConfigData("http", _datURL.host() , - "UserAgent", "Monazilla/1.00 (test)"); - } - m_datURL = _datURL; - m_boardURL = _boardURL; - m_boardID = m_boardURL.fileName(); - m_datName = m_datURL.fileName().section('.', 0, 0); - m_threadURL = KURL(m_boardURL, QString("../test/read.cgi/") + QString(m_boardURL.filename()) + QString("/") + QString( m_datURL.filename().section('.',0) ) ); - m_boardName = boardName; - - KIO::TransferJob* job = KIO::get(m_datURL, true, true); - m_currentJob = job; - - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - SLOT(slotReceiveThreadData(KIO::Job*, const QByteArray&))); - connect(job, SIGNAL(result(KIO::Job*)), SLOT(slotThreadResult(KIO::Job*))); - connect(job, SIGNAL(redirection(KIO::Job *, const KURL&) ), SLOT(slotRedirection(KIO::Job *, const KURL&) ) ); - - // use 'HTTP-Headers' metadata. - job->addMetaData("PropagateHttpHeader", "true"); -} - -void KitaThreadView::slotRedirection(KIO::Job *, const KURL & newURL) -{ - printf(" Redirected to newURL: %s\n", newURL.url().latin1() ); - m_datURL = newURL; - emit setLocationBarURL(newURL.url()); -} - -void KitaThreadView::slotReceiveThreadData(KIO::Job*, const QByteArray& data) -{ - QCString cstr(data.data(), data.size()+1); - m_threadData.append(cstr); -} - -void KitaThreadView::slotThreadResult(KIO::Job* job) -{ - m_currentJob = 0; - if(job->error()) { - job->showErrorDialog(); - return; - } - - QCp932Codec codec; - QTextStream stream(m_threadData, IO_ReadOnly); - stream.setCodec(&codec); - QString line; - QString text; - int num = 1; - - // parse HTTP headers - QStringList headerList = QStringList::split("\n", job->queryMetaData("HTTP-Headers")); - QRegExp regexp("Date: (...), (..) (...) (....) (..:..:..) .*"); - QString dateStr = headerList.grep(regexp)[0]; - if(regexp.search(dateStr) == -1) { - // invalid date format - serverTime = time(NULL); - } else { - // I hate this format ;p - QString usLocalDateStr = regexp.cap(1) + " " + regexp.cap(3) + " " + - regexp.cap(2) + " " + regexp.cap(5) + " " + regexp.cap(4); - - // 1970/01/01 00:00:00 GMT - QDateTime zeroTime(QDate(1970, 1, 1), QTime(0, 0)); - serverTime = zeroTime.secsTo(QDateTime::fromString(usLocalDateStr)); - } - - int total = m_threadData.length(); - int step = 0; - int divide = total / ( 100 / 5 ); - int next = divide; - QProgressDialog * progress = new QProgressDialog( m_parent ); - progress->setTotalSteps( static_cast(total * 0.7) ); - progress->setLabelText( "Parse DAT file....."); - progress->show(); - while(!stream.atEnd()) { - line = stream.readLine(); - QStringList list = QStringList::split("<>", line, true); - - if(list.size() != 5) { - // probably eof - break; - } - QString name = list[0]; - QString address = list[1]; - QString dateId = list[2]; - QString body = list[3]; - QString subject = list[4]; - - if(num == 1) { - m_subject = subject; - { - QString disp( m_subject ); - if ( ! m_boardName.isEmpty() ) { disp.prepend( QString("[%1]").arg(m_boardName) ); } - disp.truncate( m_labelMaxLength ); - subjectLabel->setText( disp ); - } - text += ""; - text += ""; - } - text += "
"; - text += ""; - text += QString::number(num); - text += " "; - if(address != "") { - text += "" + name + ""; - } else { - text += name; - } - text += " "; - text += dateId; - text += "
"; - text += linkURL(body); - text += "

"; // Using '/>' is Recommended for performance reasons. - - num++; - if( (step+=line.length()) > next ) { - progress->setProgress( step ); - next += divide; - } - } - delete progress; - m_rescount = num - 1; - - { - int target; - for ( target = 1; target < m_rescount; target += 100 ) - text += QString(" %2 ").arg(target).arg(target); - text += "
"; - } -#if 0 - text += QString("check new one.").arg( m_datURL.url() ).arg( m_rescount ); -#endif - text += ""; - - m_contents = text; - slotDisplayContents(text, (m_datURL.protocol() == "k2ch")?m_datURL:m_threadURL ); - if ( HighLightButton->isOn() ) { - HighLightButton->toggle(); - } - - m_threadData.truncate(0); - - if ( m_datURL.hasRef() ) { - if ( ! threadPart->gotoAnchor( m_datURL.encodedHtmlRef()) ) - threadPart->gotoAnchor( m_datURL.htmlRef() ); - } else { - threadPart->gotoAnchor( QString().setNum(m_rescount) ); - } - - emit showThreadCompleted(); -} - -void KitaThreadView::slotDisplayContents(const QString& input, const KURL& url) -{ - threadPart->begin( url ); - threadPart->write( input ); - threadPart->end(); -} - -void KitaThreadView::slotWriteButtonClicked() -{ - KitaWriteDialog dialog; - - QSjisCodec cp932Codec; - KURL bbscgiURL = KURL(m_boardURL, "../test/bbs.cgi"); - bbscgiURL.setProtocol( "http" ); - - KitaWriteDialog::PostInfo info; - info.host = bbscgiURL.host(); - info.bbs = m_boardID; - info.key = m_datName; - info.time = QString("%1").arg(serverTime); - QDialog * new_dialog = KitaWriteDialog::open( info ); - connect( new_dialog, SIGNAL( postResponse(const QString&) ), - this, SLOT( slotDisplayContents(const QString&) ) ); - qDebug("slotWriteButtonClicked() before dialog.exec()"); - new_dialog->show(); //work asynchronus. - -#if 0 - if(dialog.exec() != QDialog::Accepted) - return; - - QString postStr; - int cp932MIB = cp932Codec.mibEnum(); - QTextStream stream(&postStr, IO_WriteOnly); - QString name = KURL::encode_string(dialog.name(), cp932MIB); - QString mail = KURL::encode_string(dialog.mail(), cp932MIB); - QString body = KURL::encode_string(dialog.body(), cp932MIB); - - stream << "submit=%91%53%90%d3%94%43%82%f0%95%89%82%a4%82%b1%82%c6"; // zennsekininnwooukoto - stream << "%82%f0%8f%b3%91%f8%82%b5%82%c4%8f%91%82%ab%8d%9e%82%de&"; // wosyoudakusitekakikomu - stream << "subject=&"; - stream << "FROM=" << name << "&"; - stream << "mail=" << mail << "&"; - stream << "MESSAGE=" << body << "&"; - stream << "bbs=" << m_boardID << "&"; - stream << "key=" << m_datName << "&"; - stream << "time=" << serverTime; - - KIO::TransferJob* job = KIO::http_post(bbscgiURL, postStr.utf8(), true); - - // see kdelibs/kioslave/http/http.cc:2216 - job->addMetaData("content-type", "Content-type: application/x-www-form-urlencoded"); - - job->addMetaData("referrer", KURL(m_boardURL,"./index2.html").prettyURL()); - - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - SLOT(slotReceiveWriteResult(KIO::Job*, const QByteArray&))); - connect(job, SIGNAL(result(KIO::Job*)), SLOT(slotWriteResult(KIO::Job*))); -#endif -} - -void KitaThreadView::slotReceiveWriteResult(KIO::Job *, const QByteArray & data) -{ - QCString cstr(data.data(), data.size()+1); - m_writeResult += cstr; -} - -void KitaThreadView::slotWriteResult(KIO::Job* job) -{ - if(job->error()) { - job->showErrorDialog(); - } else { - QSjisCodec codec; - QTextStream stream(m_writeResult, IO_ReadOnly); - stream.setCodec(&codec); - - threadPart->begin(); - threadPart->write( m_writeResult.data(), m_writeResult.size() ); - threadPart->end(); - qDebug("#%s#", (const char *)stream.read().local8Bit()); - m_writeResult.truncate(0); - } -} - -void KitaThreadView::slotCanceled(KIO::Job*) -{ -} - -void KitaThreadView::slotSearchButton() -{ - insertSearchCombo(); - QStringList list = parseSearchQuery( SearchCombo->currentText() ); - searchNext( list ); -} - -void KitaThreadView::slotHighLightenButton(bool yes) -{ - insertSearchCombo(); - QStringList list = parseSearchQuery( SearchCombo->currentText() ); - highLighten( yes, list ); -} - -void KitaThreadView::insertSearchCombo() -{ - int count; - bool found = false; - - for( count = 0; count < SearchCombo->count(); ++count ) { - if ( SearchCombo->text( count ) == SearchCombo->currentText() ) { - found = true; - break; - } - } - if ( ! found ) SearchCombo->insertItem( SearchCombo->currentText() ); -} - -QStringList KitaThreadView::parseSearchQuery(const QString &input) -{ - QStringList tmp = QStringList::split( ' ', input ); - QStringList ret_list; - QRegExp truncSpace("\\s*$"); - QStringList::iterator it = tmp.begin(); - for( ; it != tmp.end(); ++it ) - ret_list += (*it).replace( truncSpace, "" ); - return ret_list; -} - -void KitaThreadView::searchNext(const QStringList &query) -{ - if ( query.isEmpty() ) return; - if ( ! HighLightButton->isOn() ) { - HighLightButton->toggle(); - m_nextHit = 0; //A next jump-search target reset to '0'. - // Process works asynchronusly. So Firstly, we don't do jump-search as a simple solution. - return; - } - if ( query != m_prevquery ) { - highLighten( true, query ); - m_nextHit = 0; //A next jump-search target reset to '0'. - return; - } - - threadPart->gotoAnchor( QString("highlight%1").arg(m_nextHit) ); - ++m_nextHit; - if ( !( m_nextHit < m_hitcount ) ) m_nextHit = 0; -} - -void KitaThreadView::highLighten(bool yes, const QStringList &query) -{ - if ( ! yes ) { - threadPart->setUserStyleSheet( QString("") ); - return; - } - - // Use style sheet to highlighten. - QString highlightCSS( ".highlight { color: %1; background: %2; } "); -#if 0 - QColorGroup cg = threadPart->view()->colorGroup(); - highlightCSS = highlightCSS.arg( cg.highlightedText().name() ).arg( cg.highlight().name() ); -#else - highlightCSS = highlightCSS.arg( "yellow" ).arg( "black" ); -#endif - threadPart->setUserStyleSheet( highlightCSS ); - - - if ( m_prevquery == query ) return; - m_prevquery = query; - if ( query.isEmpty() ) return; - - slotDisplayContents( m_contents ); - DOM::NodeList nodes; - m_hitcount = 0; - nodes = threadPart->document().getElementsByTagName("body"); - highLightenNodes( nodes, query ); - threadPart->setUserStyleSheet( highlightCSS ); -} - -QStringList KitaThreadView::lt_gt_spliter( const QString & input ) -{ - QStringList lt_gt_splitted; - QRegExp lt_gt("[<>]"); - int start = 0; - int end = 0; - while ( (end = input.find(lt_gt, end+1)) != -1 ) { - if ( input.at(end) == '<' ) { - lt_gt_splitted += input.mid( start, end-start ); - start = end; - } else - if ( input.at(end) == '>' ) { - lt_gt_splitted += input.mid( start, end+1-start ); - start = end + 1; - } else QMessageBox::warning( 0, "", "KitaThreadView::lt_gt_spliter()\n !!Bug!! Not Match.\n Will you contact with authors?"); - } - lt_gt_splitted += input.mid( start ); - return lt_gt_splitted; -} - -void KitaThreadView::highLightenNodes(DOM::NodeList nodes, const QStringList &query) -{ - for ( unsigned int count = 0; count < nodes.length(); ++count ) { - DOM::HTMLElement dd = nodes.item(count); - //printf(" dd %d: %s\n", count, dd.innerHTML().string().latin1() ); - QStringList lt_gt_split = lt_gt_spliter( dd.innerHTML().string() ); - - QProgressDialog progress(m_parent); - progress.setLabelText("Searching..."); - progress.setTotalSteps( lt_gt_split.size() ); - progress.show(); - int step = 0; - int divide = lt_gt_split.size() / ( 100 / 5 ); - int next = divide; - - //loop order not optimized. Need optim. that also needs any codes & members? - QStringList::iterator it_msg = lt_gt_split.begin(); - for( ; it_msg != lt_gt_split.end(); ++it_msg ) - { - QStringList::const_iterator it = query.begin(); - for( ; it != query.end(); ++it ) - { - int pos = 0; - QString message = *it_msg; - //printf("dd %d: %s\n", count, (*it_msg).latin1() ); - if( message.at(0) == '<' ) continue; - while ( (pos = (*it_msg).find(*it, pos)) != -1 ) { - //QMessageBox::information( 0, "Hit!", QString( "pos: %1 (length: %2)\nhitcount: %4\nstring:\n%3").arg(pos).arg((*it).length()).arg(message).arg(m_hitcount) ); - QString replace = QString("%1").arg(*it).arg( m_hitcount ); - //QString replace = QString("%1").arg(*it).arg( m_hitcount ); - message.replace(pos, (*it).length(), replace); - //printf("dd %d: replaced:: %s\n", count, message.latin1() ); - pos += replace.length(); - lt_gt_split.insert( it_msg, message ); - it_msg = lt_gt_split.remove( it_msg ); - --it_msg; - ++m_hitcount; - } - } - if( ++step > next ) { - progress.setProgress( step ); - next += divide; - } - } - - dd.setInnerHTML( lt_gt_split.join("") ); - - } -} - -void KitaThreadView::slotOnURL(const QString& url) -{ - emit signalChangeStatusbar(url); -} - -static QString linkURL(QString str) -{ - QString ret; - // see RFC 1738. - QRegExp url_rx("(h?ttp://([-.0-9a-zA-Z]+(/[;:@&=$-_.+!*'(),%~/?#0-9a-zA-Z]*)?))"); - - int i; - while ((i = str.find(url_rx)) != -1) { - if (i == 0) { - // starts with URL. - ret += ""; - ret += url_rx.cap(1); - ret += ""; - str.remove(0, url_rx.cap(1).length()); - } else { - ret += str.left(i); - str.remove(0, i); - } - } - ret += str; - return ret; -} - -// vim:sw=2: diff --git a/kita/src/kitathreadview.h b/kita/src/kitathreadview.h deleted file mode 100644 index 62a59f2..0000000 --- a/kita/src/kitathreadview.h +++ /dev/null @@ -1,104 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2003 by Hideki Ikemoto * - * ikemo@wakaba.jp * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - ***************************************************************************/ - -#ifndef _KITATHREADVIEW_H_ -#define _KITATHREADVIEW_H_ - -#include -#include -#include - -#include -#include -#include - -#include "kitathreadviewbase.h" - -class KURL; -class KHTMLPart; - -namespace KIO { - class Job; -}; - -/** - * - * Hideki Ikemoto - **/ - -class KitaThreadView : public KitaThreadViewBase -{ - Q_OBJECT - -public: - KitaThreadView(QWidget *parent, const char *name=0); - ~KitaThreadView(); - QString threadSubject() const; - QStringList parseSearchQuery(const QString &input); - void searchNext(const QStringList &input); - void highLighten(bool yes, const QStringList &input); - -signals: - void showThreadCompleted(); - void datURLRedirected(const KURL& newDatURL); - void openURLRequest( const KURL &url, const KParts::URLArgs &args = KParts::URLArgs() ); - void createNewWindow( const KURL &url, const KParts::URLArgs &args = KParts::URLArgs() ); - void setLocationBarURL( const QString &url ); - void enableAction( const char * name, bool enabled ); - -public slots: - void slotReceiveThreadData(KIO::Job* job, const QByteArray& data); - void slotRedirection(KIO::Job* job, const KURL &); - void slotThreadResult(KIO::Job* job); - void slotWriteButtonClicked(); - void slotReceiveWriteResult(KIO::Job* job, const QByteArray & data); - void slotWriteResult(KIO::Job* job); - void slotCanceled(KIO::Job* job); - void slotDisplayContents(const QString& input, const KURL& urlOfInput = 0); - -protected slots: - void slotDOMNodeActivated(const DOM::Node &node); - -private: // Private attributes - KHTMLPart* threadPart; - QCString m_threadData; - KURL m_datURL; - KURL m_boardURL; - KURL m_threadURL; - QCString m_writeResult; - int serverTime; - QString m_boardID; - QString m_datName; - QString m_boardName; - -private: - QWidget * m_parent; - KIO::Job * m_currentJob; - QString m_subject; - QString m_contents; - QStringList m_prevquery; - int m_labelMaxLength; - int m_rescount; - int m_hitcount; - int m_nextHit; - void highLightenNodes(DOM::NodeList nodes, const QStringList &query); - static QStringList lt_gt_spliter( const QString & input ); - void insertSearchCombo(); - -private slots: - void slotSearchButton(); - void slotHighLightenButton(bool yes); - void slotOnURL(const QString& url); - void slotShowThread(const KURL& _datURL, const KURL& _boardURL, const QString& boardName); -signals: - void signalChangeStatusbar(const QString&); -}; - -#endif diff --git a/kita/src/kitathreadviewbase.ui b/kita/src/kitathreadviewbase.ui deleted file mode 100644 index e84da7a..0000000 --- a/kita/src/kitathreadviewbase.ui +++ /dev/null @@ -1,168 +0,0 @@ - -KitaThreadViewBase - - - KitaThreadViewBase - - - - 0 - 0 - 600 - 480 - - - - Form1 - - - - unnamed - - - 0 - - - 0 - - - - subjectLabel - - - - 5 - 5 - 0 - 0 - - - - - 0 - 16 - - - - - Gothic [Mona] - - - - Box - - - Raised - - - 0 - - - - - - WordBreak|AlignVCenter - - - - - layout2 - - - - unnamed - - - - writeButton - - - - - - image0 - - - - - SearchCombo - - - - 1 - 4 - 0 - 0 - - - - - 200 - 0 - - - - true - - - 10 - - - - - SearchButton - - - Search - - - - - HighLightButton - - - HighLight - - - true - - - - - spacer1 - - - Horizontal - - - Expanding - - - - 320 - 20 - - - - - - - - threadFrame - - - StyledPanel - - - Raised - - - - - - - 789c5dd2c972e2301006e03b4fe1821b35e5d8b22ddb353507c8be40c84e32350759928110083b81d4bcfbb8bb2530031cfcfddd965bc24775a7db6939f5a3ca7c211603e9c8be983975b51c8d36bffffcfaae547dee143f1e387ef547a5ea3ad2697f8e355cbf14d7b5d06732c0d21930125ef101fac4288d047006e4cc56b7868997003d601c70c5b13944669ef4b17949b4d573621cc501f0de50c519300226bba56e88b6b96198124f89894ff74e81696887bc23fa898f433e13139586c01152dae63550ec9ac744e631ac0aa4b4d577a2ad6ac39038374c580a7c23a64ae07327c04cd9e7f68132b27c25865e887f4a40b4a7d1210a9de15209316342023951b24c019f2c6504944865b7b021da993f76c4997b8692784d0c427a55164015d9ea3131f0a8fa85d491e20c7845cc384da5887648465442e190b786c517f809d4dcbe84b9a1597948e43ef1c430a2b3aa1125a7edc7869a38d811c758118b0d231f0db5e6c02e7237e4255133aa360d05b16568ee6d0373ae758ebc20e64ce30633641e2621cefc402cead8ec963e3591c9ff32a5f35eff301bbc0f3ffaa3834c8d3f7b93e9ac9cd5e6c3457f345b96b2d5fa6b33996e1bcd7d562c7f5c74355c7797adc6271bb8b1b9cf6aebbc78e2f614ae4d86734dcfcedd7d767179755d74dd344b59ab7ddbb99bdd9b01287b787c7a7e59bae5acfbfae6f9ac79900561c44b0781599c948fcbadfefd59f907bcf223f7 - - - - diff --git a/kita/src/kitawritedialog.cpp b/kita/src/kitawritedialog.cpp deleted file mode 100644 index 6f10a22..0000000 --- a/kita/src/kitawritedialog.cpp +++ /dev/null @@ -1,156 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2003 by Hideki Ikemoto * - * ikemo@wakaba.jp * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - ***************************************************************************/ - -#include "kitawritedialog.h" -#include "qcp932codec.h" - -#include -#include -#include -#include - -#include - -KitaWriteDialogPrivate * KitaWriteDialog::s_private = 0; - -KitaWriteDialog::KitaWriteDialog(QWidget *parent, const char *name) - : KitaWriteDialogBase(parent, name) -{ -#if 1 - //QFont font = font(); - QFont font; - font.setRawMode( true ); - font.setRawName("-mona-gothic-medium-r-normal--12-110-75-75-p-120-jisx0208.1990-0"); - //font.setRawName("-mona-gothic-medium-r-normal--17-120-100-100-p-0-jisx0208.1990-0"); - bodyText->setFont( font ); - nameLine->setFont( font ); - nameLabel->setFont( font ); - mailLine->setFont( font ); - mailLabel->setFont( font ); -#endif -} - -KitaWriteDialog::~KitaWriteDialog() -{ -} - -QString KitaWriteDialog::name() -{ - return nameLine->text(); -} - -QString KitaWriteDialog::mail() -{ - return mailLine->text(); -} - -QString KitaWriteDialog::body() -{ - return bodyText->text(); -} - -void KitaWriteDialog::fetchPostInfo( PostInfo * storage ) -{ - storage->name = name(); - storage->mail = mail(); - storage->body = body(); -} - -KitaWriteDialog * KitaWriteDialog::open( const PostInfo& info ) -{ - if ( ! checkPostInfo( info ) ) return 0; - if ( ! s_private ) { - s_private = new KitaWriteDialogPrivate; - if ( ! s_private ) return 0; - } - - KitaWriteDialog * new_dlg = new KitaWriteDialog; - if ( ! new_dlg ) return 0; - - new_dlg->m_postInfo = info; - s_private->m_heaplist.append( new_dlg ); - - new_dlg->connect( new_dlg->buttonOk, SIGNAL( clicked() ), new_dlg, SLOT( postMessage() ) ); - - return new_dlg; -} - -void KitaWriteDialog::postMessage() -{ - fetchPostInfo( &m_postInfo ); - if ( ! checkPostInfo( m_postInfo ) ) - return ; - - KURL bbscgi; - bbscgi.setProtocol( "http" ); - bbscgi.setHost( m_postInfo.host ); - bbscgi.setPath( m_postInfo.bbscgi ); - - //int mib = QTextCodec::codecForName("CP932")->mibEnum(); - QCp932Codec codec; - int mib = codec.mibEnum(); - QString postStr; - (postStr += "submit=") += m_postInfo.submit; - (postStr += "&subject="); - (postStr += "&FROM=") += KURL::encode_string(m_postInfo.name, mib); - (postStr += "&mail=") += KURL::encode_string(m_postInfo.mail, mib); - (postStr += "&MESSAGE=") += KURL::encode_string(m_postInfo.body, mib); - (postStr += "&bbs=") += m_postInfo.bbs; - (postStr += "&key=") += m_postInfo.key; - (postStr += "&time=") += m_postInfo.time; - - printf("query: %s\n", postStr.latin1()); - m_array.resize(0); - - KIO::TransferJob * job = KIO::http_post(bbscgi, postStr.utf8(), true); - job->addMetaData("content-type", "Content-type: application/x-www-form-urlencoded"); - job->addMetaData("referrer", QString("http://%1/%2/").arg(m_postInfo.host).arg(m_postInfo.bbs) ); - - if ( ! m_postInfo.cookie.isEmpty() ) - job->addMetaData("cookie", m_postInfo.cookie.prepend("Cookie: ")); - - emit postStarted( job ); - - connect( job, SIGNAL( data(KIO::Job*, const QByteArray&) ), - this, SLOT( slotRecieveData(KIO::Job *, const QByteArray &) ) ); - connect( job, SIGNAL( result(KIO::Job *) ), - this, SLOT( slotPostFinished(KIO::Job *) ) ); -} - -bool KitaWriteDialog::checkPostInfo( const PostInfo& info ) -{ - if ( info.host.isEmpty() || info.bbscgi.isEmpty() - || info.bbs.isEmpty() || info.key.isEmpty() ) - return false; - - return true; -} - -void KitaWriteDialog::slotRecieveData(KIO::Job *, const QByteArray &data) -{ - m_array.append( data.data() ); -} - -void KitaWriteDialog::slotPostFinished(KIO::Job *job) -{ - QString response = QTextCodec::codecForName("sjis")->toUnicode( m_array ); - QCString output = QTextCodec::codecForName("eucJP")->fromUnicode( response ); - printf("response:\n%s\n", output.data() ); - emit postFinished( job ); - emit postResponse( response ); - - m_array.resize(0); - - int idx = s_private->m_heaplist.find( this ); - if ( idx != -1 ) - delete this; -} - -// vim:sw=2: diff --git a/kita/src/kitawritedialog.h b/kita/src/kitawritedialog.h deleted file mode 100644 index 4a54f24..0000000 --- a/kita/src/kitawritedialog.h +++ /dev/null @@ -1,87 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2003 by Hideki Ikemoto * - * ikemo@wakaba.jp * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - ***************************************************************************/ - -#ifndef _KITAWRITEDIALOG_H_ -#define _KITAWRITEDIALOG_H_ - -#include -#include -#include "kitawritedialogbase.h" - -template class QPtrList; -class KitaWriteDialogPrivate; -class KitaWriteDialog; - -/** - * - * Hideki Ikemoto - **/ -class KitaWriteDialog : public KitaWriteDialogBase -{ - Q_OBJECT -public: - struct PostInfo { - PostInfo() { - bbscgi = "/test/bbs.cgi"; - submit = "%91%53%90%d3%94%43%82%f0%95%89%82%a4%82%b1%82%c6%82%f0%8f%b3%91%f8%82%b5%82%c4%8f%91%82%ab%8d%9e%82%de"; - }; - QString host; - QString bbscgi; - QString name; - QString mail; - QString body; - QString bbs; - QString key; - QString time; - QString submit; - QString cookie; - }; - - KitaWriteDialog(QWidget *parent=0, const char *name=0 ); - virtual ~KitaWriteDialog(); - QString name(); - QString mail(); - QString body(); - - virtual bool error(){ return false; }; - - static KitaWriteDialog * open( const PostInfo& info ); - static bool checkPostInfo( const PostInfo& info ); - -public slots: - void postMessage(); - -signals: - void postStarted( KIO::Job * ); - void postFinished( KIO::Job * ); - void postResponse( const QString& response ); - -protected: - PostInfo m_postInfo; - -private: - void fetchPostInfo( PostInfo * storage ); - - QCString m_array; - bool m_error; - static KitaWriteDialogPrivate * s_private; - -private slots: - void slotRecieveData(KIO::Job *, const QByteArray &); - void slotPostFinished(KIO::Job *); - -}; - -class KitaWriteDialogPrivate -{ -public: - QPtrList m_heaplist; -}; -#endif diff --git a/kita/src/kitawritedialogbase.ui b/kita/src/kitawritedialogbase.ui deleted file mode 100644 index cdd9cc7..0000000 --- a/kita/src/kitawritedialogbase.ui +++ /dev/null @@ -1,184 +0,0 @@ - -KitaWriteDialogBase - - - KitaWriteDialogBase - - - - 0 - 0 - 511 - 282 - - - - MyDialog - - - true - - - - unnamed - - - - layout2 - - - - unnamed - - - - nameLabel - - - name - - - - - nameLine - - - - - mailLabel - - - mail - - - - - mailLine - - - - - sageBox - - - sage - - - - - - - bodyText - - - - - Layout1 - - - - unnamed - - - 0 - - - 6 - - - - buttonHelp - - - &Help - - - F1 - - - true - - - - - Horizontal Spacing2 - - - Horizontal - - - Expanding - - - - 20 - 20 - - - - - - buttonOk - - - &OK - - - - - - true - - - true - - - - - buttonCancel - - - &Cancel - - - - - - true - - - - - - - - - buttonOk - clicked() - KitaWriteDialogBase - accept() - - - buttonCancel - clicked() - KitaWriteDialogBase - reject() - - - sageBox - toggled(bool) - KitaWriteDialogBase - sageBoxToggled(bool) - - - - kitawritedialogbase.ui.h - - - QString m_mailswap; - - - sageBoxToggled( bool on ) - - - diff --git a/kita/src/kitawritedialogbase.ui.h b/kita/src/kitawritedialogbase.ui.h deleted file mode 100644 index 338ba19..0000000 --- a/kita/src/kitawritedialogbase.ui.h +++ /dev/null @@ -1,21 +0,0 @@ -/**************************************************************************** -** ui.h extension file, included from the uic-generated form implementation. -** -** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an -** init() function in place of a constructor, and a destroy() function in -** place of a destructor. -*****************************************************************************/ - - -void KitaWriteDialogBase::sageBoxToggled( bool on ) -{ - if ( on ) { - m_mailswap = mailLine->text(); - mailLine->setText("sage"); - mailLine->setReadOnly(true); - } else { - mailLine->setReadOnly(false); - mailLine->setText(m_mailswap); - } -} diff --git a/kita/src/pencil.png b/kita/src/pencil.png deleted file mode 100644 index ac7cba41ff06febf007fa512a0ad2a285934141c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 522 zcmV+l0`>igP)kTkWESR1MR4!RV?PvFjege>xa z);P@!A(>W95SmViGfs#bUHsjoHX${ncYV+Ao_nw4y1N{unx(QZv?zC`rzx2x$BqIw zjG`#a$GEPlR2+wPz0UDrVgKtl@o9d6*>D&?pU1atwqZDfhEWvRhflZ>4AL$X@NAn3 zkR2wVSt<)-L1#96o0e(PvMjcN3~)w|4_?8q)!?ET#la|?M+2t;<-*N5&yq| z^VtwtElNmL`DIzOI&cO!x4eX&N=mXUONScx)tV?gea2iw#Y?AYci=p5L5~yD7ytG4 z1vE=#k=LSxA`!fF8qc<|flXQF;#vw_UzEE0dsf*0^G#KyWm&X4a0WQ5$NS)(03n1p zeQAQLuixNSD!5x)lz|Fa=JHCC*s^};t-1^(q!R%~r>6M5x=LkyoGftuRf^==OG#0b zzUe(T7#SI*(fC2NTE(c+a(1d=Yz&!(`~z(BOXk1^mm#YYMu@00000 M07*qoM6N<$f>I*$nE(I) diff --git a/kita/src/qcp932codec.cpp b/kita/src/qcp932codec.cpp deleted file mode 100644 index ee7f37a..0000000 --- a/kita/src/qcp932codec.cpp +++ /dev/null @@ -1,178 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2003 by Hideki Ikemoto * - * ikemo@wakaba.jp * - * * - * Permission is hereby granted, free of charge, to any person obtaining * - * a copy of this software and associated documentation files (the * - * "Software"), to deal in the Software without restriction, including * - * without limitation the rights to use, copy, modify, merge, publish, * - * distribute, sublicense, and/or sell copies of the Software, and to * - * permit persons to whom the Software is furnished to do so, subject to * - * the following conditions: * - * * - * The above copyright notice and this permission notice shall be * - * included in all copies or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.* - * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR * - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * - * OTHER DEALINGS IN THE SOFTWARE. * -***************************************************************************/ - -#include "qcp932codec.h" -#include - -#define QValidChar(u) ((u) ? QChar((ushort)(u)) : QChar::replacement) - -QCp932Codec::QCp932Codec() : QTextCodec(), - conv(QJpUnicodeConv::newConverter(QJpUnicodeConv::Microsoft_CP932 | - QJpUnicodeConv::NEC_VDC | - QJpUnicodeConv::IBM_VDC)){ -} - - -QCp932Codec::~QCp932Codec() -{ - if(conv) { - delete conv; - } -} - -const char * QCp932Codec::name() const -{ - return "CP932"; -} - -// see http://www.iana.org/assignments/character-sets -const char * QCp932Codec::mimeName() const -{ - return "Windows-31J"; -} - -int QCp932Codec::mibEnum() const -{ - return 2024; -} - -QTextDecoder* QCp932Codec::makeDecoder() const -{ - return new QCp932Decoder(conv); -} - -/* -QTextEncoder* QCp932Codec::makeEncoder() const -{ -}*/ - -/*QString QCp932Codec::toUnicode(const char* chars, int len) const -{ -}*/ - -static uint jisx0212ToSjis(uint h, uint l) -{ - if ((0x0021 <= h) && (h <= 0x007e) && (0x0021 <= l) && (l <= 0x007e)) { - return ((((h - 1) >> 1) + ((h <= 0x5e) ? 0x71 : 0xb1)) << 8) | - (l + ((h & 1) ? ((l < 0x60) ? 0x1f : 0x20) : 0x7e)); - } - return 0x0000; -} - -QCString QCp932Codec::fromUnicode(const QString& uc, int& lenInOut) const -{ - int ulen = QMAX((int)uc.length(), lenInOut); - int clen = ulen * 2 + 1; - QCString ret(clen); - char *pos = (char *)ret.data(); - - for(int i=0; iunicodeToJisx0201(c)) != 0) { - // ascii(jis x 0201) or hankaku-kana - *pos++ = j; - } else if((j = conv->unicodeToSjis(c)) != 0) { - *pos++ = (j >> 8); - *pos++ = (j & 0xff); - } else if((j = conv->unicodeToJisx0212(c)) != 0) { - // support NEC and IBM extension... - j = jisx0212ToSjis((j & 0xff00) >> 8, j & 0x00ff); - *pos++ = (j >> 8); - *pos++ = (j & 0xff); - } else { - // invalid - *pos++ = '?'; - } - } - lenInOut = pos - (char *)ret.data(); - ret.truncate(lenInOut); - return ret; -} - -/*bool QCp932Codec::canEncode(QChar ch) const -{ -} - -bool QCp932Codec::canEncode(const QString& s) const -{ -}*/ - -// XXX -int QCp932Codec::heuristicContentMatch(const char* chars, int len) const -{ - qDebug("XXX heuristicContentMatch"); - return 0; -} - -// XXX -int QCp932Codec::heuristicNameMatch(const char * hint) const -{ - qDebug("XXX heuristicNameMatch hint = %s", hint); - return 0; -} - -QCp932Decoder::QCp932Decoder(QJpUnicodeConv* _conv) : QTextDecoder(), conv(_conv) -{ -} - -QCp932Decoder::~QCp932Decoder() -{ -} - -QString QCp932Decoder::toUnicode(const char* chars, int len) -{ - QString ret; - static int buf = -1; - - for(int i=0; i= 0) { // 2-byte - if((c >= 0x40 && c <= 0x7e) || (c >= 0x80 && c <= 0xfc)) { - // valid kanji - uint u = conv->sjisToUnicode(buf, c); - ret += QValidChar(u); - } else { - // invalid - ret += QChar::replacement; - } - buf = -1; - } else { - if((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xfc)) { - // 1st-byte of 2-byte character. - buf = (int)c; - } else if(c >= 0xa1 && c <= 0xdf) { - // hankaku-kana - uint u = conv->jisx0201ToUnicode(c); - ret += QValidChar(u); - } else { - // 1-byte character. - uint u = conv->asciiToUnicode(c); - ret += QValidChar(u); - } - } - } - return ret; -} diff --git a/kita/src/qcp932codec.h b/kita/src/qcp932codec.h deleted file mode 100644 index b40f5da..0000000 --- a/kita/src/qcp932codec.h +++ /dev/null @@ -1,67 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2003 by Hideki Ikemoto * - * ikemo@wakaba.jp * - * * - * Permission is hereby granted, free of charge, to any person obtaining * - * a copy of this software and associated documentation files (the * - * "Software"), to deal in the Software without restriction, including * - * without limitation the rights to use, copy, modify, merge, publish, * - * distribute, sublicense, and/or sell copies of the Software, and to * - * permit persons to whom the Software is furnished to do so, subject to * - * the following conditions: * - * * - * The above copyright notice and this permission notice shall be * - * included in all copies or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.* - * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR * - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * - * OTHER DEALINGS IN THE SOFTWARE. * - ***************************************************************************/ - -#ifndef _QCP932CODEC_H_ -#define _QCP932CODEC_H_ - -#include - -class QJpUnicodeConv; -/** - * - * Hideki Ikemoto - **/ -class QCp932Codec : public QTextCodec -{ -private: - QJpUnicodeConv* conv; -public: - QCp932Codec(); - ~QCp932Codec(); - virtual const char * name() const; - virtual const char * mimeName() const; - virtual int mibEnum() const; - virtual QTextDecoder* makeDecoder() const; -// virtual QTextEncoder* makeEncoder() const; -// virtual QString toUnicode(const char* chars, int len) const; - using QTextCodec::fromUnicode; - virtual QCString fromUnicode(const QString& uc, int& lenInOut) const; -// virtual bool canEncode(QChar ch) const; -// virtual bool canEncode(const QString& s) const; - virtual int heuristicContentMatch(const char* chars, int len) const; - virtual int heuristicNameMatch(const char * hint) const; -}; - -class QCp932Decoder : public QTextDecoder -{ -private: - QJpUnicodeConv* conv; - -public: - QCp932Decoder(QJpUnicodeConv* _conv); - ~QCp932Decoder(); - virtual QString toUnicode(const char* chars, int len); -}; - -#endif -- 2.11.0