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 ***************************************************************************/
28 #include <kapplication.h>
29 #include <kxmlguiwindow.h>
33 #include <ktoggleaction.h>
42 class TabLogViewsWidget
;
44 namespace KSystemLog
{
46 class MainWindowPrivate
;
49 * This class serves as the main window for ksystemlog. It handles the
50 * menus, toolbars, and status bars.
52 class MainWindow
: public KXmlGuiWindow
{
65 virtual ~MainWindow();
67 TabLogViewsWidget
* tabs();
71 * This function is called when it is time for the app to save its
72 * properties for session management purposes.
74 void saveProperties(KConfigGroup
& configuration
);
77 * This function is called when this app is restored. The KConfig
78 * object points to the session management config file that was saved
79 * with @ref saveProperties
81 void readProperties(const KConfigGroup
& configuration
);
84 void changeStatusBar(const QString
& text
);
85 void changeWindowTitle(const QString
& text
);
87 void updateStatusBar();
89 void prepareCreatedLogManager(LogManager
* logManager
);
94 void showConfigurationDialog();
95 void showDetailsDialog();
96 void showLogMessageDialog();
98 //Transmits signals to active LogManager
103 void updateSelection();
104 void updateReloading();
106 void toggleFilterBar();
108 void toggleItemTooltip(bool enabled
);
109 void toggleNewLinesDisplaying(bool displayed
);
110 void toggleResumePauseParsing(bool paused
);
112 void changeCurrentTab();
114 void changeResumePauseAction(bool paused
);
115 void selectLogModeAction(QAction
* action
);
119 * Last method called before application exitting (Overridden method)
125 void loadLogModePlugins();
127 void setupStatusBar();
129 void setupTabLogViews();
132 void setupLogActions();
134 void updateDetailDialog();
136 MainWindowPrivate
* const d
;
142 #endif //MAIN_WINDOW_H