summaryrefslogtreecommitdiffstats
path: root/kppp/ruleset.h
diff options
context:
space:
mode:
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