summaryrefslogtreecommitdiffstats
path: root/ksystemlog/src/logManager.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-01 08:42:58 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-01 08:42:58 +0000
commit9902f14bc9162d7b286b3f99b27989237db9f264 (patch)
treeb95be3be1992566418b2c2e2ed16bdb29453a8d4 /ksystemlog/src/logManager.cpp
parent437249c71459e9ea15be70788687cb8695e249c2 (diff)
downloadksystemlog-9902f14bc9162d7b286b3f99b27989237db9f264.tar.gz
ksystemlog-9902f14bc9162d7b286b3f99b27989237db9f264.zip
TQt4 port ksystemlog
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ksystemlog@1239000 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksystemlog/src/logManager.cpp')
-rw-r--r--ksystemlog/src/logManager.cpp102
1 files changed, 51 insertions, 51 deletions
diff --git a/ksystemlog/src/logManager.cpp b/ksystemlog/src/logManager.cpp
index f68092c..b67fb8e 100644
--- a/ksystemlog/src/logManager.cpp
+++ b/ksystemlog/src/logManager.cpp
@@ -18,8 +18,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-//Qt includes
-#include <qclipboard.h>
+//TQt includes
+#include <tqclipboard.h>
//KDE includes
#include <kpopupmenu.h>
@@ -54,7 +54,7 @@ LogManager::LogManager(KSystemLog* m, LoadingDialog* progress) :
groupByColumn(-1),
columns(NULL),
- sortOrder(Qt::Ascending),
+ sortOrder(TQt::Ascending),
sortColumn(0),
tooltipEnabled(true),
@@ -65,7 +65,7 @@ LogManager::LogManager(KSystemLog* m, LoadingDialog* progress) :
current(false),
newLinesSinceLastSelection(0),
- lastUpdate(QTime::currentTime()),
+ lastUpdate(TQTime::currentTime()),
logMode(Globals::noMode) {
@@ -73,12 +73,12 @@ LogManager::LogManager(KSystemLog* m, LoadingDialog* progress) :
view=new View(main);
view->setLogManager(this);
- connect(view, SIGNAL(changeStatusbar(const QString&)), this, SLOT(slotChangeStatusbar(const QString&)));
- connect(view, SIGNAL(changeCaption(const QString&)), this, SLOT(slotChangeCaption(const QString&)));
+ connect(view, TQT_SIGNAL(changeStatusbar(const TQString&)), this, TQT_SLOT(slotChangeStatusbar(const TQString&)));
+ connect(view, TQT_SIGNAL(changeCaption(const TQString&)), this, TQT_SLOT(slotChangeCaption(const TQString&)));
- connect(view->getLogList(), SIGNAL(doubleClicked(QListViewItem *, const QPoint&, int)), this, SLOT(slotDetails(QListViewItem *, const QPoint&, int)));
- connect(view->getLogList(), SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged()));
- connect(view->getLogList(), SIGNAL(rightButtonPressed(QListViewItem*, const QPoint&, int)), this, SLOT(slotOpenContextualMenu(QListViewItem*, const QPoint&, int)));
+ connect(view->getLogList(), TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint&, int)), this, TQT_SLOT(slotDetails(TQListViewItem *, const TQPoint&, int)));
+ connect(view->getLogList(), TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged()));
+ connect(view->getLogList(), TQT_SIGNAL(rightButtonPressed(TQListViewItem*, const TQPoint&, int)), this, TQT_SLOT(slotOpenContextualMenu(TQListViewItem*, const TQPoint&, int)));
}
@@ -168,7 +168,7 @@ void LogManager::openingProgress(int percent) {
//Move this signal to Loading Dialog class
emit GUIUpdated();
- //((KSystemLog*)( view->parent()))->kapp->processEvents();
+ //((KSystemLog*)( view->tqparent()))->kapp->processEvents();
}
@@ -176,15 +176,15 @@ void LogManager::toggleFilterBar() {
view->toggleFilterBar();
}
-void LogManager::slotDetails(QListViewItem *, const QPoint &, int) {
+void LogManager::slotDetails(TQListViewItem *, const TQPoint &, int) {
emit detailsCalled();
}
-void LogManager::slotChangeCaption(const QString& message) {
+void LogManager::slotChangeCaption(const TQString& message) {
emit changeCaption(message);
}
-void LogManager::slotChangeStatusbar(const QString& message) {
+void LogManager::slotChangeStatusbar(const TQString& message) {
emit changeStatusbar(message);
}
@@ -221,7 +221,7 @@ LogMode* LogManager::getLogMode() {
return(logMode);
}
-QTime& LogManager::getLastUpdate() {
+TQTime& LogManager::getLastUpdate() {
return(lastUpdate);
}
@@ -234,14 +234,14 @@ void LogManager::slotLogUpdated(int lineCount) {
newLinesSinceLastSelection+=lineCount;
- lastUpdate=QTime::currentTime();
+ lastUpdate=TQTime::currentTime();
//Emit this signal even if the current LogManager is selected
emit logUpdated(newLinesSinceLastSelection);
//If the user is in this log manager, he does have to see that some new log lines have appeared
if (isCurrent()==false) {
- QString title(i18n("%1 (%2)").arg(logMode->name).arg(newLinesSinceLastSelection));
+ TQString title(i18n("%1 (%2)").tqarg(logMode->name).tqarg(newLinesSinceLastSelection));
//This signal is emitted only if the selected tab is not this one
emit changeTitle(view, title);
@@ -252,7 +252,7 @@ void LogManager::slotLogUpdated(int lineCount) {
void LogManager::slotExpandAll() {
//If this LogManager is the currently displayed one
if (isCurrent()) {
- QListViewItem* item=view->getLogList()->firstChild();
+ TQListViewItem* item=view->getLogList()->firstChild();
while (item!=NULL) {
item->setOpen(true);
@@ -265,7 +265,7 @@ void LogManager::slotExpandAll() {
void LogManager::slotCollapseAll() {
//If this LogManager is the currently displayed one
if (isCurrent()) {
- QListViewItem* item=view->getLogList()->firstChild();
+ TQListViewItem* item=view->getLogList()->firstChild();
while (item!=NULL) {
item->setOpen(false);
@@ -277,7 +277,7 @@ void LogManager::slotCollapseAll() {
void LogManager::slotFileSave() {
//If this LogManager is the currently displayed one
if (isCurrent()) {
- QListViewItemIterator it(view->getLogList(), QListViewItemIterator::Selected);
+ TQListViewItemIterator it(view->getLogList(), TQListViewItemIterator::Selected);
//No item selected
if (it.current()==NULL) {
@@ -286,16 +286,16 @@ void LogManager::slotFileSave() {
}
- QString filename = KFileDialog::getSaveFileName(QString::null, QString::null, main);
+ TQString filename = KFileDialog::getSaveFileName(TQString(), TQString(), main);
if (!filename.isEmpty()) {
- QIODevice* ioDev = KFilterDev::deviceForFile( filename );
+ TQIODevice* ioDev = KFilterDev::deviceForFile( filename );
if (ioDev->open(IO_WriteOnly)) {
- QTextStream stream(ioDev);
+ TQTextStream stream(ioDev);
int nbCopied=0;
- QListViewItem* qtItem=it.current();
+ TQListViewItem* qtItem=it.current();
while (qtItem!=NULL) {
LogListItem* item=static_cast<LogListItem*> (qtItem);
@@ -311,10 +311,10 @@ void LogManager::slotFileSave() {
ioDev->close();
- emit changeStatusbar(i18n("1 log line saved to '%1'.", "%n log lines saved to '%1'.", nbCopied).arg(filename));
+ emit changeStatusbar(i18n("1 log line saved to '%1'.", "%n log lines saved to '%1'.", nbCopied).tqarg(filename));
}
else {
- QString message(i18n("Unable to save file '%1': Permission Denied.").arg(filename));
+ TQString message(i18n("Unable to save file '%1': Permission Denied.").tqarg(filename));
KMessageBox::error(main, message, i18n("Unable to save file."), KMessageBox::Notify);
}
@@ -342,16 +342,16 @@ void LogManager::initialize(LogMode* mode) {
//Find the reader instance used for this new mode
reader=ReaderFactory::createReader(mode);
- connect(reader, SIGNAL(statusbarChanged(const QString&)), this, SLOT(slotChangeStatusbar(const QString&)));
- connect(reader, SIGNAL(logUpdated(int)), this, SLOT(slotLogUpdated(int)));
- connect(reader, SIGNAL(openingProgressed(int)), this, SLOT(openingProgress(int)));
+ connect(reader, TQT_SIGNAL(statusbarChanged(const TQString&)), this, TQT_SLOT(slotChangeStatusbar(const TQString&)));
+ connect(reader, TQT_SIGNAL(logUpdated(int)), this, TQT_SLOT(slotLogUpdated(int)));
+ connect(reader, TQT_SIGNAL(openingProgressed(int)), this, TQT_SLOT(openingProgress(int)));
- connect(reader, SIGNAL(readingBegin()), this, SLOT(readingBegun()));
- connect(reader, SIGNAL(readingFile(int)), this, SLOT(readingFile(int)));
- connect(reader, SIGNAL(readingEnd()), this, SLOT(readingEnded()));
+ connect(reader, TQT_SIGNAL(readingBegin()), this, TQT_SLOT(readingBegun()));
+ connect(reader, TQT_SIGNAL(readingFile(int)), this, TQT_SLOT(readingFile(int)));
+ connect(reader, TQT_SIGNAL(readingEnd()), this, TQT_SLOT(readingEnded()));
- //Inform this reader that this LogManager is now its parent
+ //Inform this reader that this LogManager is now its tqparent
reader->setLogManager(this);
//Find the log files used for this kind of mode, and set them to our log manager
@@ -445,15 +445,15 @@ void LogManager::slotSendMail() {
//If this LogManager is the currently displayed one
if (isCurrent()) {
- QString body(i18n("Here are my logs:\n"));
+ TQString body(i18n("Here are my logs:\n"));
body+=i18n("---------------------------------------\n");
- QListViewItemIterator it(view->getLogList(), QListViewItemIterator::Selected);
+ TQListViewItemIterator it(view->getLogList(), TQListViewItemIterator::Selected);
int i=0;
- QListViewItem* qtItem=it.current();
+ TQListViewItem* qtItem=it.current();
while (qtItem!=NULL) {
LogListItem* item=static_cast<LogListItem*> (qtItem);
@@ -473,16 +473,16 @@ void LogManager::slotSendMail() {
}
/* Parameters list of this method
- const QString & to,
- const QString & cc,
- const QString & bcc,
- const QString & subject,
- const QString & body,
- const QString & messageFile,
- const QStringList & attachURLs,
- const QCString & startup_id
+ const TQString & to,
+ const TQString & cc,
+ const TQString & bcc,
+ const TQString & subject,
+ const TQString & body,
+ const TQString & messageFile,
+ const TQStringList & attachURLs,
+ const TQCString & startup_id
*/
- kapp->invokeMailer("", "", "", i18n("Log Lines of my problem"), body, "", QStringList(), kapp->startupId());
+ kapp->invokeMailer("", "", "", i18n("Log Lines of my problem"), body, "", TQStringList(), kapp->startupId());
}
}
@@ -492,15 +492,15 @@ void LogManager::slotCopyToClipboard() {
if (isCurrent()) {
kdDebug() << "Copy to the clipboard" << endl;
- QListView* listView=view->getLogList();
+ TQListView* listView=view->getLogList();
- QListViewItemIterator it(listView, QListViewItemIterator::Selected);
+ TQListViewItemIterator it(listView, TQListViewItemIterator::Selected);
int nbCopied=0;
LogListItem* item=static_cast<LogListItem*> (it.current());
- QString text;
+ TQString text;
while (item!=NULL) {
@@ -521,8 +521,8 @@ void LogManager::slotCopyToClipboard() {
}
else {
//Copy both to clipboard and X11-selection
- QApplication::clipboard()->setText(text, QClipboard::Clipboard);
- QApplication::clipboard()->setText(text, QClipboard::Selection);
+ TQApplication::tqclipboard()->setText(text, TQClipboard::Clipboard);
+ TQApplication::tqclipboard()->setText(text, TQClipboard::Selection);
emit changeStatusbar(i18n("1 log line copied to clipboard.", "%n log lines copied to clipboard.", nbCopied));
}
@@ -573,8 +573,8 @@ void LogManager::synchronize(LogLineList* buffer) {
}
//TODO Change the method name
-void LogManager::slotOpenContextualMenu(QListViewItem* /*item*/, const QPoint& pos, int /*other*/) {
- QPopupMenu menu(main);
+void LogManager::slotOpenContextualMenu(TQListViewItem* /*item*/, const TQPoint& pos, int /*other*/) {
+ TQPopupMenu menu(main);
main->actionCollection()->action("reload")->plug(&menu);
main->actionCollection()->action("select_all")->plug(&menu);