diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-05 06:00:29 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-05 06:00:29 +0000 |
commit | fecb0e67b23e8b83ba7fc881bb57bc48c0852d62 (patch) | |
tree | 6b8614802f0d01b353bc9ba78aff2090846c198e /kmymoney2/views/kgloballedgerview.h | |
parent | dadc34655c3ab961b0b0b94a10eaaba710f0b5e8 (diff) | |
download | kmymoney-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/views/kgloballedgerview.h')
-rw-r--r-- | kmymoney2/views/kgloballedgerview.h | 104 |
1 files changed, 53 insertions, 51 deletions
diff --git a/kmymoney2/views/kgloballedgerview.h b/kmymoney2/views/kgloballedgerview.h index 861bd0e..0d782ab 100644 --- a/kmymoney2/views/kgloballedgerview.h +++ b/kmymoney2/views/kgloballedgerview.h @@ -26,9 +26,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> -#include <qwidgetlist.h> -#include <qstring.h> +#include <tqwidget.h> +#include <tqwidgetlist.h> +#include <tqstring.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -45,12 +45,12 @@ #include <kmymoney/register.h> #include <kmymoney/transactionform.h> -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QPopupMenu; -class QFrame; -class QLabel; +class TQVBoxLayout; +class TQHBoxLayout; +class TQGridLayout; +class TQPopupMenu; +class TQFrame; +class TQLabel; class KMyMoneyAccountCombo; class KToolBar; @@ -63,17 +63,18 @@ class TransactionEditor; * events on widgets outside a given set of widgets. This is used internally * to detect when to leave the edit mode. */ -class MousePressFilter : public QObject +class MousePressFilter : public TQObject { Q_OBJECT + TQ_OBJECT public: - MousePressFilter(QWidget* parent = 0, const char* name = 0); + MousePressFilter(TQWidget* tqparent = 0, const char* name = 0); /** - * Add widget @p w to the list of possible parent objects. See eventFilter() how + * Add widget @p w to the list of possible tqparent objects. See eventFilter() how * they will be used. */ - void addWidget(QWidget* w); + void addWidget(TQWidget* w); public slots: /** @@ -95,32 +96,32 @@ public slots: protected: /** * This method checks if the widget @p child is a child of - * the widget @p parent and returns either @a true or @a false. + * the widget @p tqparent and returns either @a true or @a false. * * @param child pointer to child widget - * @param parent pointer to parent widget - * @retval true @p child points to widget which has @p parent as parent or grand-parent - * @retval false @p child points to a widget which is not related to @p parent + * @param tqparent pointer to tqparent widget + * @retval true @p child points to widget which has @p tqparent as tqparent or grand-tqparent + * @retval false @p child points to a widget which is not related to @p tqparent */ - bool isChildOf(QWidget* child, QWidget* parent); + bool isChildOf(TQWidget* child, TQWidget* tqparent); /** * Reimplemented from base class. Sends out the mousePressedOnExternalWidget() signal * if object @p o points to an object which is not a child widget of any added previously * using the addWidget() method. The signal is sent out only once for each event @p e. * - * @param o pointer to QObject - * @param e pointer to QEvent + * @param o pointer to TQObject + * @param e pointer to TQEvent * @return always returns @a false */ - bool eventFilter(QObject* o, QEvent* e); + bool eventFilter(TQObject* o, TQEvent* e); signals: void mousePressedOnExternalWidget(bool&); private: - QValueList<QWidget*> m_parents; - QEvent* m_lastMousePressEvent; + TQValueList<TQWidget*> m_parents; + TQEvent* m_lastMousePressEvent; bool m_filterActive; }; @@ -130,15 +131,16 @@ private: class KGlobalLedgerView : public KMyMoneyViewBase { Q_OBJECT + TQ_OBJECT public: - KGlobalLedgerView(QWidget *parent=0, const char *name=0); + KGlobalLedgerView(TQWidget *tqparent=0, const char *name=0); ~KGlobalLedgerView(); /** * This method returns the id of the currently selected account - * or QString() if none is selected. + * or TQString() if none is selected. */ - const QString accountId(void) const { return m_account.id(); } + const TQString accountId(void) const { return m_account.id(); } /** * Checks if new transactions can be created in the current context @@ -150,7 +152,7 @@ public: * @retval true Yes, view allows to create transactions (tooltip is not changed) * @retval false No, view does not support creation of transactions (tooltip is updated with message) */ - bool canCreateTransactions(QString& tooltip) const; + bool canCreateTransactions(TQString& tooltip) const; /** * Checks if a list of transactions can be modified (edit/delete) in the current context @@ -163,9 +165,9 @@ public: * @retval true Yes, view allows to edit/delete transactions (tooltip is not changed) * @retval false No, view cannot edit/delete transactions (tooltip is updated with message) */ - bool canModifyTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const; + bool canModifyTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const; - bool canDuplicateTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const; + bool canDuplicateTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const; /** * Checks if the list of transactions can be edited in the current context @@ -177,7 +179,7 @@ public: * * @return @c true if edit operation is possible, @c false if not */ - bool canEditTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const; + bool canEditTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const; TransactionEditor* startEdit(const KMyMoneyRegister::SelectedTransactions& list); @@ -204,13 +206,13 @@ public slots: * * @param accountId Internal id used for the account to show * @param transactionId Internal id used for the transaction to select. - * Default is QString() which will select the last + * Default is TQString() which will select the last * transaction in the ledger if not the same account * * @retval true selection of account referenced by @p id succeeded * @retval false selection of account failed */ - bool slotSelectAccount(const QString& accountId, const QString& transactionId = QString()); + bool slotSelectAccount(const TQString& accountId, const TQString& transactionId = TQString()); /** * This method is provided for convenience and acts as the method above. @@ -228,7 +230,7 @@ public slots: * @param endingBalance The calculated ending balance for the statement * Default ist 0. */ - void slotSetReconcileAccount(const MyMoneyAccount& account = MyMoneyAccount(), const QDate& reconciliationDate = QDate(), const MyMoneyMoney& endingBalance = MyMoneyMoney()); + void slotSetReconcileAccount(const MyMoneyAccount& account = MyMoneyAccount(), const TQDate& reconciliationDate = TQDate(), const MyMoneyMoney& endingBalance = MyMoneyMoney()); /** * Select all transactions in the ledger that are not hidden. @@ -253,9 +255,9 @@ protected: void loadView(void); - void resizeEvent(QResizeEvent*); + void resizeEvent(TQResizeEvent*); - void selectTransaction(const QString& id); + void selectTransaction(const TQString& id); /** * This method handles the focus of the keyboard. When in edit mode @@ -268,7 +270,7 @@ protected: */ bool focusNextPrevChild(bool next); - bool eventFilter(QObject* o, QEvent* e); + bool eventFilter(TQObject* o, TQEvent* e); /** * Returns @a true if setReconciliationAccount() has been called for @@ -287,7 +289,7 @@ protected: * @param actBalance map of account indexed values to be used as actual balance * @param clearedBalance map of account indexed values to be used as cleared balance */ - void updateSummaryLine(const QMap<QString, MyMoneyMoney>& actBalance, const QMap<QString, MyMoneyMoney>& clearedBalance); + void updateSummaryLine(const TQMap<TQString, MyMoneyMoney>& actBalance, const TQMap<TQString, MyMoneyMoney>& clearedBalance); /** * setup the default action according to the current account type @@ -301,13 +303,13 @@ protected slots: /** * Sets the contentsPos of the register to d->m_startPoint or makes - * the focus item visible if d->m_startPoint equals QPoint(-1, -1). + * the focus item visible if d->m_startPoint equals TQPoint(-1, -1). */ void slotUpdateViewPos(void); void slotSortOptions(void); void slotToggleTransactionMark(KMyMoneyRegister::Transaction* t); - void slotKeepPostDate(const QDate&); + void slotKeepPostDate(const TQDate&); void slotAboutToSelectItem(KMyMoneyRegister::RegisterItem*, bool&); @@ -318,7 +320,7 @@ protected: * and is used to preset the posting date when new transactions are created. * This member is initialised to the current date when the program is started. */ - static QDate m_lastPostDate; + static TQDate m_lastPostDate; private: /// \internal d-pointer class. @@ -327,11 +329,11 @@ private: Private* const d; // frames - QFrame* m_toolbarFrame; - QFrame* m_registerFrame; - QFrame* m_buttonFrame; - QFrame* m_formFrame; - QFrame* m_summaryFrame; + TQFrame* m_toolbarFrame; + TQFrame* m_registerFrame; + TQFrame* m_buttonFrame; + TQFrame* m_formFrame; + TQFrame* m_summaryFrame; // widgets KMyMoneyAccountCombo* m_accountComboBox; @@ -347,11 +349,11 @@ private: /** * This member holds the transaction list */ - QValueList<QPair<MyMoneyTransaction, MyMoneySplit> > m_transactionList; + TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> > m_transactionList; - QLabel* m_leftSummaryLabel; - QLabel* m_centerSummaryLabel; - QLabel* m_rightSummaryLabel; + TQLabel* m_leftSummaryLabel; + TQLabel* m_centerSummaryLabel; + TQLabel* m_rightSummaryLabel; KMyMoneyTransactionForm::TransactionForm* m_form; @@ -359,7 +361,7 @@ private: bool m_newAccountLoaded; bool m_inEditMode; - QWidgetList m_tabOrderWidgets; + TQWidgetList m_tabOrderWidgets; signals: void accountSelected(const MyMoneyObject&); @@ -396,7 +398,7 @@ signals: void toggleReconciliationFlag(void); private: - bool canProcessTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const; + bool canProcessTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const; }; #endif |