KVIrc  4.9.2
DeveloperAPIs
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 
40 class KviLogViewWidget;
41 class LogListViewItem;
43 class QProgressBar;
44 class QStringList;
45 class QLineEdit;
46 class QDateEdit;
47 class QTabWidget;
48 class QCheckBox;
49 
50 class LogViewListView : public QTreeWidget
51 {
52  Q_OBJECT
53 public:
54  LogViewListView(QWidget *);
56 
57 protected:
58  void mousePressEvent(QMouseEvent * pEvent);
59 signals:
60  void rightButtonPressed(QTreeWidgetItem *, QPoint);
61 };
62 
63 class LogViewWindow : public KviWindow
64 {
65  Q_OBJECT
66 public:
67  LogViewWindow();
69 
70 protected:
72 
74 
75  // Type filter
76  QCheckBox * m_pShowChannelsCheck;
77  QCheckBox * m_pShowQueryesCheck;
78  QCheckBox * m_pShowConsolesCheck;
79  QCheckBox * m_pShowOtherCheck;
80  QCheckBox * m_pShowDccChatCheck;
81 
82  // Content filter
83  QLineEdit * m_pFileNameMask;
84  QLineEdit * m_pContentsMask;
85 
86  // Date/time mask
87  QCheckBox * m_pEnableFromFilter;
88  QCheckBox * m_pEnableToFilter;
89  QDateEdit * m_pFromDateEdit;
90  QDateEdit * m_pToDateEdit;
91 
92  QStringList * m_pFileNames;
93  QTabWidget * m_pTabWidget;
96  QWidget * m_pSearchTab;
97  QPushButton * m_pFilterButton;
98  QPushButton * m_pCancelButton;
100  QProgressBar * m_pProgressBar;
103  QString m_szLastGroup;
105  QTimer * m_pTimer;
107 
108 public:
116  void createLog(LogFile * pLog, int iId, QString * pszFile = 0);
117 
118 protected:
119  void exportLog(int iId);
120  void recurseDirectory(const QString & szDir);
121  void setupItemList();
122 
123  virtual QPixmap * myIconPtr();
124  virtual void resizeEvent(QResizeEvent * pEvent);
125  virtual void keyPressEvent(QKeyEvent * pEvent);
126  virtual void fillCaptionBuffers();
127  virtual void die();
128  virtual QSize sizeHint() const;
129 protected slots:
130  void rightButtonClicked(QTreeWidgetItem *, const QPoint &);
131  void itemSelected(QTreeWidgetItem * pItem, QTreeWidgetItem *);
132  void deleteCurrent();
133  void applyFilter();
134  void abortFilter();
135  void cacheFileList();
136  void filterNext();
137  void exportLog(QAction * pAction);
138 };
139 
140 #endif //_LOGVIEWWINDOW_H_
Toolkit Abstraction Layer: hbox class.
Definition: KviTalHBox.h:44
LogViewWindow()
Definition: LogViewWindow.cpp:88
virtual QPixmap * myIconPtr()
Definition: LogViewWindow.cpp:230
Class for vertical box.
KviTalHBox * m_pBottomLayout
Definition: LogViewWindow.h:99
void createLog(LogFile *pLog, int iId, QString *pszFile=0)
Exports the log and creates the file in the selected format.
Definition: LogViewWindow.cpp:586
KviTalVBox * m_pIndexTab
Definition: LogViewWindow.h:94
void exportLog(int iId)
Definition: LogViewWindow.cpp:538
QCheckBox * m_pShowQueryesCheck
Definition: LogViewWindow.h:77
QPushButton * m_pCancelButton
Definition: LogViewWindow.h:98
virtual QSize sizeHint() const
Definition: LogViewWindow.cpp:250
bool m_bAborted
Definition: LogViewWindow.h:104
virtual void die()
Definition: LogViewWindow.cpp:245
QLineEdit * m_pFileNameMask
Definition: LogViewWindow.h:83
Definition: LogViewWindow.h:63
~LogViewWindow()
Definition: LogViewWindow.cpp:212
LogViewListView * m_pListView
Definition: LogViewWindow.h:73
QTabWidget * m_pTabWidget
Definition: LogViewWindow.h:93
virtual void resizeEvent(QResizeEvent *pEvent)
Definition: LogViewWindow.cpp:235
The LogFile class which handle any log file.
Definition: LogFile.h:61
QProgressBar * m_pProgressBar
Definition: LogViewWindow.h:100
void rightButtonClicked(QTreeWidgetItem *, const QPoint &)
Definition: LogViewWindow.cpp:442
void itemSelected(QTreeWidgetItem *pItem, QTreeWidgetItem *)
Definition: LogViewWindow.cpp:415
QTimer * m_pTimer
Definition: LogViewWindow.h:105
QCheckBox * m_pShowDccChatCheck
Definition: LogViewWindow.h:80
virtual void keyPressEvent(QKeyEvent *pEvent)
Definition: LogViewWindow.cpp:217
QDateEdit * m_pToDateEdit
Definition: LogViewWindow.h:90
void recurseDirectory(const QString &szDir)
Definition: LogViewWindow.cpp:256
void applyFilter()
Definition: LogViewWindow.cpp:295
Describes a log file.
void abortFilter()
Definition: LogViewWindow.cpp:300
QCheckBox * m_pEnableToFilter
Definition: LogViewWindow.h:88
QString m_szLastGroup
Definition: LogViewWindow.h:103
QPushButton * m_pFilterButton
Definition: LogViewWindow.h:97
KviTalVBox * m_pLeftLayout
Definition: LogViewWindow.h:95
QDateEdit * m_pFromDateEdit
Definition: LogViewWindow.h:89
C++ Template based double linked pointer list class.
Base class for all windows in KVIrc.
Definition: KviWindow.h:74
Toolkit Abstraction Layer: vbox class.
Definition: KviTalVBox.h:44
virtual void fillCaptionBuffers()
Definition: LogViewWindow.cpp:240
QCheckBox * m_pShowChannelsCheck
Definition: LogViewWindow.h:76
QStringList * m_pFileNames
Definition: LogViewWindow.h:92
QCheckBox * m_pShowConsolesCheck
Definition: LogViewWindow.h:78
QCheckBox * m_pEnableFromFilter
Definition: LogViewWindow.h:87
void deleteCurrent()
Definition: LogViewWindow.cpp:463
void cacheFileList()
Definition: LogViewWindow.cpp:406
QCheckBox * m_pShowOtherCheck
Definition: LogViewWindow.h:79
Contains the KviWindow class.
QWidget * m_pSearchTab
Definition: LogViewWindow.h:96
Definition: LogViewWindow.h:50
LogListViewItem * m_pLastCategory
Definition: LogViewWindow.h:101
LogListViewItemFolder * m_pLastGroupItem
Definition: LogViewWindow.h:102
QMenu * m_pExportLogPopup
Definition: LogViewWindow.h:106
Definition: LogViewWidget.h:34
This file contains compile time settings.
void rightButtonPressed(QTreeWidgetItem *, QPoint)
void mousePressEvent(QMouseEvent *pEvent)
Definition: LogViewWindow.cpp:77
LogViewListView(QWidget *)
Definition: LogViewWindow.cpp:65
QLineEdit * m_pContentsMask
Definition: LogViewWindow.h:84
void setupItemList()
Definition: LogViewWindow.cpp:276
~LogViewListView()
Definition: LogViewWindow.h:55
void filterNext()
Definition: LogViewWindow.cpp:305
KviPointerList< LogFile > m_logList
Definition: LogViewWindow.h:71
Definition: LogViewWidget.h:50