-rw-r--r-- | noncore/net/mailit/textparser.h | 74 | ||||
-rw-r--r-- | noncore/unsupported/mailit/textparser.h | 74 |
2 files changed, 74 insertions, 74 deletions
diff --git a/noncore/net/mailit/textparser.h b/noncore/net/mailit/textparser.h index 016effb..c5e88a0 100644 --- a/noncore/net/mailit/textparser.h +++ b/noncore/net/mailit/textparser.h | |||
@@ -28,4 +28,4 @@ enum t_lineType {NewLine, LastLine}; | |||
28 | 28 | ||
29 | const uint MAX_ELEMENTS = 200; //Should be dynamic | 29 | const uint MAX_ELEMENTS = 200; //Should be dynamic |
30 | const uint MAX_LINES = 500; //Should be dynamic | 30 | const uint MAX_LINES = 500; //Should be dynamic |
31 | 31 | ||
@@ -33,5 +33,5 @@ struct t_splitElm | |||
33 | { | 33 | { |
34 | QChar separator; | 34 | QChar separator; |
35 | int strType; | 35 | int strType; |
36 | QString str; | 36 | QString str; |
37 | }; | 37 | }; |
@@ -40,6 +40,6 @@ struct t_splitLine | |||
40 | { | 40 | { |
41 | t_lineType lineType; | 41 | t_lineType lineType; |
42 | QString str; //a bit redundant... | 42 | QString str; //a bit redundant... |
43 | t_splitElm elm[MAX_ELEMENTS]; | 43 | t_splitElm elm[MAX_ELEMENTS]; |
44 | int elmCount; | 44 | int elmCount; |
45 | }; | 45 | }; |
@@ -48,16 +48,16 @@ class TextParser: public QObject | |||
48 | { | 48 | { |
49 | Q_OBJECT | 49 | Q_OBJECT |
50 | 50 | ||
51 | public: | 51 | public: |
52 | TextParser(QString in, QString lineBreak); | 52 | TextParser(QString in, QString lineBreak); |
53 | TextParser(QString in, QString lineBreak, QString sep); | 53 | TextParser(QString in, QString lineBreak, QString sep); |
54 | int find(QString target, QChar sep, int pos, bool upperCase); | 54 | int find(QString target, QChar sep, int pos, bool upperCase); |
55 | int elmCount(); | 55 | int elmCount(); |
56 | QChar separatorAt(int pos); | 56 | QChar separatorAt(int pos); |
57 | QChar nextSeparator(); | 57 | QChar nextSeparator(); |
58 | bool hasNextSeparator(); | 58 | bool hasNextSeparator(); |
59 | QString wordAt(int pos); | 59 | QString wordAt(int pos); |
60 | QString nextWord(); | 60 | QString nextWord(); |
61 | bool hasNextWord(); | 61 | bool hasNextWord(); |
62 | QString getString(int *pos, QChar stop, bool lineEnd = false); | 62 | QString getString(int *pos, QChar stop, bool lineEnd); |
63 | QString getNextLine(); | 63 | QString getNextLine(); |
@@ -67,17 +67,17 @@ public: | |||
67 | private: | 67 | private: |
68 | void init(); | 68 | void init(); |
69 | void createSeparators(); | 69 | void createSeparators(); |
70 | t_splitLine nextLine(); | 70 | t_splitLine nextLine(); |
71 | void split(); | 71 | void split(); |
72 | t_splitLine splitLine(t_splitLine line); | 72 | t_splitLine splitLine(t_splitLine line); |
73 | bool isSeparator(QChar chr); | 73 | bool isSeparator(QChar chr); |
74 | t_splitLine splitDone[MAX_LINES]; | 74 | t_splitLine splitDone[MAX_LINES]; |
75 | int getLineReference(int pos, int *line, int *inLinePos); | 75 | int getLineReference(int pos, int *line, int *inLinePos); |
76 | 76 | ||
77 | int lineCount, linePos, totalElmCount; | 77 | int lineCount, linePos, totalElmCount; |
78 | int separatorPos, wordPos; | 78 | int separatorPos, wordPos; |
79 | QString data, separators, lineSep; | 79 | QString data, separators, lineSep; |
80 | int sepAtLine, sepAtPosElm; | 80 | int sepAtLine, sepAtPosElm; |
81 | int wordAtLine, wordAtPosElm; | 81 | int wordAtLine, wordAtPosElm; |
82 | int atLine, atPosElm; | 82 | int atLine, atPosElm; |
83 | }; | 83 | }; |
diff --git a/noncore/unsupported/mailit/textparser.h b/noncore/unsupported/mailit/textparser.h index 016effb..c5e88a0 100644 --- a/noncore/unsupported/mailit/textparser.h +++ b/noncore/unsupported/mailit/textparser.h | |||
@@ -28,4 +28,4 @@ enum t_lineType {NewLine, LastLine}; | |||
28 | 28 | ||
29 | const uint MAX_ELEMENTS = 200; //Should be dynamic | 29 | const uint MAX_ELEMENTS = 200; //Should be dynamic |
30 | const uint MAX_LINES = 500; //Should be dynamic | 30 | const uint MAX_LINES = 500; //Should be dynamic |
31 | 31 | ||
@@ -33,5 +33,5 @@ struct t_splitElm | |||
33 | { | 33 | { |
34 | QChar separator; | 34 | QChar separator; |
35 | int strType; | 35 | int strType; |
36 | QString str; | 36 | QString str; |
37 | }; | 37 | }; |
@@ -40,6 +40,6 @@ struct t_splitLine | |||
40 | { | 40 | { |
41 | t_lineType lineType; | 41 | t_lineType lineType; |
42 | QString str; //a bit redundant... | 42 | QString str; //a bit redundant... |
43 | t_splitElm elm[MAX_ELEMENTS]; | 43 | t_splitElm elm[MAX_ELEMENTS]; |
44 | int elmCount; | 44 | int elmCount; |
45 | }; | 45 | }; |
@@ -48,16 +48,16 @@ class TextParser: public QObject | |||
48 | { | 48 | { |
49 | Q_OBJECT | 49 | Q_OBJECT |
50 | 50 | ||
51 | public: | 51 | public: |
52 | TextParser(QString in, QString lineBreak); | 52 | TextParser(QString in, QString lineBreak); |
53 | TextParser(QString in, QString lineBreak, QString sep); | 53 | TextParser(QString in, QString lineBreak, QString sep); |
54 | int find(QString target, QChar sep, int pos, bool upperCase); | 54 | int find(QString target, QChar sep, int pos, bool upperCase); |
55 | int elmCount(); | 55 | int elmCount(); |
56 | QChar separatorAt(int pos); | 56 | QChar separatorAt(int pos); |
57 | QChar nextSeparator(); | 57 | QChar nextSeparator(); |
58 | bool hasNextSeparator(); | 58 | bool hasNextSeparator(); |
59 | QString wordAt(int pos); | 59 | QString wordAt(int pos); |
60 | QString nextWord(); | 60 | QString nextWord(); |
61 | bool hasNextWord(); | 61 | bool hasNextWord(); |
62 | QString getString(int *pos, QChar stop, bool lineEnd = false); | 62 | QString getString(int *pos, QChar stop, bool lineEnd); |
63 | QString getNextLine(); | 63 | QString getNextLine(); |
@@ -67,17 +67,17 @@ public: | |||
67 | private: | 67 | private: |
68 | void init(); | 68 | void init(); |
69 | void createSeparators(); | 69 | void createSeparators(); |
70 | t_splitLine nextLine(); | 70 | t_splitLine nextLine(); |
71 | void split(); | 71 | void split(); |
72 | t_splitLine splitLine(t_splitLine line); | 72 | t_splitLine splitLine(t_splitLine line); |
73 | bool isSeparator(QChar chr); | 73 | bool isSeparator(QChar chr); |
74 | t_splitLine splitDone[MAX_LINES]; | 74 | t_splitLine splitDone[MAX_LINES]; |
75 | int getLineReference(int pos, int *line, int *inLinePos); | 75 | int getLineReference(int pos, int *line, int *inLinePos); |
76 | 76 | ||
77 | int lineCount, linePos, totalElmCount; | 77 | int lineCount, linePos, totalElmCount; |
78 | int separatorPos, wordPos; | 78 | int separatorPos, wordPos; |
79 | QString data, separators, lineSep; | 79 | QString data, separators, lineSep; |
80 | int sepAtLine, sepAtPosElm; | 80 | int sepAtLine, sepAtPosElm; |
81 | int wordAtLine, wordAtPosElm; | 81 | int wordAtLine, wordAtPosElm; |
82 | int atLine, atPosElm; | 82 | int atLine, atPosElm; |
83 | }; | 83 | }; |