delay a few things on startup, such as setting the visibility mode, which ensures...
[personal-kdebase.git] / apps / konqueror / src / konqguiclients.h
blob676c1000a355949f1b71c78b272ed2873ebfa046
1 /* This file is part of the KDE project
2 Copyright (C) 1998, 1999 Simon Hausmann <hausmann@kde.org>
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; see the file COPYING. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
20 #ifndef __konq_guiclients_h__
21 #define __konq_guiclients_h__
23 #include <kactioncollection.h>
24 #include <konq_popupmenu.h>
25 #include <QtCore/QObject>
26 #include <QtCore/QHash>
28 #include <kxmlguiclient.h>
29 #include <kservice.h>
31 class QAction;
32 class KonqMainWindow;
33 class KonqView;
35 /**
36 * PopupMenuGUIClient has most of the konqueror logic for KonqPopupMenu.
37 * It holds an actionCollection and takes care of the preview and tabhandling groups for KonqPopupMenu.
39 class PopupMenuGUIClient : public QObject
41 Q_OBJECT
42 public:
43 // The action groups are inserted into @p actionGroups
44 PopupMenuGUIClient( const KService::List &embeddingServices,
45 KParts::BrowserExtension::ActionGroupMap& actionGroups,
46 QAction* showMenuBar, QAction* stopFullScreen );
47 virtual ~PopupMenuGUIClient();
49 KActionCollection* actionCollection() { return &m_actionCollection; }
51 signals:
52 void openEmbedded(KService::Ptr service);
54 private slots:
55 void slotOpenEmbedded();
57 private:
58 QAction* addEmbeddingService( int idx, const QString &name, const KService::Ptr &service );
60 KActionCollection m_actionCollection;
61 KService::List m_embeddingServices;
64 class ToggleViewGUIClient : public QObject
66 Q_OBJECT
67 public:
68 explicit ToggleViewGUIClient( KonqMainWindow *mainWindow );
69 virtual ~ToggleViewGUIClient();
71 bool empty() const { return m_empty; }
73 QList<QAction*> actions() const;
74 QAction *action( const QString &name ) { return m_actions[ name ]; }
76 void saveConfig( bool add, const QString &serviceName );
78 private Q_SLOTS:
79 void slotToggleView( bool toggle );
80 void slotViewAdded( KonqView *view );
81 void slotViewRemoved( KonqView *view );
82 private:
83 KonqMainWindow *m_mainWindow;
84 QHash<QString,QAction*> m_actions;
85 bool m_empty;
86 QMap<QString,bool> m_mapOrientation;
89 #endif