1 /***************************************************************************
2 * KSystemLog, a system log viewer tool *
3 * Copyright (C) 2007 by Nicolas Ternisien *
4 * nicolas.ternisien@gmail.com *
6 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation; either version 2 of the License, or *
9 * (at your option) any later version. *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program; if not, write to the *
18 * Free Software Foundation, Inc., *
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
20 ***************************************************************************/
22 #ifndef _TAB_LOG_VIEWS_WIDGET_H_
23 #define _TAB_LOG_VIEWS_WIDGET_H_
25 #include <ktabwidget.h>
36 class TabLogViewsWidgetPrivate
;
38 class TabLogViewsWidget
: public KTabWidget
{
43 TabLogViewsWidget(QWidget
* parent
= NULL
);
45 virtual ~TabLogViewsWidget();
47 QList
<LogManager
*> logManagers();
49 LogManager
* activeLogManager();
51 void load(LogMode
* logMode
, LogManager
* manager
);
55 LogManager
* createTab();
56 LogManager
* duplicateTab();
67 * Display a reload icon on the specified view tab
69 void changeReloadingTab(View
* view
, bool reloading
);
71 //Methods that transmit a signal to the current logViewWidget
72 void expandAllCurrentView();
73 void collapseAllCurrentView();
74 void selectAllCurrentView();
76 void fileSaveCurrentView();
77 void copyToClipboardCurrentView();
78 void sendMailCurrentView();
79 void printSelectionCurrentView();
82 void changeTab(View
* view
, const QIcon
& icon
, const QString
& label
);
84 void changeCurrentTab();
85 void changeTitleAddedLines(View
*, int);
87 void showContextMenu(const QPoint
& cursorPosition
);
88 void showContextMenu(QWidget
* tab
, const QPoint
& cursorPosition
);
91 void tabCreationRequested();
92 void tabClosingRequested();
94 void logManagerCreated(LogManager
* manager
);
96 void statusBarChanged(const QString
& message
);
99 TabLogManager
* newTabLogManager();
101 void newTab(View
* view
);
103 LogManager
* findRelatedLogManager(View
* view
);
105 QIcon
logModeIcon(LogMode
* icon
);
107 TabLogManager
* activeTabLogManager();
108 TabLogManager
* findRelatedTabLogManager(View
* view
);
110 void prepareContextMenu(bool onTab
);
112 TabLogViewsWidgetPrivate
* const d
;
116 #endif // _TAB_LOG_VIEWS_WIDGET_H_