summaryrefslogtreecommitdiffstats
path: root/kmymoney2/widgets/transaction.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-05 06:00:29 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-05 06:00:29 +0000
commitfecb0e67b23e8b83ba7fc881bb57bc48c0852d62 (patch)
tree6b8614802f0d01b353bc9ba78aff2090846c198e /kmymoney2/widgets/transaction.h
parentdadc34655c3ab961b0b0b94a10eaaba710f0b5e8 (diff)
downloadkmymoney-fecb0e67b23e8b83ba7fc881bb57bc48c0852d62.tar.gz
kmymoney-fecb0e67b23e8b83ba7fc881bb57bc48c0852d62.zip
TQt4 port kmymoney
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1239855 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmymoney2/widgets/transaction.h')
-rw-r--r--kmymoney2/widgets/transaction.h162
1 files changed, 81 insertions, 81 deletions
diff --git a/kmymoney2/widgets/transaction.h b/kmymoney2/widgets/transaction.h
index 060d025..f74bb60 100644
--- a/kmymoney2/widgets/transaction.h
+++ b/kmymoney2/widgets/transaction.h
@@ -21,7 +21,7 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qpalette.h>
+#include <tqpalette.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -36,7 +36,7 @@
#include <kmymoney/selectedtransaction.h>
#include <kmymoney/mymoneyaccount.h>
-class QTable;
+class TQTable;
class TransactionEditor;
class TransactionEditorContainer;
@@ -68,7 +68,7 @@ typedef enum {
class Transaction : public RegisterItem
{
public:
- Transaction(Register* parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId);
+ Transaction(Register* tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId);
virtual ~Transaction() {}
virtual const char* className(void) { return "Transaction"; }
@@ -87,18 +87,18 @@ public:
bool isErronous(void) const { return m_erronous; }
- virtual const QDate& sortPostDate(void) const { return m_transaction.postDate(); }
+ virtual const TQDate& sortPostDate(void) const { return m_transaction.postDate(); }
virtual int sortSamePostDate(void) const { return 2; }
- virtual const QDate& sortEntryDate(void) const { return m_transaction.entryDate(); }
- virtual const QString& sortPayee(void) const { return m_payee; }
+ virtual const TQDate& sortEntryDate(void) const { return m_transaction.entryDate(); }
+ virtual const TQString& sortPayee(void) const { return m_payee; }
virtual const MyMoneyMoney& sortValue(void) const { return m_split.shares(); }
- virtual const QString& sortNumber(void) const { return m_split.number(); }
- virtual const QString& sortEntryOrder(void) const { return m_uniqueId; }
+ virtual const TQString& sortNumber(void) const { return m_split.number(); }
+ virtual const TQString& sortEntryOrder(void) const { return m_uniqueId; }
virtual CashFlowDirection sortType(void) const { return m_split.shares().isNegative() ? Payment : Deposit; }
- virtual const QString& sortCategory(void) const { return m_category; }
+ virtual const TQString& sortCategory(void) const { return m_category; }
virtual MyMoneySplit::reconcileFlagE sortReconcileState(void) const { return m_split.reconcileFlag(); }
- virtual const QString& id(void) const { return m_uniqueId; }
+ virtual const TQString& id(void) const { return m_uniqueId; }
const MyMoneyTransaction& transaction(void) const { return m_transaction; }
const MyMoneySplit& split(void) const { return m_split; }
@@ -119,31 +119,31 @@ public:
* - textRect (area covering the text)
* - color of the pen to do the painting of text and lines
*
- * @param painter pointer to the QPainter object
+ * @param painter pointer to the TQPainter object
* @param row vertical index of cell in register
* @param col horizontal index of cell in register
- * @param cellRect ref to QRect object receiving the area information for the cell
- * @param textRect ref to QRect object receiving the area information for the text
- * @param cg ref to QColorGroup object receiving the color information to be used
+ * @param cellRect ref to TQRect object receiving the area information for the cell
+ * @param textRect ref to TQRect object receiving the area information for the text
+ * @param cg ref to TQColorGroup object receiving the color information to be used
*/
- virtual bool paintRegisterCellSetup(QPainter* painter, int& row, int& col, QRect& cellRect, QRect& textRect, QColorGroup& cg, QBrush& brush);
+ virtual bool paintRegisterCellSetup(TQPainter* painter, int& row, int& col, TQRect& cellRect, TQRect& textRect, TQColorGroup& cg, TQBrush& brush);
/**
* paints the focus if the current cell defined by (@a row, @a col) has the focus.
*
- * @param painter pointer to the QPainter object
+ * @param painter pointer to the TQPainter object
* @param row vertical index of cell in register
* @param col horizontal index of cell in register
* @param r area covering the cell
* @param cg the color definitions to be used
*/
- void paintRegisterCellFocus(QPainter* painter, int row, int col, const QRect& r, const QColorGroup& cg);
+ void paintRegisterCellFocus(TQPainter* painter, int row, int col, const TQRect& r, const TQColorGroup& cg);
/**
* paints a cell of the register for the transaction. Uses paintRegisterCellSetup(), paintRegisterCellText()
* paintRegisterGrid(), paintRegisterIcons() and paintRegisterCellFocus() to actually do the job.
*
- * @param painter pointer to the QPainter object
+ * @param painter pointer to the TQPainter object
* @param row vertical index of cell in register
* @param col horizontal index of cell in register
* @param r area covering the cell
@@ -151,44 +151,44 @@ public:
* @param cg the color definitions to be used
*
*/
- virtual void paintRegisterCell(QPainter* painter, int row, int col, const QRect& r, bool selected, const QColorGroup& cg);
- virtual void paintRegisterCellText(QPainter* painter, int row, int col, const QRect& r, const QColorGroup& cg, int align, const QString& txt);
- virtual void paintRegisterCellBackground(QPainter* painter, int row, int col, const QRect& r, const QBrush& backgroundBrush);
- virtual void paintRegisterGrid(QPainter* painter, int row, int col, const QRect& r, const QColorGroup& cg) const;
- virtual void paintRegisterIcons(QPainter* painter, int row, int col, const QRect& r, const QColorGroup& cg);
+ virtual void paintRegisterCell(TQPainter* painter, int row, int col, const TQRect& r, bool selected, const TQColorGroup& cg);
+ virtual void paintRegisterCellText(TQPainter* painter, int row, int col, const TQRect& r, const TQColorGroup& cg, int align, const TQString& txt);
+ virtual void paintRegisterCellBackground(TQPainter* painter, int row, int col, const TQRect& r, const TQBrush& backgroundBrush);
+ virtual void paintRegisterGrid(TQPainter* painter, int row, int col, const TQRect& r, const TQColorGroup& cg) const;
+ virtual void paintRegisterIcons(TQPainter* painter, int row, int col, const TQRect& r, const TQColorGroup& cg);
- virtual void paintFormCell(QPainter* /* painter */, int /* row */, int /* col */, const QRect& /* r */, bool /* selected */, const QColorGroup& /* cg */);
+ virtual void paintFormCell(TQPainter* /* painter */, int /* row */, int /* col */, const TQRect& /* r */, bool /* selected */, const TQColorGroup& /* cg */);
- virtual bool formCellText(QString& /* txt */, int& /* align */, int /* row */, int /* col */, QPainter* /* painter */) { return false; }
- virtual void registerCellText(QString& /* txt */, int& /* align */, int /* row */, int /* col */, QPainter* /* painter */) {}
- virtual int registerColWidth(int /* col */, const QFontMetrics& /* cellFontMetrics */) { return 0; }
+ virtual bool formCellText(TQString& /* txt */, int& /* align */, int /* row */, int /* col */, TQPainter* /* painter */) { return false; }
+ virtual void registerCellText(TQString& /* txt */, int& /* align */, int /* row */, int /* col */, TQPainter* /* painter */) {}
+ virtual int registerColWidth(int /* col */, const TQFontMetrics& /* cellFontMetrics */) { return 0; }
/**
* Helper method for the above method.
*/
- void registerCellText(QString& txt, int row, int col);
+ void registerCellText(TQString& txt, int row, int col);
virtual int formRowHeight(int row);
virtual int formRowHeight(void) const;
virtual void setupForm(KMyMoneyTransactionForm::TransactionForm* form);
- virtual void setupFormPalette(QMap<QString, QWidget*>& editWidgets);
- virtual void setupRegisterPalette(QMap<QString, QWidget*>& editWidgets);
+ virtual void setupFormPalette(TQMap<TQString, TQWidget*>& editWidgets);
+ virtual void setupRegisterPalette(TQMap<TQString, TQWidget*>& editWidgets);
virtual void loadTab(KMyMoneyTransactionForm::TransactionForm* form) = 0;
- virtual void arrangeWidgetsInForm(QMap<QString, QWidget*>& editWidgets) = 0;
- virtual void arrangeWidgetsInRegister(QMap<QString, QWidget*>& editWidgets) = 0;
- virtual void tabOrderInForm(QWidgetList& tabOrderWidgets) const = 0;
- virtual void tabOrderInRegister(QWidgetList& tabOrderWidgets) const = 0;
+ virtual void arrangeWidgetsInForm(TQMap<TQString, TQWidget*>& editWidgets) = 0;
+ virtual void arrangeWidgetsInRegister(TQMap<TQString, TQWidget*>& editWidgets) = 0;
+ virtual void tabOrderInForm(TQWidgetList& tabOrderWidgets) const = 0;
+ virtual void tabOrderInRegister(TQWidgetList& tabOrderWidgets) const = 0;
virtual KMyMoneyRegister::Action actionType(void) const = 0;
- QWidget* focusWidget(QWidget*) const;
- void arrangeWidget(QTable* tbl, int row, int col, QWidget* w) const;
+ TQWidget* tqfocusWidget(TQWidget*) const;
+ void arrangeWidget(TQTable* tbl, int row, int col, TQWidget* w) const;
bool haveNumberField(void) const;
- bool matches(const QString&) const;
+ bool matches(const TQString&) const;
/**
* Checks if the mouse hovered over an area that has a tooltip associated with it.
@@ -197,11 +197,11 @@ public:
*
* If a tooltip shall be shown, this method presets the rectangle @a r with the
* area in register coordinates and @a msg with the string that will be passed
- * to QToolTip::tip. @a true is returned in this case.
+ * to TQToolTip::tip. @a true is returned in this case.
*
* If no tooltip is available, @a false will be returned.
*/
- virtual bool maybeTip(const QPoint& relpos, int row, int col, QRect& r, QString& msg);
+ virtual bool maybeTip(const TQPoint& relpos, int row, int col, TQRect& r, TQString& msg);
/**
* This method returns the number of register rows required for a certain
@@ -223,7 +223,7 @@ public:
/**
* This method creates an editor for the transaction
*/
- virtual TransactionEditor* createEditor(TransactionEditorContainer* regForm, const KMyMoneyRegister::SelectedTransactions& list, const QDate& lastPostDate) = 0;
+ virtual TransactionEditor* createEditor(TransactionEditorContainer* regForm, const KMyMoneyRegister::SelectedTransactions& list, const TQDate& lastPostDate) = 0;
virtual void setVisible(bool visible);
@@ -244,8 +244,8 @@ public:
virtual void setReducedIntensity(bool reduced) { m_reducedIntensity = reduced; }
protected:
- virtual void markAsErronous(QPainter* p, int row, int col, const QRect& r);
- virtual void markAttachment(QPainter* painter, int row, int col, const QRect& r);
+ virtual void markAsErronous(TQPainter* p, int row, int col, const TQRect& r);
+ virtual void markAttachment(TQPainter* painter, int row, int col, const TQRect& r);
/**
* This method converts m_split.reconcileFlag() into a readable string
@@ -255,30 +255,30 @@ protected:
* @return Textual representation or flag as selected via @p text of the
* reconciliation state of the split
*/
- QString reconcileState(bool text = true) const;
+ TQString reconcileState(bool text = true) const;
/**
* Helper method to reduce a multi line memo text into a single line.
*
- * @param txt QString that will receive the single line memo text
+ * @param txt TQString that will receive the single line memo text
* @param split const reference to the split to take the memo from
*/
- void singleLineMemo(QString& txt, const MyMoneySplit& split) const;
+ void singleLineMemo(TQString& txt, const MyMoneySplit& split) const;
- virtual void setupPalette(const QPalette& palette, QMap<QString, QWidget*>& editWidgets);
+ virtual void setupPalette(const TQPalette& palette, TQMap<TQString, TQWidget*>& editWidgets);
protected:
MyMoneyTransaction m_transaction;
MyMoneySplit m_split;
MyMoneyAccount m_account;
MyMoneyMoney m_balance;
- QTable* m_form;
- QString m_category;
- QString m_payee;
- QString m_payeeHeader;
- QString m_categoryHeader;
- QString m_splitCurrencyId;
- QString m_uniqueId;
+ TQTable* m_form;
+ TQString m_category;
+ TQString m_payee;
+ TQString m_payeeHeader;
+ TQString m_categoryHeader;
+ TQString m_splitCurrencyId;
+ TQString m_uniqueId;
int m_formRowHeight;
bool m_selected;
bool m_focus;
@@ -292,24 +292,24 @@ protected:
class StdTransaction : public Transaction
{
public:
- StdTransaction(Register* parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId);
+ StdTransaction(Register* tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId);
virtual ~StdTransaction() {}
virtual const char* className(void) { return "StdTransaction"; }
- bool formCellText(QString& txt, int& align, int row, int col, QPainter* painter = 0);
- void registerCellText(QString& txt, int& align, int row, int col, QPainter* painter = 0);
+ bool formCellText(TQString& txt, int& align, int row, int col, TQPainter* painter = 0);
+ void registerCellText(TQString& txt, int& align, int row, int col, TQPainter* painter = 0);
- int registerColWidth(int col, const QFontMetrics& cellFontMetrics);
+ int registerColWidth(int col, const TQFontMetrics& cellFontMetrics);
void setupForm(KMyMoneyTransactionForm::TransactionForm* form);
void loadTab(KMyMoneyTransactionForm::TransactionForm* form);
int numColsForm(void) const { return 4; }
- void arrangeWidgetsInForm(QMap<QString, QWidget*>& editWidgets);
- void arrangeWidgetsInRegister(QMap<QString, QWidget*>& editWidgets);
- void tabOrderInForm(QWidgetList& tabOrderWidgets) const;
- void tabOrderInRegister(QWidgetList& tabOrderWidgets) const;
+ void arrangeWidgetsInForm(TQMap<TQString, TQWidget*>& editWidgets);
+ void arrangeWidgetsInRegister(TQMap<TQString, TQWidget*>& editWidgets);
+ void tabOrderInForm(TQWidgetList& tabOrderWidgets) const;
+ void tabOrderInRegister(TQWidgetList& tabOrderWidgets) const;
KMyMoneyRegister::Action actionType(void) const;
int numRowsRegister(bool expanded) const;
@@ -319,7 +319,7 @@ public:
*/
int numRowsRegister(void) const { return RegisterItem::numRowsRegister(); }
- TransactionEditor* createEditor(TransactionEditorContainer* regForm, const KMyMoneyRegister::SelectedTransactions& list, const QDate& lastPostDate);
+ TransactionEditor* createEditor(TransactionEditorContainer* regForm, const KMyMoneyRegister::SelectedTransactions& list, const TQDate& lastPostDate);
/**
* Return information if @a row should be shown (@a true )
@@ -334,7 +334,7 @@ public:
virtual void setShowRowInForm(int row, bool show);
protected:
- void setupFormHeader(const QString& id);
+ void setupFormHeader(const TQString& id);
private:
bool m_showAccountRow;
@@ -343,18 +343,18 @@ private:
class InvestTransaction : public Transaction
{
public:
- InvestTransaction(Register* parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId);
+ InvestTransaction(Register* tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId);
virtual ~InvestTransaction() {}
- virtual const QString& sortSecurity(void) const { return m_security.name(); }
+ virtual const TQString& sortSecurity(void) const { return m_security.name(); }
virtual const char* className(void) { return "InvestTransaction"; }
- // virtual void paintRegisterCell(QPainter* painter, int row, int col, const QRect& r, bool selected, const QColorGroup& cg);
+ // virtual void paintRegisterCell(TQPainter* painter, int row, int col, const TQRect& r, bool selected, const TQColorGroup& cg);
- bool formCellText(QString& txt, int& align, int row, int col, QPainter* painter = 0);
- void registerCellText(QString& txt, int& align, int row, int col, QPainter* painter = 0);
+ bool formCellText(TQString& txt, int& align, int row, int col, TQPainter* painter = 0);
+ void registerCellText(TQString& txt, int& align, int row, int col, TQPainter* painter = 0);
- int registerColWidth(int col, const QFontMetrics& cellFontMetrics);
+ int registerColWidth(int col, const TQFontMetrics& cellFontMetrics);
void setupForm(KMyMoneyTransactionForm::TransactionForm* form);
/**
@@ -364,10 +364,10 @@ public:
int numColsForm(void) const { return 4; }
- void arrangeWidgetsInForm(QMap<QString, QWidget*>& editWidgets);
- void arrangeWidgetsInRegister(QMap<QString, QWidget*>& editWidgets);
- void tabOrderInForm(QWidgetList& tabOrderWidgets) const;
- void tabOrderInRegister(QWidgetList& tabOrderWidgets) const;
+ void arrangeWidgetsInForm(TQMap<TQString, TQWidget*>& editWidgets);
+ void arrangeWidgetsInRegister(TQMap<TQString, TQWidget*>& editWidgets);
+ void tabOrderInForm(TQWidgetList& tabOrderWidgets) const;
+ void tabOrderInRegister(TQWidgetList& tabOrderWidgets) const;
KMyMoneyRegister::Action actionType(void) const { return KMyMoneyRegister::ActionNone; }
int numRowsRegister(bool expanded) const;
@@ -377,9 +377,9 @@ public:
*/
int numRowsRegister(void) const { return RegisterItem::numRowsRegister(); }
- TransactionEditor* createEditor(TransactionEditorContainer* regForm, const KMyMoneyRegister::SelectedTransactions& list, const QDate& lastPostDate);
+ TransactionEditor* createEditor(TransactionEditorContainer* regForm, const KMyMoneyRegister::SelectedTransactions& list, const TQDate& lastPostDate);
- void splits(MyMoneySplit& assetAccountSplit, QValueList<MyMoneySplit>& interestSplits, QValueList<MyMoneySplit>& feeSplits) const;
+ void splits(MyMoneySplit& assetAccountSplit, TQValueList<MyMoneySplit>& interestSplits, TQValueList<MyMoneySplit>& feeSplits) const;
protected:
bool haveShares(void) const;
@@ -394,20 +394,20 @@ protected:
* Returns textual representation of the activity identified
* by @p type.
*
- * @param txt reference to QString where to store the result
+ * @param txt reference to TQString where to store the result
* @param type activity represented as investTransactionTypeE
*/
- void activity(QString& txt, MyMoneySplit::investTransactionTypeE type) const;
+ void activity(TQString& txt, MyMoneySplit::investTransactionTypeE type) const;
private:
- QValueList<MyMoneySplit> m_feeSplits;
- QValueList<MyMoneySplit> m_interestSplits;
+ TQValueList<MyMoneySplit> m_feeSplits;
+ TQValueList<MyMoneySplit> m_interestSplits;
MyMoneySplit m_assetAccountSplit;
MyMoneySecurity m_security;
MyMoneySecurity m_currency;
MyMoneySplit::investTransactionTypeE m_transactionType;
- QString m_feeCategory;
- QString m_interestCategory;
+ TQString m_feeCategory;
+ TQString m_interestCategory;
MyMoneyMoney m_feeAmount;
MyMoneyMoney m_interestAmount;
MyMoneyMoney m_totalAmount;