KVIrc 5.2.0
Developer APIs
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#include <memory>
35
36class LogListViewItem : public QTreeWidgetItem
37{
38public:
39 LogListViewItem(QTreeWidgetItem * pPar, LogFile::Type eType, std::shared_ptr<LogFile> pLog);
40 LogListViewItem(QTreeWidget * pPar, LogFile::Type eType, std::shared_ptr<LogFile> pLog);
42
43public:
45 std::shared_ptr<LogFile> m_pFileData;
46
47public:
48 std::weak_ptr<LogFile> log() { return m_pFileData; };
49 virtual QString fileName() const { return QString(); };
50};
51
53{
54public:
55 LogListViewItemFolder(QTreeWidgetItem * pPar, const QString & szLabel);
57
58public:
59};
60
62{
63public:
64 LogListViewItemType(QTreeWidget * pPar, LogFile::Type eType);
66};
67
69{
70public:
71 LogListViewLog(QTreeWidgetItem * pPar, LogFile::Type eType, std::shared_ptr<LogFile> pLog);
73 virtual QString fileName() const { return m_pFileData->fileName(); };
74
75protected:
76 bool operator<(const QTreeWidgetItem & other) const
77 {
78 return m_pFileData->date() < ((LogListViewLog *)&other)->m_pFileData->date();
79 }
80};
81
82#endif
Contains the KviWindow class.
Type
Holds the type of the log file.
Definition LogFile.h:68
Definition LogViewWidget.h:53
~LogListViewItemFolder()
Definition LogViewWidget.h:56
Definition LogViewWidget.h:62
~LogListViewItemType()
Definition LogViewWidget.h:65
Definition LogViewWidget.h:37
~LogListViewItem()
Definition LogViewWidget.h:41
LogFile::Type m_eType
Definition LogViewWidget.h:44
virtual QString fileName() const
Definition LogViewWidget.h:49
std::shared_ptr< LogFile > m_pFileData
Definition LogViewWidget.h:45
std::weak_ptr< LogFile > log()
Definition LogViewWidget.h:48
Definition LogViewWidget.h:69
virtual QString fileName() const
Definition LogViewWidget.h:73
~LogListViewLog()
Definition LogViewWidget.h:72
bool operator<(const QTreeWidgetItem &other) const
Definition LogViewWidget.h:76