KVIrc 5.2.4
Developer APIs
LogViewWindow.h
Go to the documentation of this file.
1#ifndef _LOGVIEWWINDOW_H_
2#define _LOGVIEWWINDOW_H_
3//=============================================================================
4//
5// File : LogViewWindow.h
6// Creation date : Tue Apr 23 2002 18:05:59 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// Copyright (C) 2011 Elvio Basello (hellvis69 at gmail dot com)
12// Copyright (C) 2014 OmegaPhil (OmegaPhil at startmail dot com)
13//
14// This program is FREE software. You can redistribute it and/or
15// modify it under the terms of the GNU General Public License
16// as published by the Free Software Foundation; either version 2
17// of the License, or (at your option) any later version.
18//
19// This program is distributed in the HOPE that it will be USEFUL,
20// but WITHOUT ANY WARRANTY; without even the implied warranty of
21// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
22// See the GNU General Public License for more details.
23//
24// You should have received a copy of the GNU General Public License
25// along with this program. If not, write to the Free Software Foundation,
26// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27//
28//=============================================================================
29
30#include "LogFile.h"
31
32#include "kvi_settings.h"
33#include "KviWindow.h"
34#include "KviModuleExtension.h"
35#include "KviTalVBox.h"
36#include "KviPointerList.h"
37
38#include <QTreeWidget>
39#include <vector>
40#include <memory>
41
42class KviLogViewWidget;
43class LogListViewItem;
45class QProgressBar;
46#include <QStringList>
47class QLineEdit;
48class QDateEdit;
49class QTabWidget;
50class QCheckBox;
51
52class LogViewListView : public QTreeWidget
53{
54 Q_OBJECT
55public:
56 LogViewListView(QWidget *);
58
59protected:
60 void mousePressEvent(QMouseEvent * pEvent) override;
61signals:
62 void rightButtonPressed(QTreeWidgetItem *, QPoint);
63};
64
66{
67 Q_OBJECT
68public:
71
72protected:
73 std::vector<std::shared_ptr<LogFile>> m_logList;
74 std::vector<std::shared_ptr<LogFile>>::const_iterator m_currentLog;
75
77
78 // Type filter
82 QCheckBox * m_pShowOtherCheck;
84
85 // Content filter
86 QLineEdit * m_pFileNameMask;
87 QLineEdit * m_pContentsMask;
88
89 // Date/time mask
91 QCheckBox * m_pEnableToFilter;
92 QDateEdit * m_pFromDateEdit;
93 QDateEdit * m_pToDateEdit;
94
95 QTabWidget * m_pTabWidget;
98 QWidget * m_pSearchTab;
99 QPushButton * m_pFilterButton;
100 QPushButton * m_pCancelButton;
102 QProgressBar * m_pProgressBar;
106 bool m_bAborted = false;
107 QTimer * m_pTimer;
109
110protected:
111 void exportLog(LogFile::ExportType exportType);
112 void recurseDirectory(const QString & szDir);
113 void setupItemList();
114
115 QPixmap * myIconPtr() override;
116 void resizeEvent(QResizeEvent * pEvent) override;
117 void keyPressEvent(QKeyEvent * pEvent) override;
118 void fillCaptionBuffers() override;
119 virtual void die();
120 QSize sizeHint() const override;
121protected slots:
122 void rightButtonClicked(QTreeWidgetItem *, const QPoint &);
123 void itemSelected(QTreeWidgetItem * pItem, QTreeWidgetItem *);
124 void deleteCurrent();
125 void applyFilter();
126 void abortFilter();
127 void cacheFileList();
128 void filterNext();
129 void exportLog(QAction * pAction);
130};
131
132#endif //_LOGVIEWWINDOW_H_
C++ Template based double linked pointer list class.
Class for vertical box.
Contains the KviWindow class.
Describes a log file.
Toolkit Abstraction Layer: hbox class.
Definition KviTalHBox.h:44
Toolkit Abstraction Layer: vbox class.
Definition KviTalVBox.h:44
Base class for all windows in KVIrc.
Definition KviWindow.h:75
ExportType
Holds the type of the exported log file.
Definition LogFile.h:81
Definition LogViewWidget.h:53
Definition LogViewWidget.h:37
Definition LogViewWindow.h:53
void mousePressEvent(QMouseEvent *pEvent) override
Definition LogViewWindow.cpp:81
~LogViewListView()
Definition LogViewWindow.h:57
void rightButtonPressed(QTreeWidgetItem *, QPoint)
Definition LogViewWindow.h:66
void applyFilter()
Definition LogViewWindow.cpp:299
QWidget * m_pSearchTab
Definition LogViewWindow.h:98
QSize sizeHint() const override
Definition LogViewWindow.cpp:254
QCheckBox * m_pEnableToFilter
Definition LogViewWindow.h:91
QTimer * m_pTimer
Definition LogViewWindow.h:107
QPushButton * m_pCancelButton
Definition LogViewWindow.h:100
void cacheFileList()
Definition LogViewWindow.cpp:414
QTabWidget * m_pTabWidget
Definition LogViewWindow.h:95
void recurseDirectory(const QString &szDir)
Definition LogViewWindow.cpp:260
void abortFilter()
Definition LogViewWindow.cpp:304
void deleteCurrent()
Definition LogViewWindow.cpp:471
LogListViewItem * m_pLastCategory
Definition LogViewWindow.h:103
KviTalVBox * m_pIndexTab
Definition LogViewWindow.h:96
void rightButtonClicked(QTreeWidgetItem *, const QPoint &)
Definition LogViewWindow.cpp:450
LogViewListView * m_pListView
Definition LogViewWindow.h:76
virtual void die()
Definition LogViewWindow.cpp:249
QCheckBox * m_pShowDccChatCheck
Definition LogViewWindow.h:83
QPixmap * myIconPtr() override
Definition LogViewWindow.cpp:234
QProgressBar * m_pProgressBar
Definition LogViewWindow.h:102
QCheckBox * m_pShowChannelsCheck
Definition LogViewWindow.h:79
QCheckBox * m_pEnableFromFilter
Definition LogViewWindow.h:90
QCheckBox * m_pShowOtherCheck
Definition LogViewWindow.h:82
bool m_bAborted
Definition LogViewWindow.h:106
void filterNext()
Definition LogViewWindow.cpp:309
KviTalVBox * m_pLeftLayout
Definition LogViewWindow.h:97
QLineEdit * m_pContentsMask
Definition LogViewWindow.h:87
LogListViewItemFolder * m_pLastGroupItem
Definition LogViewWindow.h:104
~LogViewWindow()
Definition LogViewWindow.cpp:216
void keyPressEvent(QKeyEvent *pEvent) override
Definition LogViewWindow.cpp:221
std::vector< std::shared_ptr< LogFile > > m_logList
Definition LogViewWindow.h:73
QMenu * m_pExportLogPopup
Definition LogViewWindow.h:108
QCheckBox * m_pShowConsolesCheck
Definition LogViewWindow.h:81
QPushButton * m_pFilterButton
Definition LogViewWindow.h:99
void exportLog(LogFile::ExportType exportType)
Definition LogViewWindow.cpp:544
QLineEdit * m_pFileNameMask
Definition LogViewWindow.h:86
KviTalHBox * m_pBottomLayout
Definition LogViewWindow.h:101
void resizeEvent(QResizeEvent *pEvent) override
Definition LogViewWindow.cpp:239
QString m_szLastGroup
Definition LogViewWindow.h:105
void itemSelected(QTreeWidgetItem *pItem, QTreeWidgetItem *)
Definition LogViewWindow.cpp:423
QDateEdit * m_pFromDateEdit
Definition LogViewWindow.h:92
LogViewWindow()
Definition LogViewWindow.cpp:92
QDateEdit * m_pToDateEdit
Definition LogViewWindow.h:93
std::vector< std::shared_ptr< LogFile > >::const_iterator m_currentLog
Definition LogViewWindow.h:74
void setupItemList()
Definition LogViewWindow.cpp:280
QCheckBox * m_pShowQueryesCheck
Definition LogViewWindow.h:80
void fillCaptionBuffers() override
Definition LogViewWindow.cpp:244
This file contains compile time settings.