KVIrc  4.9.2
DeveloperAPIs
LogViewWidget.h
Go to the documentation of this file.
1 #ifndef _LOGVIEWWIDGET_H_
2 #define _LOGVIEWWIDGET_H_
3 //=============================================================================
4 //
5 // File : LogViewWidget.h
6 // Creation date : Thue Apr 23 2002 03:01:53 CET by Juanjo Alvarez
7 //
8 // This file is part of the KVIrc IRC client distribution
9 // Copyright (C) 2002 Juanjo Alvarez
10 // Copyright (C) 2002-2010 Szymon Stefanek (pragma at kvirc dot net)
11 //
12 // This program is FREE software. You can redistribute it and/or
13 // modify it under the terms of the GNU General Public License
14 // as published by the Free Software Foundation; either version 2
15 // of the License, or (at your option) any later version.
16 //
17 // This program is distributed in the HOPE that it will be USEFUL,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 // See the GNU General Public License for more details.
21 //
22 // You should have received a copy of the GNU General Public License
23 // along with this program. If not, write to the Free Software Foundation,
24 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25 //
26 //=============================================================================
27 
28 #include "LogViewWindow.h"
29 
30 #include "KviWindow.h"
31 
32 #include <QTreeWidget>
33 
34 class LogListViewItem : public QTreeWidgetItem
35 {
36 public:
37  LogListViewItem(QTreeWidgetItem * pPar, LogFile::Type eType, LogFile * pLog);
38  LogListViewItem(QTreeWidget * pPar, LogFile::Type eType, LogFile * pLog);
40 
41 public:
44 
45 public:
46  LogFile * log() { return m_pFileData; };
47  virtual QString fileName() const { return QString(); };
48 };
49 
51 {
52 public:
53  LogListViewItemFolder(QTreeWidgetItem * pPar, const QString & szLabel);
55 
56 public:
57 };
58 
60 {
61 public:
62  LogListViewItemType(QTreeWidget * pPar, LogFile::Type eType);
64 };
65 
67 {
68 public:
69  LogListViewLog(QTreeWidgetItem * pPar, LogFile::Type eType, LogFile * pLog);
71  virtual QString fileName() const { return m_pFileData->fileName(); };
72 protected:
73  bool operator<(const QTreeWidgetItem & other) const
74  {
75  return m_pFileData->date() < ((LogListViewLog *)&other)->m_pFileData->date();
76  }
77 };
78 
79 #endif
const QDate & date() const
Returns the date of the log.
Definition: LogFile.h:140
~LogListViewItemType()
Definition: LogViewWidget.h:63
Type
Holds the type of the log file.
Definition: LogFile.h:68
LogListViewItemType(QTreeWidget *pPar, LogFile::Type eType)
Definition: LogViewWidget.cpp:59
LogFile * m_pFileData
Definition: LogViewWidget.h:43
virtual QString fileName() const
Definition: LogViewWidget.h:71
virtual QString fileName() const
Definition: LogViewWidget.h:47
The LogFile class which handle any log file.
Definition: LogFile.h:61
bool operator<(const QTreeWidgetItem &other) const
Definition: LogViewWidget.h:73
~LogListViewItem()
Definition: LogViewWidget.h:39
LogListViewItem(QTreeWidgetItem *pPar, LogFile::Type eType, LogFile *pLog)
Definition: LogViewWidget.cpp:41
Definition: LogViewWidget.h:59
~LogListViewLog()
Definition: LogViewWidget.h:70
LogFile::Type m_eType
Definition: LogViewWidget.h:39
~LogListViewItemFolder()
Definition: LogViewWidget.h:54
LogFile * log()
Definition: LogViewWidget.h:46
Contains the KviWindow class.
LogListViewLog(QTreeWidgetItem *pPar, LogFile::Type eType, LogFile *pLog)
Definition: LogViewWidget.cpp:92
Definition: LogViewWidget.h:34
const QString & fileName() const
Returns the filename of the log.
Definition: LogFile.h:122
Definition: LogViewWidget.h:66
Definition: LogViewWidget.h:50
LogListViewItemFolder(QTreeWidgetItem *pPar, const QString &szLabel)
Definition: LogViewWidget.cpp:53