diff --git a/src/modes/apache/apacheAccessLogMode.cpp b/src/modes/apache/apacheAccessLogMode.cpp index d5fb605..009271d 100644 --- a/src/modes/apache/apacheAccessLogMode.cpp +++ b/src/modes/apache/apacheAccessLogMode.cpp @@ -1,70 +1,71 @@ /*************************************************************************** * KSystemLog, a system log viewer tool * * Copyright (C) 2007 by Nicolas Ternisien * * nicolas.ternisien@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include "apacheAccessLogMode.h" +#include #include #include #include "logging.h" #include "logMode.h" #include "apacheAccessAnalyzer.h" #include "apacheAccessItemBuilder.h" #include "apacheConfigurationWidget.h" #include "apacheConfiguration.h" ApacheAccessLogMode::ApacheAccessLogMode(QSharedPointer &apacheConfiguration, ApacheConfigurationWidget *apacheConfigurationWidget) : LogMode(QStringLiteral(APACHE_ACCESS_LOG_MODE_ID), i18n("Apache Access Log"), QStringLiteral(APACHE_ACCESS_MODE_ICON)) { d->logModeConfiguration = apacheConfiguration; d->logModeConfigurationWidget = apacheConfigurationWidget; d->itemBuilder = new ApacheAccessItemBuilder(); // Apache Log Action d->action = createDefaultAction(); d->action->setToolTip(i18n("Display the Apache Access log.")); d->action->setWhatsThis(i18n( "Displays the Apache Access log in the current tab. Apache is the main used Web server in the world. " "This log saves all requests performed by the Apache web server.")); checkLogFilesPresence(apacheConfiguration->apacheAccessPaths()); } ApacheAccessLogMode::~ApacheAccessLogMode() { } Analyzer *ApacheAccessLogMode::createAnalyzer(const QVariant &options) { Q_UNUSED(options) return new ApacheAccessAnalyzer(this); } QList ApacheAccessLogMode::createLogFiles() { ApacheConfiguration *apacheConfiguration = logModeConfiguration(); return apacheConfiguration->findNoModeLogFiles(apacheConfiguration->apacheAccessPaths()); } diff --git a/src/modes/apache/apacheLogMode.cpp b/src/modes/apache/apacheLogMode.cpp index d0d68e9..09213ea 100644 --- a/src/modes/apache/apacheLogMode.cpp +++ b/src/modes/apache/apacheLogMode.cpp @@ -1,68 +1,69 @@ /*************************************************************************** * KSystemLog, a system log viewer tool * * Copyright (C) 2007 by Nicolas Ternisien * * nicolas.ternisien@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include "apacheLogMode.h" +#include #include #include #include "logging.h" #include "logMode.h" #include "apacheAnalyzer.h" #include "apacheItemBuilder.h" #include "apacheConfigurationWidget.h" #include "apacheConfiguration.h" ApacheLogMode::ApacheLogMode(QSharedPointer &apacheConfiguration, ApacheConfigurationWidget *apacheConfigurationWidget) : LogMode(QStringLiteral(APACHE_LOG_MODE_ID), i18n("Apache Log"), QStringLiteral(APACHE_MODE_ICON)) { d->logModeConfiguration = apacheConfiguration; d->logModeConfigurationWidget = apacheConfigurationWidget; d->itemBuilder = new ApacheItemBuilder(); // Apache Log Action d->action = createDefaultAction(); d->action->setToolTip(i18n("Display the Apache log.")); d->action->setWhatsThis( i18n("Displays the Apache log in the current tab. Apache is the main used Web server in the world.")); checkLogFilesPresence(apacheConfiguration->apachePaths()); } ApacheLogMode::~ApacheLogMode() { } Analyzer *ApacheLogMode::createAnalyzer(const QVariant &options) { Q_UNUSED(options) return new ApacheAnalyzer(this); } QList ApacheLogMode::createLogFiles() { ApacheConfiguration *apacheConfiguration = logModeConfiguration(); return apacheConfiguration->findNoModeLogFiles(apacheConfiguration->apachePaths()); } diff --git a/src/modes/base/multipleFileList.h b/src/modes/base/multipleFileList.h index 6ace503..f2babd2 100644 --- a/src/modes/base/multipleFileList.h +++ b/src/modes/base/multipleFileList.h @@ -1,94 +1,95 @@ /*************************************************************************** * KSystemLog, a system log viewer tool * * Copyright (C) 2007 by Nicolas Ternisien * * nicolas.ternisien@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #ifndef _MULTIPLE_FILE_LIST_H_ #define _MULTIPLE_FILE_LIST_H_ +#include #include #include #include "fileListHelper.h" #include "ui_multipleFileListBase.h" class MultipleFileList : public QWidget, public Ui::MultipleFileListBase { Q_OBJECT public: MultipleFileList(QWidget *parent, const QString &descriptionText); virtual ~MultipleFileList(); bool isOneOfCategoryEmpty() const; QStringList paths(int categoryIndex); void addPaths(int categoryIndex, const QStringList &paths); int addCategory(const QString &itemName, const QString &buttonName); public slots: void removeAllItems(); signals: void fileListChanged(); private slots: void updateButtons(); void removeSelectedItem(); void moveUpItem(); void moveDownItem(); protected slots: virtual void addItem(int category); void modifyItem(); void modifyItem(QTreeWidgetItem *item); protected: void addItemInternal(QTreeWidgetItem *categoryItem, const QString &path); void moveItem(int direction); void unselectAllItems(); void updateEmptyItems(); void removeEmptyItems(); void addEmptyItem(QTreeWidgetItem *item); bool isEmptyItem(QTreeWidgetItem *item) const; bool isFileListsEmpty() const; int categoryCount(int index) const; QTreeWidgetItem *findCategoryOfChild(QTreeWidgetItem *childItem); FileListHelper fileListHelper; QButtonGroup addButtons; private: KMessageWidget *warningBox; bool missingFiles; }; #endif //_MULTIPLE_FILE_LIST_H_ diff --git a/src/modes/cups/cupsAccessLogMode.cpp b/src/modes/cups/cupsAccessLogMode.cpp index f39b064..c3b8fba 100644 --- a/src/modes/cups/cupsAccessLogMode.cpp +++ b/src/modes/cups/cupsAccessLogMode.cpp @@ -1,71 +1,72 @@ /*************************************************************************** * KSystemLog, a system log viewer tool * * Copyright (C) 2007 by Nicolas Ternisien * * nicolas.ternisien@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include "cupsAccessLogMode.h" +#include #include #include #include "logging.h" #include "logMode.h" #include "cupsAccessAnalyzer.h" #include "cupsAccessItemBuilder.h" #include "cupsConfigurationWidget.h" #include "cupsConfiguration.h" CupsAccessLogMode::CupsAccessLogMode(QSharedPointer &cupsConfiguration, CupsConfigurationWidget *cupsConfigurationWidget) : LogMode(QStringLiteral(CUPS_ACCESS_LOG_MODE_ID), i18n("Cups Web Log"), QStringLiteral(CUPS_ACCESS_MODE_ICON)) { d->logModeConfiguration = cupsConfiguration; d->logModeConfigurationWidget = cupsConfigurationWidget; d->itemBuilder = new CupsAccessItemBuilder(); // Cups Log Action d->action = createDefaultAction(); d->action->setToolTip(i18n("Display the CUPS Web Server Access log.")); d->action->setWhatsThis(i18n( "Displays the CUPS Web Server Access log in the current tab. CUPS is the program which manages " "printing on your computer. This log saves all requests performed to the CUPS embedded web server " "(default: http://localhost:631).")); checkLogFilesPresence(cupsConfiguration->cupsAccessPaths()); } CupsAccessLogMode::~CupsAccessLogMode() { } Analyzer *CupsAccessLogMode::createAnalyzer(const QVariant &options) { Q_UNUSED(options) return new CupsAccessAnalyzer(this); } QList CupsAccessLogMode::createLogFiles() { CupsConfiguration *cupsConfiguration = logModeConfiguration(); return cupsConfiguration->findNoModeLogFiles(cupsConfiguration->cupsAccessPaths()); } diff --git a/src/modes/cups/cupsLogMode.cpp b/src/modes/cups/cupsLogMode.cpp index 921b50a..7d3a93b 100644 --- a/src/modes/cups/cupsLogMode.cpp +++ b/src/modes/cups/cupsLogMode.cpp @@ -1,69 +1,70 @@ /*************************************************************************** * KSystemLog, a system log viewer tool * * Copyright (C) 2007 by Nicolas Ternisien * * nicolas.ternisien@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include "cupsLogMode.h" +#include #include #include #include "logging.h" #include "logMode.h" #include "cupsAnalyzer.h" #include "cupsItemBuilder.h" #include "cupsConfigurationWidget.h" #include "cupsConfiguration.h" CupsLogMode::CupsLogMode(QSharedPointer &cupsConfiguration, CupsConfigurationWidget *cupsConfigurationWidget) : LogMode(QStringLiteral(CUPS_LOG_MODE_ID), i18n("Cups Log"), QStringLiteral(CUPS_MODE_ICON)) { d->logModeConfiguration = cupsConfiguration; d->logModeConfigurationWidget = cupsConfigurationWidget; d->itemBuilder = new CupsItemBuilder(); // Cups Log Action d->action = createDefaultAction(); d->action->setToolTip(i18n("Display the Cups log.")); d->action->setWhatsThis(i18n( "Displays the CUPS log in the current tab. CUPS is the program which manages printing on your " "computer.")); checkLogFilesPresence(cupsConfiguration->cupsPaths()); } CupsLogMode::~CupsLogMode() { } Analyzer *CupsLogMode::createAnalyzer(const QVariant &options) { Q_UNUSED(options) return new CupsAnalyzer(this); } QList CupsLogMode::createLogFiles() { CupsConfiguration *cupsConfiguration = logModeConfiguration(); return cupsConfiguration->findNoModeLogFiles(cupsConfiguration->cupsPaths()); } diff --git a/src/modes/cups/cupsPageLogMode.cpp b/src/modes/cups/cupsPageLogMode.cpp index 0cf50c2..d6e0f46 100644 --- a/src/modes/cups/cupsPageLogMode.cpp +++ b/src/modes/cups/cupsPageLogMode.cpp @@ -1,70 +1,71 @@ /*************************************************************************** * KSystemLog, a system log viewer tool * * Copyright (C) 2007 by Nicolas Ternisien * * nicolas.ternisien@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include "cupsPageLogMode.h" +#include #include #include #include "logging.h" #include "logMode.h" #include "cupsPageAnalyzer.h" #include "cupsPageItemBuilder.h" #include "cupsConfigurationWidget.h" #include "cupsConfiguration.h" CupsPageLogMode::CupsPageLogMode(QSharedPointer &cupsConfiguration, CupsConfigurationWidget *cupsConfigurationWidget) : LogMode(QStringLiteral(CUPS_PAGE_LOG_MODE_ID), i18n("Cups Page Log"), QStringLiteral(CUPS_PAGE_MODE_ICON)) { d->logModeConfiguration = cupsConfiguration; d->logModeConfigurationWidget = cupsConfigurationWidget; d->itemBuilder = new CupsPageItemBuilder(); // Cups Log Action d->action = createDefaultAction(); d->action->setToolTip(i18n("Display the CUPS Page log.")); d->action->setWhatsThis(i18n( "Displays the CUPS Page log in the current tab. CUPS is the program which manages printing on your " "computer. This log saves all requests performed to the CUPS embedded web server (default: " "http://localhost:631).")); checkLogFilesPresence(cupsConfiguration->cupsPagePaths()); } CupsPageLogMode::~CupsPageLogMode() { } Analyzer *CupsPageLogMode::createAnalyzer(const QVariant &options) { Q_UNUSED(options) return new CupsPageAnalyzer(this); } QList CupsPageLogMode::createLogFiles() { CupsConfiguration *cupsConfiguration = logModeConfiguration(); return cupsConfiguration->findNoModeLogFiles(cupsConfiguration->cupsPagePaths()); } diff --git a/src/modes/cups/cupsPdfLogMode.cpp b/src/modes/cups/cupsPdfLogMode.cpp index f9a0726..8857f66 100644 --- a/src/modes/cups/cupsPdfLogMode.cpp +++ b/src/modes/cups/cupsPdfLogMode.cpp @@ -1,70 +1,71 @@ /*************************************************************************** * KSystemLog, a system log viewer tool * * Copyright (C) 2007 by Nicolas Ternisien * * nicolas.ternisien@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include "cupsPdfLogMode.h" +#include #include #include #include "logging.h" #include "logMode.h" #include "cupsPdfAnalyzer.h" #include "cupsPdfItemBuilder.h" #include "cupsConfigurationWidget.h" #include "cupsConfiguration.h" CupsPdfLogMode::CupsPdfLogMode(QSharedPointer &cupsConfiguration, CupsConfigurationWidget *cupsConfigurationWidget) : LogMode(QStringLiteral(CUPS_PDF_LOG_MODE_ID), i18n("Cups PDF Log"), QStringLiteral(CUPS_PDF_MODE_ICON)) { d->logModeConfiguration = cupsConfiguration; d->logModeConfigurationWidget = cupsConfigurationWidget; d->itemBuilder = new CupsPdfItemBuilder(); // Cups Log Action d->action = createDefaultAction(); d->action->setToolTip(i18n("Display the CUPS PDF log.")); d->action->setWhatsThis(i18n( "Displays the CUPS PDF log in the current tab. CUPS is the program which manages printing on your " "computer. This log saves all requests performed to the CUPS embedded web server (default: " "http://localhost:631).")); checkLogFilesPresence(cupsConfiguration->cupsPdfPaths()); } CupsPdfLogMode::~CupsPdfLogMode() { } Analyzer *CupsPdfLogMode::createAnalyzer(const QVariant &options) { Q_UNUSED(options) return new CupsPdfAnalyzer(this); } QList CupsPdfLogMode::createLogFiles() { CupsConfiguration *cupsConfiguration = logModeConfiguration(); return cupsConfiguration->findNoModeLogFiles(cupsConfiguration->cupsPdfPaths()); } diff --git a/src/modes/journald/journaldLogMode.cpp b/src/modes/journald/journaldLogMode.cpp index dfbdead..6a982ba 100644 --- a/src/modes/journald/journaldLogMode.cpp +++ b/src/modes/journald/journaldLogMode.cpp @@ -1,86 +1,88 @@ /*************************************************************************** * KSystemLog, a system log viewer tool * * Copyright (C) 2007 by Nicolas Ternisien * * nicolas.ternisien@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include "journaldLogMode.h" +#include + #include #include "logging.h" #include "logMode.h" #include "journaldLocalAnalyzer.h" #include "journaldNetworkAnalyzer.h" #include "journaldConfigurationWidget.h" #include "journaldConfiguration.h" #include "journaldItemBuilder.h" JournaldLogMode::JournaldLogMode() : LogMode(QLatin1String(JOURNALD_LOG_MODE_ID), i18n("Journald Log"), QLatin1String(JOURNALD_MODE_ICON)) { d->logModeConfiguration = QSharedPointer(new JournaldConfiguration()); d->logModeConfigurationWidget = new JournaldConfigurationWidget(); connect(qobject_cast(d->logModeConfigurationWidget), &JournaldConfigurationWidget::configSaved, this, &JournaldLogMode::menuChanged); d->itemBuilder = new JournaldItemBuilder(); d->action = createDefaultAction(); d->action->setToolTip(i18n("Display the Journald log.")); d->action->setWhatsThis(i18n("Displays the journald log in the current tab.")); } JournaldLogMode::~JournaldLogMode() { } Analyzer *JournaldLogMode::createAnalyzer(const QVariant &analyzerOptions) { JournaldAnalyzerOptions options = analyzerOptions.value(); switch (options.analyzerType) { case JournaldAnalyzerType::Local: return new JournaldLocalAnalyzer(this, options.filter); break; case JournaldAnalyzerType::Network: return new JournaldNetworkAnalyzer(this, options); break; default: break; } return new JournaldLocalAnalyzer(this); } QList JournaldLogMode::createLogFiles() { // No log file for journald. return QList(); } void JournaldLogMode::updateJournalFilters(const JournalAddress &address, const JournalFilters &filters) { m_remoteJournalFilters[address] = filters; } JournalFilters JournaldLogMode::filters(const JournalAddress &address) const { return m_remoteJournalFilters[address]; } diff --git a/src/modes/samba/netbiosLogMode.cpp b/src/modes/samba/netbiosLogMode.cpp index bb86c14..79bc970 100644 --- a/src/modes/samba/netbiosLogMode.cpp +++ b/src/modes/samba/netbiosLogMode.cpp @@ -1,69 +1,70 @@ /*************************************************************************** * KSystemLog, a system log viewer tool * * Copyright (C) 2007 by Nicolas Ternisien * * nicolas.ternisien@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include "netbiosLogMode.h" +#include #include #include #include "logging.h" #include "logMode.h" #include "sambaAnalyzer.h" #include "sambaItemBuilder.h" #include "sambaConfigurationWidget.h" #include "sambaConfiguration.h" NetbiosLogMode::NetbiosLogMode(QSharedPointer &sambaConfiguration, SambaConfigurationWidget *sambaConfigurationWidget, SambaItemBuilder *itemBuilder) : LogMode(QStringLiteral(NETBIOS_LOG_MODE_ID), i18n("Netbios Log"), QStringLiteral(NETBIOS_MODE_ICON)) { d->logModeConfiguration = sambaConfiguration; d->logModeConfigurationWidget = sambaConfigurationWidget; d->itemBuilder = itemBuilder; // Netbios Log Action d->action = createDefaultAction(); d->action->setToolTip(i18n("Display the Netbios log.")); d->action->setWhatsThis( i18n("Displays the Netbios log in the current tab. Netbios is the file sharing protocol developed by " "Microsoft.")); checkLogFilesPresence(sambaConfiguration->netbiosPaths()); } NetbiosLogMode::~NetbiosLogMode() { } Analyzer *NetbiosLogMode::createAnalyzer(const QVariant &options) { Q_UNUSED(options) return new SambaAnalyzer(this); } QList NetbiosLogMode::createLogFiles() { SambaConfiguration *sambaConfiguration = logModeConfiguration(); return sambaConfiguration->findNoModeLogFiles(sambaConfiguration->netbiosPaths()); } diff --git a/src/modes/samba/sambaAccessLogMode.cpp b/src/modes/samba/sambaAccessLogMode.cpp index 5cb7dc9..cdf33cc 100644 --- a/src/modes/samba/sambaAccessLogMode.cpp +++ b/src/modes/samba/sambaAccessLogMode.cpp @@ -1,70 +1,71 @@ /*************************************************************************** * KSystemLog, a system log viewer tool * * Copyright (C) 2007 by Nicolas Ternisien * * nicolas.ternisien@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include "sambaAccessLogMode.h" +#include #include #include #include "logging.h" #include "logMode.h" #include "sambaAnalyzer.h" #include "sambaItemBuilder.h" #include "sambaConfigurationWidget.h" #include "sambaConfiguration.h" SambaAccessLogMode::SambaAccessLogMode(QSharedPointer &sambaConfiguration, SambaConfigurationWidget *sambaConfigurationWidget, SambaItemBuilder *itemBuilder) : LogMode(QStringLiteral(SAMBA_ACCESS_LOG_MODE_ID), i18n("Samba Access Log"), QStringLiteral(SAMBA_ACCESS_MODE_ICON)) { d->logModeConfiguration = sambaConfiguration; d->logModeConfigurationWidget = sambaConfigurationWidget; d->itemBuilder = itemBuilder; // Samba Log Action d->action = createDefaultAction(); d->action->setToolTip(i18n("Display the Samba Access log.")); d->action->setWhatsThis(i18n( "Displays the Samba Access log in the current tab. This log mode allows you to see connections " "between your shares and remote hosts.")); checkLogFilesPresence(sambaConfiguration->sambaAccessPaths()); } SambaAccessLogMode::~SambaAccessLogMode() { } Analyzer *SambaAccessLogMode::createAnalyzer(const QVariant &options) { Q_UNUSED(options) return new SambaAnalyzer(this); } QList SambaAccessLogMode::createLogFiles() { SambaConfiguration *sambaConfiguration = logModeConfiguration(); return sambaConfiguration->findNoModeLogFiles(sambaConfiguration->sambaAccessPaths()); } diff --git a/src/modes/samba/sambaLogMode.cpp b/src/modes/samba/sambaLogMode.cpp index 0218ba1..e8411a4 100644 --- a/src/modes/samba/sambaLogMode.cpp +++ b/src/modes/samba/sambaLogMode.cpp @@ -1,68 +1,69 @@ /*************************************************************************** * KSystemLog, a system log viewer tool * * Copyright (C) 2007 by Nicolas Ternisien * * nicolas.ternisien@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include "sambaLogMode.h" #include +#include #include #include "logging.h" #include "logMode.h" #include "sambaAnalyzer.h" #include "sambaItemBuilder.h" #include "sambaConfigurationWidget.h" #include "sambaConfiguration.h" SambaLogMode::SambaLogMode(QSharedPointer &sambaConfiguration, SambaConfigurationWidget *sambaConfigurationWidget, SambaItemBuilder *itemBuilder) : LogMode(QStringLiteral(SAMBA_LOG_MODE_ID), i18n("Samba Log"), QStringLiteral(SAMBA_MODE_ICON)) { d->logModeConfiguration = sambaConfiguration; d->logModeConfigurationWidget = sambaConfigurationWidget; d->itemBuilder = itemBuilder; // Samba Log Action d->action = createDefaultAction(); d->action->setToolTip(i18n("Display the Samba log.")); d->action->setWhatsThis(i18n( "Displays the Samba log in the current tab. Samba is the file sharing server which interacts with " "Microsoft Windows network.")); checkLogFilesPresence(sambaConfiguration->sambaPaths()); } SambaLogMode::~SambaLogMode() { } Analyzer *SambaLogMode::createAnalyzer(const QVariant &options) { Q_UNUSED(options) return new SambaAnalyzer(this); } QList SambaLogMode::createLogFiles() { SambaConfiguration *sambaConfiguration = logModeConfiguration(); return sambaConfiguration->findNoModeLogFiles(sambaConfiguration->sambaPaths()); }