summaryrefslogtreecommitdiffstats
path: root/kppp/ruleset.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kppp/ruleset.h
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kppp/ruleset.h')
-rw-r--r--kppp/ruleset.h50
1 files changed, 25 insertions, 25 deletions
diff --git a/kppp/ruleset.h b/kppp/ruleset.h
index b66bb50c..8d3fbbe8 100644
--- a/kppp/ruleset.h
+++ b/kppp/ruleset.h
@@ -27,9 +27,9 @@
#ifndef __RULESET__H__
#define __RULESET__H__
-#include <qmemarray.h>
-#include <qdatetime.h>
-#include <qstring.h>
+#include <tqmemarray.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
// this structure is used to save
// accounting rules
@@ -38,9 +38,9 @@ typedef struct RULE {
double costs;
double len;
double after;
- QTime from, until;
+ TQTime from, until;
struct {
- QDate from, until;
+ TQDate from, until;
} date;
struct {
int from, until;
@@ -57,26 +57,26 @@ public:
~RuleSet() {};
/// returns the name of the ruleset
- QString name() const;
+ TQString name() const;
/** Load a ruleset from a file. If an error occurs,
* returns the linenumber the error was in,
* otherwise 0. If the file could not be opened,
* returns -1
*/
- int load(const QString &filename);
+ int load(const TQString &filename);
/// returns the currency symbol
- QString currencySymbol() const;
+ TQString currencySymbol() const;
/** returns a string representation of the
* of a doubleingpoint number using the
* currency-settings
*/
- QString currencyString(double val) const;
+ TQString currencyString(double val) const;
/// sets the start time -- must be called when the connection has bee established
- void setStartTime(QDateTime dt);
+ void setStartTime(TQDateTime dt);
/// returns the "per-connection" costs
double perConnectionCosts() const;
@@ -87,10 +87,10 @@ public:
double minimumCosts() const;
/// returns the currently valid rule settings
- void getActiveRule(QDateTime dt, double connect_time, double &costs, double &len);
+ void getActiveRule(TQDateTime dt, double connect_time, double &costs, double &len);
/// checks if a rulefile is ok (no parse errors...)
- static int checkRuleFile(const QString &);
+ static int checkRuleFile(const TQString &);
protected:
/** converts an english name of a day to integer,
@@ -99,38 +99,38 @@ protected:
int dayNameToInt(const char *s);
/// returns the date of easter-sunday for a year
- static QDate get_easter(int year);
+ static TQDate get_easter(int year);
/// add a rule to this ruleset
void addRule(RULE r);
/// parses on entry of the "on(...)" fields
- bool parseEntry(RULE &ret, QString s, int year);
+ bool parseEntry(RULE &ret, TQString s, int year);
/// parses the "on(...)" fields
- bool parseEntries(QString s, int year,
- QTime t1, QTime t2,
+ bool parseEntries(TQString s, int year,
+ TQTime t1, TQTime t2,
double costs, double len, double after);
/// parses the "between(...)" time fields
- bool parseTime(QTime &t1, QTime &t2, QString s);
+ bool parseTime(TQTime &t1, TQTime &t2, TQString s);
/// parses the "use(...)" fields
- bool parseRate(double &costs, double &len, double &after, QString s);
+ bool parseRate(double &costs, double &len, double &after, TQString s);
/// parses a whole line
- bool parseLine(const QString &line);
+ bool parseLine(const TQString &line);
/// returns midnight time (00:00:00.000)
- QTime midnight() const;
+ TQTime midnight() const;
/// returns the last valid time BEFORE midnight
- QTime beforeMidnight() const;
+ TQTime beforeMidnight() const;
protected:
- QString _name;
- QString _currency_symbol;
- QDateTime starttime;
+ TQString _name;
+ TQString _currency_symbol;
+ TQDateTime starttime;
int _currency_digits;
double default_costs;
double _minimum_costs;
@@ -140,7 +140,7 @@ protected:
double flat_init_duration;
double flat_init_costs;
- QMemArray<RULE> rules;
+ TQMemArray<RULE> rules;
};
#endif