summaryrefslogtreecommitdiffstats
path: root/src/tag.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tag.h')
-rw-r--r--src/tag.h122
1 files changed, 61 insertions, 61 deletions
diff --git a/src/tag.h b/src/tag.h
index 687e9d5..b1cc495 100644
--- a/src/tag.h
+++ b/src/tag.h
@@ -21,15 +21,15 @@
#ifndef TAG_H
#define TAG_H
-#include <qstring.h>
-#include <qcolor.h>
-#include <qfont.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqcolor.h>
+#include <tqfont.h>
+#include <tqvaluelist.h>
#include <kaction.h>
#include <kshortcut.h>
-class QPainter;
+class TQPainter;
class Tag;
@@ -40,63 +40,63 @@ class State
{
public:
/// LIST OF STATES:
- typedef QValueList<State*> List;
+ typedef TQValueList<State*> List;
public:
/// CONSTRUCTOR AND DESTRUCTOR:
- State(const QString &id = QString(), Tag *tag = 0);
+ State(const TQString &id = TQString(), Tag *tag = 0);
~State();
/// SET PROPERTIES:
- void setId(const QString &id) { m_id = id; }
- void setName(const QString &name) { m_name = name; }
- void setEmblem(const QString &emblem) { m_emblem = emblem; }
+ void setId(const TQString &id) { m_id = id; }
+ void setName(const TQString &name) { m_name = name; }
+ void setEmblem(const TQString &emblem) { m_emblem = emblem; }
void setBold(bool bold) { m_bold = bold; }
void setItalic(bool italic) { m_italic = italic; }
void setUnderline(bool underline) { m_underline = underline; }
void setStrikeOut(bool strikeOut) { m_strikeOut = strikeOut; }
- void setTextColor(const QColor &color) { m_textColor = color; }
- void setFontName(const QString &font) { m_fontName = font; }
+ void setTextColor(const TQColor &color) { m_textColor = color; }
+ void setFontName(const TQString &font) { m_fontName = font; }
void setFontSize(int size) { m_fontSize = size; }
- void setBackgroundColor(const QColor &color) { m_backgroundColor = color; }
- void setTextEquivalent(const QString &text) { m_textEquivalent = text; }
+ void setBackgroundColor(const TQColor &color) { m_backgroundColor = color; }
+ void setTextEquivalent(const TQString &text) { m_textEquivalent = text; }
void setOnAllTextLines(bool yes) { m_onAllTextLines = yes; }
void setParentTag(Tag *tag) { m_parentTag = tag; }
/// GET PROPERTIES:
- QString id() const { return m_id; }
- QString name() const { return m_name; }
- QString emblem() const { return m_emblem; }
+ TQString id() const { return m_id; }
+ TQString name() const { return m_name; }
+ TQString emblem() const { return m_emblem; }
bool bold() const { return m_bold; }
bool italic() const { return m_italic; }
bool underline() const { return m_underline; }
bool strikeOut() const { return m_strikeOut; }
- QColor textColor() const { return m_textColor; }
- QString fontName() const { return m_fontName; }
+ TQColor textColor() const { return m_textColor; }
+ TQString fontName() const { return m_fontName; }
int fontSize() const { return m_fontSize; }
- QColor backgroundColor() const { return m_backgroundColor; }
- QString textEquivalent() const { return m_textEquivalent; }
+ TQColor backgroundColor() const { return m_backgroundColor; }
+ TQString textEquivalent() const { return m_textEquivalent; }
bool onAllTextLines() const { return m_onAllTextLines; }
- Tag* parentTag() const { return m_parentTag; }
+ Tag* tqparentTag() const { return m_parentTag; }
/// HELPING FUNCTIONS:
State *nextState(bool cycle = true);
- QString fullName();
- QFont font(QFont base);
- QString toCSS(const QString &gradientFolderPath, const QString &gradientFolderName, const QFont &baseFont);
- static void merge(const List &states, State *result, int *emblemsCount, bool *haveInvisibleTags, const QColor &backgroundColor);
+ TQString fullName();
+ TQFont font(TQFont base);
+ TQString toCSS(const TQString &gradientFolderPath, const TQString &gradientFolderName, const TQFont &baseFont);
+ static void merge(const List &states, State *result, int *emblemsCount, bool *haveInvisibleTags, const TQColor &backgroundColor);
void copyTo(State *other);
private:
/// PROPERTIES:
- QString m_id;
- QString m_name;
- QString m_emblem;
+ TQString m_id;
+ TQString m_name;
+ TQString m_emblem;
bool m_bold;
bool m_italic;
bool m_underline;
bool m_strikeOut;
- QColor m_textColor;
- QString m_fontName;
+ TQColor m_textColor;
+ TQString m_fontName;
int m_fontSize;
- QColor m_backgroundColor;
- QString m_textEquivalent;
+ TQColor m_backgroundColor;
+ TQString m_textEquivalent;
bool m_onAllTextLines;
Tag *m_parentTag;
};
@@ -110,31 +110,31 @@ class Tag
{
public:
/// LIST OF ALL TAGS IN THE APPLICATION:
- typedef QValueList<Tag*> List;
+ typedef TQValueList<Tag*> List;
static Tag::List all;
- static State* stateForId(const QString &id);
+ static State* stateForId(const TQString &id);
static Tag* tagForKAction(KAction *action);
static Tag* tagSimilarTo(Tag *tagToTest);
- static QMap<QString, QString> loadTags(const QString &path = QString()/*, bool merge = false*/); /// << Load the tags contained in the XML file @p path or those in the application settings if @p path isEmpty(). If @p merge is true and a tag with the id of a tag that should be loaded already exist, the tag will get a new id. Otherwise, the tag will be dismissed.
+ static TQMap<TQString, TQString> loadTags(const TQString &path = TQString()/*, bool merge = false*/); /// << Load the tags contained in the XML file @p path or those in the application settings if @p path isEmpty(). If @p merge is true and a tag with the id of a tag that should be loaded already exist, the tag will get a new id. Otherwise, the tag will be dismissed.
static void saveTags();
- static void saveTagsTo(QValueList<Tag*> &list, const QString &fullPath);
- static void createDefaultTagsSet(const QString &file);
+ static void saveTagsTo(TQValueList<Tag*> &list, const TQString &fullPath);
+ static void createDefaultTagsSet(const TQString &file);
static long getNextStateUid();
private:
static long nextStateUid;
public:
/// CONSTRUCTOR AND DESTRUCTOR:
- Tag(/*State *firstState, const QString &name, bool inheritedBySiblings*/);
+ Tag(/*State *firstState, const TQString &name, bool inheritedBySiblings*/);
~Tag();
/// SET PROPERTIES:
- void setName(const QString &name);
+ void setName(const TQString &name);
void setShortcut(const KShortcut &shortcut) { m_action->setShortcut(shortcut); }
void setInheritedBySiblings(bool inherited) { m_inheritedBySiblings = inherited; }
void appendState(State *state) { m_states.append(state); state->setParentTag(this); }
void removeState(State *state) { m_states.remove(state); state->setParentTag(0); }
/// GET PROPERTIES:
- QString name() const { return m_name; }
+ TQString name() const { return m_name; }
KShortcut shortcut() const { return m_action->shortcut(); }
bool inheritedBySiblings() const { return m_inheritedBySiblings; }
State::List& states() const { return (State::List&)m_states; }
@@ -142,17 +142,17 @@ class Tag
void copyTo(Tag *other);
private:
/// PROPERTIES:
- QString m_name;
+ TQString m_name;
KAction *m_action;
bool m_inheritedBySiblings;
State::List m_states;
};
-#include <qiconset.h>
-#include <qmenudata.h>
-#include <qstring.h>
+#include <tqiconset.h>
+#include <tqmenudata.h>
+#include <tqstring.h>
-class QPainter;
+class TQPainter;
/** A menu item to indent icon and text (to keep place for a checkbox or a radiobutton on left).
* You should not set any icon when adding this entry to the menu.
@@ -160,38 +160,38 @@ class QPainter;
* Better suited to be used with StateMenuItem (or TagMenuItem).
* @author S�astien Laot
*/
-class IndentedMenuItem : public QCustomMenuItem
+class IndentedMenuItem : public TQCustomMenuItem
{
public:
- IndentedMenuItem(const QString &text, const QString &icon = "", const QString &shortcut = "");
+ IndentedMenuItem(const TQString &text, const TQString &icon = "", const TQString &shortcut = "");
~IndentedMenuItem();
- void paint(QPainter *painter, const QColorGroup &cg, bool active, bool enabled, int x, int y, int w, int h);
- QSize sizeHint();
+ void paint(TQPainter *painter, const TQColorGroup &cg, bool active, bool enabled, int x, int y, int w, int h);
+ TQSize tqsizeHint();
bool fullSpan() { return true; }
private:
- QString m_text;
- QString m_icon;
- QString m_shortcut;
+ TQString m_text;
+ TQString m_icon;
+ TQString m_shortcut;
};
/** A menu item representing a State or a Tag.
* @author S�astien Laot
*/
-class StateMenuItem : public QCustomMenuItem
+class StateMenuItem : public TQCustomMenuItem
{
public:
- StateMenuItem(State *state, const QString &shortcut, bool withTagName = false);
+ StateMenuItem(State *state, const TQString &shortcut, bool withTagName = false);
~StateMenuItem();
- void paint(QPainter *painter, const QColorGroup &cg, bool active, bool enabled, int x, int y, int w, int h);
- QSize sizeHint();
+ void paint(TQPainter *painter, const TQColorGroup &cg, bool active, bool enabled, int x, int y, int w, int h);
+ TQSize tqsizeHint();
bool fullSpan() { return true; }
private:
State *m_state;
- QString m_name;
- QString m_shortcut;
+ TQString m_name;
+ TQString m_shortcut;
public:
- static QIconSet checkBoxIconSet(bool checked, QColorGroup cg);
- static QIconSet radioButtonIconSet(bool checked, QColorGroup cg);
+ static TQIconSet checkBoxIconSet(bool checked, TQColorGroup cg);
+ static TQIconSet radioButtonIconSet(bool checked, TQColorGroup cg);
static int iconMargin() { return 5; }
};