Changeset View
Changeset View
Standalone View
Standalone View
src/Part.h
Show All 23 Lines | |||||
24 | #include <KParts/Part> | 24 | #include <KParts/Part> | ||
25 | #include <KParts/ReadOnlyPart> | 25 | #include <KParts/ReadOnlyPart> | ||
26 | #include <kde_terminal_interface.h> | 26 | #include <kde_terminal_interface.h> | ||
27 | 27 | | |||
28 | // Qt | 28 | // Qt | ||
29 | #include <QVariantList> | 29 | #include <QVariantList> | ||
30 | 30 | | |||
31 | // Konsole | 31 | // Konsole | ||
32 | #include "config-konsole.h" | ||||
32 | #include "Profile.h" | 33 | #include "Profile.h" | ||
33 | 34 | | |||
34 | class QAction; | 35 | class QAction; | ||
35 | class QStringList; | 36 | class QStringList; | ||
36 | class QKeyEvent; | 37 | class QKeyEvent; | ||
37 | 38 | | |||
38 | namespace Konsole { | 39 | namespace Konsole { | ||
39 | class Session; | 40 | class Session; | ||
40 | class SessionController; | 41 | class SessionController; | ||
41 | class ViewManager; | 42 | class ViewManager; | ||
42 | class ViewProperties; | 43 | class ViewProperties; | ||
43 | 44 | | |||
44 | /** | 45 | /** | ||
45 | * A re-usable terminal emulator component using the KParts framework which can | 46 | * A re-usable terminal emulator component using the KParts framework which can | ||
46 | * be used to embed terminal emulators into other applications. | 47 | * be used to embed terminal emulators into other applications. | ||
47 | */ | 48 | */ | ||
49 | #ifdef USE_TERMINALINTERFACEV2 | ||||
50 | class Part : public KParts::ReadOnlyPart, public TerminalInterfaceV2 | ||||
51 | { | ||||
52 | Q_OBJECT | ||||
53 | Q_INTERFACES(TerminalInterfaceV2) | ||||
54 | #else | ||||
48 | class Part : public KParts::ReadOnlyPart, public TerminalInterface | 55 | class Part : public KParts::ReadOnlyPart, public TerminalInterface | ||
49 | { | 56 | { | ||
50 | Q_OBJECT | 57 | Q_OBJECT | ||
51 | Q_INTERFACES(TerminalInterface) | 58 | Q_INTERFACES(TerminalInterface) | ||
59 | #endif | ||||
52 | public: | 60 | public: | ||
53 | /** Constructs a new Konsole part with the specified parent. */ | 61 | /** Constructs a new Konsole part with the specified parent. */ | ||
54 | explicit Part(QWidget *parentWidget, QObject *parent, const QVariantList &); | 62 | explicit Part(QWidget *parentWidget, QObject *parent, const QVariantList &); | ||
55 | ~Part() Q_DECL_OVERRIDE; | 63 | ~Part() Q_DECL_OVERRIDE; | ||
56 | 64 | | |||
57 | /** Reimplemented from TerminalInterface. */ | 65 | /** Reimplemented from TerminalInterface. */ | ||
58 | void startProgram(const QString &program, const QStringList &arguments) Q_DECL_OVERRIDE; | 66 | void startProgram(const QString &program, const QStringList &arguments) override; | ||
59 | /** Reimplemented from TerminalInterface. */ | 67 | /** Reimplemented from TerminalInterface. */ | ||
60 | void showShellInDir(const QString &dir) Q_DECL_OVERRIDE; | 68 | void showShellInDir(const QString &dir) override; | ||
61 | /** Reimplemented from TerminalInterface. */ | 69 | /** Reimplemented from TerminalInterface. */ | ||
62 | void sendInput(const QString &text) Q_DECL_OVERRIDE; | 70 | void sendInput(const QString &text) override; | ||
63 | 71 | | |||
64 | /** Reimplemented from TerminalInterface. */ | 72 | /** Reimplemented from TerminalInterface. */ | ||
65 | int terminalProcessId() Q_DECL_OVERRIDE; | 73 | int terminalProcessId() override; | ||
66 | 74 | | |||
67 | /** Reimplemented from TerminalInterface. */ | 75 | /** Reimplemented from TerminalInterface. */ | ||
68 | int foregroundProcessId() Q_DECL_OVERRIDE; | 76 | int foregroundProcessId() override; | ||
69 | 77 | | |||
70 | /** Reimplemented from TerminalInterface. */ | 78 | /** Reimplemented from TerminalInterface. */ | ||
71 | QString foregroundProcessName() Q_DECL_OVERRIDE; | 79 | QString foregroundProcessName() override; | ||
72 | 80 | | |||
73 | /** Reimplemented from TerminalInterface. */ | 81 | /** Reimplemented from TerminalInterface. */ | ||
74 | QString currentWorkingDirectory() const Q_DECL_OVERRIDE; | 82 | QString currentWorkingDirectory() const override; | ||
83 | | ||||
84 | #ifdef USE_TERMINALINTERFACEV2 | ||||
85 | /** Reimplemented from TerminalInterfaceV2 */ | ||||
86 | QStringList availableProfiles() const override; | ||||
87 | | ||||
88 | /** Reimplemented from TerminalInterfaceV2 */ | ||||
89 | QString currentProfileName() const override; | ||||
90 | | ||||
91 | /** Reimplemented from TerminalInterfaceV2 */ | ||||
92 | bool setCurrentProfile(const QString &profileName) override; | ||||
93 | | ||||
94 | /** Reimplemented from TerminalInterfaceV2 */ | ||||
95 | QVariant profileProperty(const QString &profileProperty) const override; | ||||
96 | #endif | ||||
75 | 97 | | |||
76 | public Q_SLOTS: | 98 | public Q_SLOTS: | ||
77 | /** | 99 | /** | ||
78 | * creates and run a session using the specified profile and directory | 100 | * creates and run a session using the specified profile and directory | ||
79 | * | 101 | * | ||
80 | * @param profileName Specifies the name of the profile to create session | 102 | * @param profileName Specifies the name of the profile to create session | ||
81 | * @param directory specifies The initial working directory of the created session | 103 | * @param directory specifies The initial working directory of the created session | ||
82 | * | 104 | * | ||
▲ Show 20 Lines • Show All 119 Lines • Show Last 20 Lines |