diff options
Diffstat (limited to 'src/modules/logview/LogViewWindow.h')
| -rw-r--r-- | src/modules/logview/LogViewWindow.h | 150 |
1 files changed, 95 insertions, 55 deletions
diff --git a/src/modules/logview/LogViewWindow.h b/src/modules/logview/LogViewWindow.h index 2cd9b61ad..2cea68d2c 100644 --- a/src/modules/logview/LogViewWindow.h +++ b/src/modules/logview/LogViewWindow.h @@ -1,5 +1,5 @@ -#ifndef _LOGVIEWMDIWINDOW_H_ -#define _LOGVIEWMDIWINDOW_H_ +#ifndef _LOGVIEWWINDOW_H_ +#define _LOGVIEWWINDOW_H_ //============================================================================= // // File : LogViewWindow.h @@ -8,6 +8,7 @@ // This file is part of the KVIrc irc client distribution // Copyright (C) 2002 Juanjo Alvarez // Copyright (C) 2002-2010 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2011 Elvio Basello (hellvis69 at gmail dot com) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -29,50 +30,90 @@ #include "KviWindow.h" #include "KviModuleExtension.h" #include "KviTalVBox.h" -#include <QTreeWidget> #include "KviPointerList.h" +#include <QTreeWidget> #include <QTabWidget> #include <QDateTime> #include <QCheckBox> +class KviLogViewWidget; +class LogListViewItem; +class LogListViewItemFolder; class QProgressBar; class QStringList; class QLineEdit; class QDateEdit; -class KviLogViewWidget; -class LogListViewItem; -class LogListViewItemFolder; - -class LogFile { +/** +* \class LogFile +* \brief The LogFile class which handle any log file +*/ +class LogFile +{ public: - - enum KviLogTypes { - Channel, - Console, - Query, - DccChat, - Other + /** + * \enum Type + * \brief Holds the type of the log + */ + enum Type { + Channel, /**< the log file of a channel */ + Console, /**< the log file of a console */ + Query, /**< the log file of a query */ + DccChat, /**< the log file of a dcc chat */ + Other /**< any other log file */ }; - LogFile(const QString& name); + /** + * \brief Constructs the log file object + * \param szName The name of the log + * \return LogFile + */ + LogFile(const QString & szName); +private: + Type m_type; + QString m_szFilename; + bool m_bCompressed; + QString m_szName; + QString m_szNetwork; + QDate m_date; +public: + /** + * \brief Returns the type of the log + * \return Type + */ + Type type() const { return m_type; }; + /** + * \brief Returns the filename of the log + * \return const QString & + */ const QString & fileName() const { return m_szFilename; }; + + /** + * \brief Returns the name of the log + * \return const QString & + */ const QString & name() const { return m_szName; }; + + /** + * \brief Returns the network of the log + * \return const QString & + */ const QString & network() const { return m_szNetwork; }; - const QDate & date() const { return m_date; }; - void getText(QString & text,const QString& logDir); + /** + * \brief Returns the date of the log + * \return const QDate & + */ + const QDate & date() const { return m_date; }; - KviLogTypes type() const { return m_type; }; -private: - KviLogTypes m_type; - QString m_szFilename; - bool m_bCompressed; - QString m_szName; - QString m_szNetwork; - QDate m_date; + /** + * \brief Returns the text of the log file + * \param szText The buffer where to save the contents of the log + * \return void + */ + void getText(QString & szText); }; class LogViewListView : public QTreeWidget @@ -89,47 +130,46 @@ signals: class LogViewWindow : public KviWindow, public KviModuleExtension { - Q_OBJECT + Q_OBJECT public: LogViewWindow(KviModuleExtensionDescriptor * d,KviMainWindow * lpFrm); ~LogViewWindow(); protected: KviPointerList<LogFile> m_logList; - LogViewListView * m_pListView; + LogViewListView * m_pListView; // Type filter - QCheckBox * m_pShowChannelsCheck; - QCheckBox * m_pShowQueryesCheck; - QCheckBox * m_pShowConsolesCheck; - QCheckBox * m_pShowOtherCheck; - QCheckBox * m_pShowDccChatCheck; + QCheckBox * m_pShowChannelsCheck; + QCheckBox * m_pShowQueryesCheck; + QCheckBox * m_pShowConsolesCheck; + QCheckBox * m_pShowOtherCheck; + QCheckBox * m_pShowDccChatCheck; // Content filter - QLineEdit * m_pFileNameMask; - QLineEdit * m_pContentsMask; + QLineEdit * m_pFileNameMask; + QLineEdit * m_pContentsMask; // Date/time mask - QCheckBox * m_pEnableFromFilter; - QCheckBox * m_pEnableToFilter; - QDateEdit * m_pFromDateEdit; - QDateEdit * m_pToDateEdit; + QCheckBox * m_pEnableFromFilter; + QCheckBox * m_pEnableToFilter; + QDateEdit * m_pFromDateEdit; + QDateEdit * m_pToDateEdit; - QStringList * m_pFileNames; - QString m_szLogDirectory; - QTabWidget * m_pTabWidget; - KviTalVBox * m_pIndexTab; - KviTalVBox * m_pLeftLayout; - QWidget * m_pSearchTab; - QPushButton * m_pFilterButton; - QPushButton * m_pCancelButton; - KviTalHBox * m_pBottomLayout; - QProgressBar * m_pProgressBar; - LogListViewItem * m_pLastCategory; - LogListViewItemFolder *m_pLastGroupItem; - QString m_szLastGroup; - bool m_bAborted; - QTimer * m_pTimer; + QStringList * m_pFileNames; + QTabWidget * m_pTabWidget; + KviTalVBox * m_pIndexTab; + KviTalVBox * m_pLeftLayout; + QWidget * m_pSearchTab; + QPushButton * m_pFilterButton; + QPushButton * m_pCancelButton; + KviTalHBox * m_pBottomLayout; + QProgressBar * m_pProgressBar; + LogListViewItem * m_pLastCategory; + LogListViewItemFolder * m_pLastGroupItem; + QString m_szLastGroup; + bool m_bAborted; + QTimer * m_pTimer; protected: void recurseDirectory(const QString& sDir); @@ -150,4 +190,4 @@ protected slots: void filterNext(); }; -#endif //_LOGVIEWMDIWINDOW_H_ +#endif //_LOGVIEWWINDOW_H_ |
