diff -r e8292658d5b3 -r c1941114ca88 as_table.cpp --- a/as_table.cpp Fri Nov 28 14:20:00 2008 +0100 +++ b/as_table.cpp Fri Dec 05 23:14:02 2008 +0100 @@ -1,12 +1,12 @@ // // OSSP asgui - Accounting system graphical user interface -// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) -// Copyright (c) 2002-2004 Ralf S. Engelschall -// Copyright (c) 2002-2004 Michael Schloh von Bennewitz -// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH +// Copyright (c) 2002-2008 The OSSP Project (http://www.ossp.org/) +// Copyright (c) 2002-2008 Ralf S. Engelschall +// Copyright (c) 2002-2008 Michael Schloh von Bennewitz +// Copyright (c) 2002-2008 Cable & Wireless Telecommunications Services GmbH // // This file is part of OSSP asgui, an accounting system graphical user -// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. +// interface which can be found at http://asgui.europalab.com/. // // Permission to use, copy, modify, and distribute this software for // any purpose with or without fee is hereby granted, provided that @@ -29,7 +29,14 @@ // as_table.cpp: ISO C++ implementation // -#include +#define QT3_SUPPORT + +#include + +//Added by qt3to4: +#include +#include +#include #include "as_const.h" #include "as_table.h" @@ -41,8 +48,8 @@ if (pObject == horizontalHeader() && pEvent->type() == QEvent::MouseButtonDblClick) return true; if (pEvent->type() == QEvent::MouseButtonPress && // Ignore mid, right clicks - ((QMouseEvent *)pEvent)->button() == QMouseEvent::RightButton || - ((QMouseEvent *)pEvent)->button() == QMouseEvent::MidButton) + ((QMouseEvent *)pEvent)->button() == Qt::RightButton || + ((QMouseEvent *)pEvent)->button() == Qt::MidButton) return true; else if (pEvent->type() == QEvent::KeyPress) { if (((QKeyEvent *)pEvent)->key() == Qt::Key_Tab) { // Handle tab key @@ -119,10 +126,10 @@ return true; // Capture // Forward incompletely handled key events - return QTable::eventFilter(pObject, pEvent); + return Q3Table::eventFilter(pObject, pEvent); } else // Default behaviour is to pass the event onwards - return QTable::eventFilter(pObject, pEvent); + return Q3Table::eventFilter(pObject, pEvent); } // Overridden member hack to allow externally connected control @@ -135,7 +142,7 @@ if (nText != this->text(nRow, nCol) && nCol != TITRAQ_IDXLINE) emit textEdited(nRow, nCol); - QTable::setText(nRow, nCol, nText); + Q3Table::setText(nRow, nCol, nText); } } @@ -150,7 +157,7 @@ this->setSortdir(bAscend); this->setSortcol(nCol); - QTable::sortColumn(nCol, this->getSortdir(), true); + Q3Table::sortColumn(nCol, this->getSortdir(), true); // // Announce sorting policy with multiple selections // QTableSelection Testsel = this->selection(this->currentSelection()); @@ -217,7 +224,7 @@ } } - QTable::paintCell(pPainter, nRow, nCol, Recto, bSelect, Cgroup); + Q3Table::paintCell(pPainter, nRow, nCol, Recto, bSelect, Cgroup); }; // Blah @@ -242,7 +249,7 @@ // Overriden member to properly handle read only attribute after edition void TiTable::endEdit(int nRow, int nCol, bool bAccept, bool bReplace) { - QTable::endEdit(nRow, nCol, bAccept, bReplace); + Q3Table::endEdit(nRow, nCol, bAccept, bReplace); // Table read only attribute must be set to return to the normal // row highlight and selection behaviour of AS. The reason it was