Konsole
Application.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef APPLICATION_H
00021 #define APPLICATION_H
00022
00023
00024 #include <KUniqueApplication>
00025
00026
00027 #include "Profile.h"
00028
00029 class KCmdLineArgs;
00030
00031 namespace Konsole
00032 {
00033 class ProfileList;
00034 class ViewManager;
00035 class MainWindow;
00036 class Session;
00037
00049 class Application : public KUniqueApplication
00050 {
00051 Q_OBJECT
00052
00053 public:
00055 #ifdef Q_WS_X11
00056 Application(Display* display , Qt::HANDLE visual, Qt::HANDLE colormap);
00057 #endif
00058
00060 Application();
00061
00062 virtual ~Application();
00063
00065 virtual int newInstance();
00066
00072 MainWindow* newMainWindow();
00073
00075 static Application* self();
00076
00077 private slots:
00078 Session* createSession(Profile::Ptr profile, const QString& directory , ViewManager* view);
00079 void createWindow(Profile::Ptr profile , const QString& directory);
00080 void detachView(Session* session);
00081
00082 void toggleBackgroundInstance();
00083
00084 private:
00085 void init();
00086 void listAvailableProfiles();
00087 void startBackgroundMode(MainWindow* window);
00088 bool processHelpArgs(KCmdLineArgs* args);
00089 MainWindow* processWindowArgs(KCmdLineArgs* args);
00090 void processProfileSelectArgs(KCmdLineArgs* args,MainWindow* window);
00091 void processProfileChangeArgs(KCmdLineArgs* args,MainWindow* window);
00092
00093 KCmdLineArgs* _arguments;
00094 ProfileList* _sessionList;
00095
00096 MainWindow* _backgroundInstance;
00097 };
00098
00099 }
00100 #endif //APPLICATION_H