summaryrefslogtreecommitdiffstats
path: root/kmymoney2/converter/webpricequote.h
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/converter/webpricequote.h')
-rw-r--r--kmymoney2/converter/webpricequote.h132
1 files changed, 68 insertions, 64 deletions
diff --git a/kmymoney2/converter/webpricequote.h b/kmymoney2/converter/webpricequote.h
index e25dfb8..ba8146b 100644
--- a/kmymoney2/converter/webpricequote.h
+++ b/kmymoney2/converter/webpricequote.h
@@ -15,16 +15,16 @@
* *
***************************************************************************/
-#ifndef WEBPRICEQUOTE_H
-#define WEBPRICEQUOTE_H
+#ifndef WEBPRICETQUOTE_H
+#define WEBPRICETQUOTE_H
// ----------------------------------------------------------------------------
// QT Headers
-#include <qobject.h>
-#include <qdatetime.h>
-#include <qstringlist.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqdatetime.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
// ----------------------------------------------------------------------------
// KDE Headers
@@ -48,20 +48,21 @@ of a local script being used to fetch the quote.
class WebPriceQuoteProcess: public KProcess
{
Q_OBJECT
+ TQ_OBJECT
public:
WebPriceQuoteProcess(void);
- void setSymbol(const QString& _symbol) { m_symbol = _symbol; m_string.truncate(0); }
+ void setSymbol(const TQString& _symbol) { m_symbol = _symbol; m_string.truncate(0); }
public slots:
void slotReceivedDataFromFilter(KProcess*, char*, int);
void slotProcessExited(KProcess*);
signals:
- void processExited(const QString&);
+ void processExited(const TQString&);
private:
- QString m_symbol;
- QString m_string;
+ TQString m_symbol;
+ TQString m_string;
};
/**
@@ -75,13 +76,14 @@ by the Finance::Quote package, and more user-friendly names.
class FinanceQuoteProcess: public KProcess
{
Q_OBJECT
+ TQ_OBJECT
public:
FinanceQuoteProcess(void);
- void launch (const QString& scriptPath);
+ void launch (const TQString& scriptPath);
bool isFinished() { return(m_isDone);};
- QStringList getSourceList();
- const QString crypticName(const QString& niceName);
- const QString niceName(const QString& crypticName);
+ TQStringList getSourceList();
+ const TQString crypticName(const TQString& niceName);
+ const TQString niceName(const TQString& crypticName);
public slots:
void slotReceivedDataFromFilter(KProcess*, char*, int);
@@ -89,8 +91,8 @@ class FinanceQuoteProcess: public KProcess
private:
bool m_isDone;
- QString m_string;
- typedef QMap<QString, QString> fqNameMap;
+ TQString m_string;
+ typedef TQMap<TQString, TQString> fqNameMap;
fqNameMap m_fqNames;
};
@@ -103,20 +105,20 @@ class FinanceQuoteProcess: public KProcess
struct WebPriceQuoteSource
{
WebPriceQuoteSource() {}
- WebPriceQuoteSource(const QString& name);
- WebPriceQuoteSource(const QString& name, const QString& url, const QString& sym, const QString& price, const QString& date, const QString& dateformat);
+ WebPriceQuoteSource(const TQString& name);
+ WebPriceQuoteSource(const TQString& name, const TQString& url, const TQString& sym, const TQString& price, const TQString& date, const TQString& dateformat);
~WebPriceQuoteSource() {}
void write(void) const;
- void rename(const QString& name);
+ void rename(const TQString& name);
void remove(void) const;
- QString m_name;
- QString m_url;
- QString m_sym;
- QString m_price;
- QString m_date;
- QString m_dateformat;
+ TQString m_name;
+ TQString m_url;
+ TQString m_sym;
+ TQString m_price;
+ TQString m_date;
+ TQString m_dateformat;
bool m_skipStripping;
};
@@ -125,11 +127,12 @@ Retrieves a price quote from a web-based quote source
@author Ace Jones <acejones@users.sourceforge.net>
*/
-class WebPriceQuote: public QObject
+class WebPriceQuote: public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- WebPriceQuote( QObject* = 0, const char* = 0 );
+ WebPriceQuote( TQObject* = 0, const char* = 0 );
~WebPriceQuote();
typedef enum _quoteSystemE {
@@ -146,78 +149,78 @@ public:
* @param _id an arbitrary identifier, which will be emitted in the quote
* signal when a price is sent back.
* @param _source the source of the quote (must be a valid value returned
- * by quoteSources(). Send QString() to use the default
+ * by quoteSources(). Send TQString() to use the default
* source.
* @return bool Whether the quote fetch process was launched successfully
*/
- bool launch(const QString& _symbol, const QString& _id, const QString& _source=QString());
+ bool launch(const TQString& _symbol, const TQString& _id, const TQString& _source=TQString());
/**
* This returns a list of the names of the quote sources
* currently defined.
*
* @param _system whether to return Native or Finance::Quote source list
- * @return QStringList of quote source names
+ * @return TQStringList of quote source names
*/
- static QStringList quoteSources(const _quoteSystemE _system=Native);
+ static TQStringList quoteSources(const _quoteSystemE _system=Native);
signals:
- void quote(const QString&, const QString&, const QDate&, const double&);
- void failed(const QString&, const QString&);
- void status(const QString&);
- void error(const QString&);
+ void quote(const TQString&, const TQString&, const TQDate&, const double&);
+ void failed(const TQString&, const TQString&);
+ void status(const TQString&);
+ void error(const TQString&);
protected slots:
- void slotParseQuote(const QString&);
+ void slotParseQuote(const TQString&);
protected:
- static QMap<QString,WebPriceQuoteSource> defaultQuoteSources(void);
+ static TQMap<TQString,WebPriceQuoteSource> defaultQuoteSources(void);
private:
- bool download(const KURL& u, QString & target, QWidget* window);
- void removeTempFile(const QString& tmpFile);
+ bool download(const KURL& u, TQString & target, TQWidget* window);
+ void removeTempFile(const TQString& tmpFile);
private slots:
void slotResult( KIO::Job * job );
private:
- bool launchNative(const QString& _symbol, const QString& _id, const QString& _source=QString());
- bool launchFinanceQuote(const QString& _symbol, const QString& _id, const QString& _source=QString());
+ bool launchNative(const TQString& _symbol, const TQString& _id, const TQString& _source=TQString());
+ bool launchFinanceQuote(const TQString& _symbol, const TQString& _id, const TQString& _source=TQString());
void enter_loop(void);
- static QStringList quoteSourcesNative();
- static QStringList quoteSourcesFinanceQuote();
+ static TQStringList quoteSourcesNative();
+ static TQStringList quoteSourcesFinanceQuote();
WebPriceQuoteProcess m_filter;
- QString m_symbol;
- QString m_id;
- QDate m_date;
+ TQString m_symbol;
+ TQString m_id;
+ TQDate m_date;
double m_price;
WebPriceQuoteSource m_source;
- static QString m_financeQuoteScriptPath;
- static QStringList m_financeQuoteSources;
+ static TQString m_financeQuoteScriptPath;
+ static TQStringList m_financeQuoteSources;
/**
* Whether the download succeeded or not. Taken from KIO::NetAccess
*/
bool bJobOK;
- static QString* lastErrorMsg;
+ static TQString* lastErrorMsg;
static int lastErrorCode;
- QString m_tmpFile;
+ TQString m_tmpFile;
};
class MyMoneyDateFormat
{
public:
- MyMoneyDateFormat(const QString& _format): m_format(_format) {}
- QString convertDate(const QDate& _in) const;
- QDate convertString(const QString& _in, bool _strict=true, unsigned _centurymidpoint = QDate::currentDate().year() ) const;
- const QString& format(void) const { return m_format; }
+ MyMoneyDateFormat(const TQString& _format): m_format(_format) {}
+ TQString convertDate(const TQDate& _in) const;
+ TQDate convertString(const TQString& _in, bool _strict=true, unsigned _centurymidpoint = TQDate::tqcurrentDate().year() ) const;
+ const TQString& format(void) const { return m_format; }
private:
- QString m_format;
+ TQString m_format;
};
namespace convertertest {
@@ -227,26 +230,27 @@ Simple class to handle signals/slots for unit tests
@author Ace Jones <acejones@users.sourceforge.net>
*/
-class QuoteReceiver : public QObject
+class QuoteReceiver : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- QuoteReceiver(WebPriceQuote* q, QObject *parent = 0, const char *name = 0);
+ QuoteReceiver(WebPriceQuote* q, TQObject *tqparent = 0, const char *name = 0);
~QuoteReceiver();
public slots:
- void slotGetQuote(const QString&,const QDate&, const double&);
- void slotStatus(const QString&);
- void slotError(const QString&);
+ void slotGetQuote(const TQString&,const TQDate&, const double&);
+ void slottqStatus(const TQString&);
+ void slotError(const TQString&);
public:
- QStringList m_statuses;
- QStringList m_errors;
+ TQStringList m_statuses;
+ TQStringList m_errors;
MyMoneyMoney m_price;
- QDate m_date;
+ TQDate m_date;
};
} // end namespace convertertest
-#endif // WEBPRICEQUOTE_H
+#endif // WEBPRICETQUOTE_H
// vim:cin:si:ai:et:ts=2:sw=2: