├── .clang-format ├── .gitignore ├── CMakeLists.txt ├── COPYING ├── COPYING.LIB ├── LGPL_EXCEPTION.TXT ├── LICENSE.LGPL ├── README.md ├── data ├── color-schemes │ ├── BlackOnLightYellow.colorscheme │ ├── BlackOnLightYellow.schema │ ├── BlackOnRandomLight.colorscheme │ ├── BlackOnWhite.colorscheme │ ├── BlackOnWhite.schema │ ├── BlueOnBlack.colorscheme │ ├── Breeze.colorscheme │ ├── BreezeModified.colorscheme │ ├── DarkPastels.colorscheme │ ├── GreenOnBlack.colorscheme │ ├── Linux.colorscheme │ ├── RedOnBlack.colorscheme │ ├── Solarized.colorscheme │ ├── SolarizedLight.colorscheme │ ├── Tango.colorscheme │ ├── Ubuntu.colorscheme │ ├── WhiteOnBlack.colorscheme │ ├── WhiteOnBlack.schema │ └── historic │ │ ├── BlackOnLightColor.schema │ │ ├── BlackOnLightYellow.schema │ │ ├── BlackOnWhite.schema │ │ ├── DarkPicture.schema │ │ ├── Example.Schema │ │ ├── GreenOnBlack.schema │ │ ├── GreenTint.schema │ │ ├── GreenTint_MC.schema │ │ ├── LightPicture.schema │ │ ├── Linux.schema │ │ ├── README.Schema │ │ ├── README.default.Schema │ │ ├── Transparent.schema │ │ ├── Transparent_MC.schema │ │ ├── Transparent_darkbg.schema │ │ ├── Transparent_lightbg.schema │ │ ├── WhiteOnBlack.schema │ │ ├── XTerm.schema │ │ ├── syscolor.schema │ │ └── vim.schema └── kb-layouts │ ├── CMakeLists.txt │ ├── README │ ├── README-KeyTab │ ├── README-KeyTab-original │ ├── default.keytab │ ├── historic │ ├── vt100.keytab │ └── x11r5.keytab │ ├── linux.keytab │ ├── macbook.keytab │ ├── solaris.keytab │ └── vt420pc.keytab └── src ├── Character.h ├── CharacterColor.h ├── CharacterWidth.cpp ├── CharacterWidth.h ├── CharacterWidth.src.cpp ├── ColorScheme.cpp ├── ColorScheme.h ├── ColorSchemeManager.cpp ├── ColorSchemeManager.h ├── ColorTables.h ├── Emulation.cpp ├── Emulation.h ├── Enumeration.h ├── ExtendedCharTable.cpp ├── ExtendedCharTable.h ├── ExtendedDefaultTranslator.h ├── Filter.cpp ├── Filter.h ├── History.cpp ├── History.h ├── HistorySearch.cpp ├── HistorySearch.h ├── IncrementalSearchBar.cpp ├── IncrementalSearchBar.h ├── KeyboardTranslator.cpp ├── KeyboardTranslator.h ├── KeyboardTranslatorManager.cpp ├── KeyboardTranslatorManager.h ├── KonsoleSettings.cpp ├── KonsoleSettings.h ├── LGPL_EXCEPTION.TXT ├── LICENSE.LGPL ├── LineBlockCharacters.cpp ├── LineBlockCharacters.h ├── LineFont.h ├── LineFont.src ├── LinkManager.cpp ├── LinkManager.h ├── LinkParser.cpp ├── LinkParser.h ├── ProcessInfo.cpp ├── ProcessInfo.h ├── Profile.cpp ├── Profile.h ├── ProfileManager.cpp ├── ProfileManager.h ├── ProfileReader.cpp ├── ProfileReader.h ├── ProfileWriter.cpp ├── ProfileWriter.h ├── Pty.cpp ├── Pty.h ├── PtyConfig.h ├── QContainerAdapters.h ├── Screen.cpp ├── Screen.h ├── ScreenWindow.cpp ├── ScreenWindow.h ├── ScrollState.cpp ├── ScrollState.h ├── Session.cpp ├── Session.h ├── SessionManager.cpp ├── SessionManager.h ├── ShellCommand.cpp ├── ShellCommand.h ├── TerminalCharacterDecoder.cpp ├── TerminalCharacterDecoder.h ├── TerminalConfig.h ├── TerminalDebug.cpp ├── TerminalDebug.h ├── TerminalDisplay.cpp ├── TerminalDisplay.h ├── TerminalDisplayAccessible.cpp ├── TerminalDisplayAccessible.h ├── TerminalOutputPane.cpp ├── TerminalOutputPane.h ├── TerminalPlugin.cpp ├── TerminalPlugin.h ├── TerminalPlugin.json.in ├── TerminalWindow.cpp ├── TerminalWindow.h ├── Vt102Emulation.cpp ├── Vt102Emulation.h ├── config ├── GenericPathProvider.cpp ├── GenericPathProvider.h ├── PathProvider.cpp ├── PathProvider.h ├── StandardPathProvider.cpp ├── StandardPathProvider.h ├── bufferfragment_p.h ├── config-kconfig.h ├── conversioncheck.h ├── kauthorized.cpp ├── kauthorized.h ├── kconfig.cpp ├── kconfig.h ├── kconfig_core_log_settings.cpp ├── kconfig_core_log_settings.h ├── kconfig_p.h ├── kconfig_version.h ├── kconfigbackend.cpp ├── kconfigbackend_p.h ├── kconfigbase.cpp ├── kconfigbase.h ├── kconfigbase_p.h ├── kconfigdata.cpp ├── kconfigdata.h ├── kconfiggroup.cpp ├── kconfiggroup.h ├── kconfiggroup_p.h ├── kconfigini.cpp ├── kconfigini_p.h ├── kconfigwatcher.cpp ├── kconfigwatcher.h ├── kcoreconfigskeleton.cpp ├── kcoreconfigskeleton.h ├── kcoreconfigskeleton_p.h ├── ksharedconfig.cpp └── ksharedconfig.h ├── hsluv.c ├── hsluv.h ├── ki18n ├── COPYING.LIB ├── KLocalizedContext ├── KLocalizedString ├── KLocalizedTranslator ├── KuitMarkup ├── KuitSetup ├── Messages.sh ├── common_helpers.cpp ├── common_helpers_p.h ├── config.h ├── gettext.h ├── kcatalog.cpp ├── kcatalog_p.h ├── ki18n_export.h ├── ki18n_logging.cpp ├── ki18n_logging.h ├── ki18n_logging_kuit.cpp ├── ki18n_logging_kuit.h ├── ki18n_version.h ├── klocalizedcontext.cpp ├── klocalizedcontext.h ├── klocalizedstring.cpp ├── klocalizedstring.h ├── klocalizedtranslator.cpp ├── klocalizedtranslator.h ├── ktranscript.cpp ├── ktranscript_export.h ├── ktranscript_p.h ├── kuitmarkup.cpp ├── kuitmarkup.h ├── kuitmarkup_p.h ├── kuitsetup.h └── main.cpp ├── kprocess.cpp ├── kprocess.h ├── kpty.cpp ├── kpty.h ├── kpty_p.h ├── kptydevice.cpp ├── kptydevice.h ├── kptyprocess.cpp ├── kptyprocess.h ├── kui ├── KCollapsibleGroupBox ├── KConfigGui ├── KConfigLoader ├── KConfigSkeleton ├── KGuiItem ├── KMessageBox ├── KMessageBoxDontAskAgainInterface ├── KMessageBoxNotifyInterface ├── KMessageWidget ├── KPluralHandlingSpinBox ├── KSqueezedTextLabel ├── KStandardGuiItem ├── fonthelpers.cpp ├── fonthelpers_p.h ├── kcollapsiblegroupbox.cpp ├── kcollapsiblegroupbox.h ├── kcolorbutton.cpp ├── kcolorbutton.h ├── kconfigdialog.cpp ├── kconfigdialog.h ├── kconfigdialogmanager.cpp ├── kconfigdialogmanager.h ├── kconfiggroupgui.cpp ├── kconfiggui.cpp ├── kconfiggui.h ├── kconfigloader.cpp ├── kconfigloader.h ├── kconfigloader_p.h ├── kconfigloaderhandler_p.h ├── kconfigskeleton.cpp ├── kconfigskeleton.h ├── kconfigwidgets_debug.cpp ├── kconfigwidgets_debug.h ├── kfontaction.cpp ├── kfontaction.h ├── kfontchooser.cpp ├── kfontchooser.h ├── kfontrequester.cpp ├── kfontrequester.h ├── kfontsizeaction.cpp ├── kfontsizeaction.h ├── kguiitem.cpp ├── kguiitem.h ├── kmessagebox.cpp ├── kmessagebox.h ├── kmessagebox_p.cpp ├── kmessagebox_p.h ├── kmessageboxdontaskagaininterface.h ├── kmessageboxnotifyinterface.h ├── kmessagewidget.cpp ├── kmessagewidget.h ├── kpagedialog.cpp ├── kpagedialog.h ├── kpagedialog_p.h ├── kpagemodel.cpp ├── kpagemodel.h ├── kpagemodel_p.h ├── kpageview.cpp ├── kpageview.h ├── kpageview_p.cpp ├── kpageview_p.h ├── kpagewidget.cpp ├── kpagewidget.h ├── kpagewidget_p.h ├── kpagewidgetmodel.cpp ├── kpagewidgetmodel.h ├── kpagewidgetmodel_p.h ├── kpluralhandlingspinbox.cpp ├── kpluralhandlingspinbox.h ├── kselectaction.cpp ├── kselectaction.h ├── kselectaction_p.h ├── ksqueezedtextlabel.cpp ├── ksqueezedtextlabel.h ├── kstandardguiitem.cpp ├── kstandardguiitem.h ├── ktitlewidget.cpp ├── ktitlewidget.h ├── loggingcategory.cpp └── loggingcategory.h ├── profile ├── ColorSchemeEditor.cpp ├── ColorSchemeEditor.h ├── ColorSchemeEditor.ui ├── EditProfileAdvancedPage.ui ├── EditProfileAppearancePage.ui ├── EditProfileDialog.cpp ├── EditProfileDialog.h ├── EditProfileGeneralPage.ui ├── EditProfileKeyboardPage.ui ├── EditProfileMousePage.ui ├── EditProfileScrollingPage.ui ├── FontDialog.cpp ├── FontDialog.h ├── KeyBindingEditor.cpp ├── KeyBindingEditor.h └── KeyBindingEditor.ui └── settings ├── ConfigurationDialog.cpp ├── ConfigurationDialog.h ├── GeneralSettings.cpp ├── GeneralSettings.h ├── GeneralSettings.ui ├── HistorySizeWidget.cpp ├── HistorySizeWidget.h ├── HistorySizeWidget.ui ├── KonsoleSettings.kcfgc ├── ProfileSettings.cpp ├── ProfileSettings.h ├── ProfileSettings.ui ├── TemporaryFilesSettings.cpp ├── TemporaryFilesSettings.h ├── TemporaryFilesSettings.ui └── konsole.kcfg /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | BasedOnStyle: LLVM 3 | AccessModifierOffset: -4 4 | AlignAfterOpenBracket: DontAlign 5 | AlignConsecutiveAssignments: false 6 | AlignConsecutiveDeclarations: false 7 | AlignEscapedNewlines: DontAlign 8 | AlignOperands: false 9 | AlignTrailingComments: false 10 | AllowAllParametersOfDeclarationOnNextLine: false 11 | AllowShortBlocksOnASingleLine: false 12 | AllowShortCaseLabelsOnASingleLine: true 13 | AllowShortFunctionsOnASingleLine: InlineOnly 14 | AllowShortIfStatementsOnASingleLine: false 15 | AllowShortLoopsOnASingleLine: false 16 | AlwaysBreakAfterDefinitionReturnType: None 17 | AlwaysBreakAfterReturnType: None 18 | AlwaysBreakBeforeMultilineStrings: false 19 | AlwaysBreakTemplateDeclarations: Yes 20 | BinPackArguments: false 21 | BinPackParameters: false 22 | BraceWrapping: 23 | AfterClass: true 24 | AfterControlStatement: true 25 | AfterEnum: true 26 | AfterFunction: true 27 | AfterNamespace: true 28 | AfterStruct: true 29 | AfterUnion: true 30 | AfterCaseLabel: true 31 | AfterExternBlock: true 32 | BeforeCatch: true 33 | BeforeElse: true 34 | IndentBraces: false 35 | SplitEmptyFunction: false 36 | SplitEmptyRecord: true 37 | SplitEmptyNamespace: true 38 | BreakBeforeBinaryOperators: None 39 | BreakBeforeBraces: Custom 40 | BreakBeforeTernaryOperators: true 41 | BreakConstructorInitializers: BeforeColon 42 | BreakInheritanceList: BeforeColon 43 | BreakStringLiterals: true 44 | ColumnLimit: 100 45 | CompactNamespaces: false 46 | ConstructorInitializerAllOnOneLineOrOnePerLine: false 47 | ConstructorInitializerIndentWidth: 4 48 | ContinuationIndentWidth: 4 49 | Cpp11BracedListStyle: true 50 | DerivePointerAlignment: false 51 | DisableFormat: false 52 | ExperimentalAutoDetectBinPacking: false 53 | FixNamespaceComments: true 54 | IncludeBlocks: Preserve 55 | IndentCaseLabels: true 56 | IndentPPDirectives: None 57 | IndentWidth: 4 58 | IndentWrappedFunctionNames: true 59 | KeepEmptyLinesAtTheStartOfBlocks: false 60 | NamespaceIndentation: None 61 | PointerAlignment: Left 62 | ReflowComments: false 63 | SortIncludes: false 64 | SortUsingDeclarations: false 65 | SpaceAfterCStyleCast: true 66 | SpaceAfterTemplateKeyword: false 67 | SpaceBeforeAssignmentOperators: true 68 | SpaceBeforeCpp11BracedList: false 69 | SpaceBeforeCtorInitializerColon: true 70 | SpaceBeforeInheritanceColon: false 71 | SpaceBeforeParens: Never 72 | SpaceBeforeRangeBasedForLoopColon: true 73 | SpaceInEmptyParentheses: false 74 | SpacesBeforeTrailingComments: 1 75 | SpacesInAngles: false 76 | SpacesInCStyleCastParentheses: false 77 | SpacesInContainerLiterals: true 78 | SpacesInParentheses: false 79 | SpacesInSquareBrackets: false 80 | Standard: Cpp11 81 | TabWidth: 4 82 | UseTab: Never 83 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | out/ 3 | *.user 4 | *.user.* 5 | TimerWheel.cpp 6 | TimerWheel.h 7 | -------------------------------------------------------------------------------- /LGPL_EXCEPTION.TXT: -------------------------------------------------------------------------------- 1 | Nokia Qt LGPL Exception version 1.1 2 | 3 | As an additional permission to the GNU Lesser General Public License version 4 | 2.1, the object code form of a "work that uses the Library" may incorporate 5 | material from a header file that is part of the Library. You may distribute 6 | such object code under terms of your choice, provided that: 7 | (i) the header files of the Library have not been modified; and 8 | (ii) the incorporated material is limited to numerical parameters, data 9 | structure layouts, accessors, macros, inline functions and 10 | templates; and 11 | (iii) you comply with the terms of Section 6 of the GNU Lesser General 12 | Public License version 2.1. 13 | 14 | Moreover, you may apply this exception to a modified version of the Library, 15 | provided that such modification does not involve copying material from the 16 | Library into the modified Library's header files unless such material is 17 | limited to (i) numerical parameters; (ii) data structure layouts; 18 | (iii) accessors; and (iv) small macros, templates and inline functions of 19 | five lines or less in length. 20 | 21 | Furthermore, you are not required to apply this additional permission to a 22 | modified version of the Library. 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## A plugin for Qt Creator that provides an embedded terminal (QtCreator v8+). 2 | 3 | This is basically a fork of KDE's Konsole with all standalone functionality removed. It has also been de-KDE'ified and should work in non-KDE environments (untested). 4 | 5 | Currently support is limited to Linux, but I suspect adding Macos support would be possible (Feel free to offer a PR). 6 | 7 | Due to the vastly different console API's between Windows and Linux a Windows port isn't being considered. This may change at some point, however, now that Microsoft has rewritten the Windows 10 console system. 8 | 9 | ### Building 10 | 11 | To build all that is needed is an environment suitable for building Qt Creator plugins. 12 | 13 | More specifically: 14 | 15 | * Qt version 6.3.1 or later. Earlier versions may work - use at your own risk, but at least Qt 6 is required. Qt Creator builds are usually tied to a particular version of Qt so try to match the two as close as possible. 16 | * A Qt Creator version 8+ install. This can be either locally built or an official installation. 17 | * One of the following: 18 | * **Easy way**: Install plugin support when installing Qt Creator. 19 | * **Hard way**: The Qt Creator 8+ source code. Even though building Qt Creator is not required, plugins are reliant on internal headers which are only available via the source code. Because of this the terminal plugin (along with all Qt Creator plugins) are tightly coupled to the Qt Creator version they were built against. This method is currently untested. 20 | 21 | * Open the project in Qt Creator (It's cmake based, so open CMakeLists.txt) 22 | * In the Build Settings add the following cmake variable: 23 | * `QtCreator_DIR=/lib/cmake/QtCreator` 24 | * Build! 25 | 26 | ### Installation 27 | By default `libTerminalPlugin.so` is moved to `/lib/qtcreator/plugins` directory after a successful build. This can be changed to Qt Creator's user settings directory by setting the environment variable `USE_USER_DESTDIR=yes`. On Linux one of these two locations will be used: `$XDG_DATA_HOME/data/QtProject/qtcreator` or `~/.local/share/data/QtProject/qtcreator`. On Ubuntu 19.10 Qt Creator uses the second of the two. 28 | 29 | Note that I may change this behavior in the future. I am not keen on the idea of a development build automatically depositing binaries for me. 30 | 31 | ### Configuration 32 | As it stands the plugin will look for konsole profiles and settings in the same location as konsole. I will be re-writing this part to store configuration in its own location. 33 | 34 | ### Known Issues 35 | 36 | Translation has been disabled due to the dependency on the KDE i18n project. 37 | 38 | ### Acknowledgements 39 | 40 | The Qt Creator terminal plugin contains _very_ little code written by myself. As such 99.897% of the credit goes to the KDE project and their excellent KDE Foundation libraries. 41 | 42 | Inspiration for this implementation of a Qt Creator terminal came from 43 | * https://github.com/manyoso/qt-creator-terminalplugin 44 | * https://github.com/lxqt/qtermwidget 45 | -------------------------------------------------------------------------------- /data/color-schemes/BlackOnLightYellow.colorscheme: -------------------------------------------------------------------------------- 1 | [Background] 2 | Color=255,255,221 3 | 4 | [BackgroundIntense] 5 | Color=255,255,221 6 | 7 | [BackgroundFaint] 8 | Color=255,255,221 9 | 10 | [Color0] 11 | Color=0,0,0 12 | 13 | [Color0Intense] 14 | Color=104,104,104 15 | 16 | [Color0Faint] 17 | Color=192,192,192 18 | 19 | [Color1] 20 | Color=178,24,24 21 | 22 | [Color1Intense] 23 | Color=255,84,84 24 | 25 | [Color1Faint] 26 | Color=224,142,142 27 | 28 | [Color2] 29 | Color=24,178,24 30 | 31 | [Color2Intense] 32 | Color=84,255,84 33 | 34 | [Color2Faint] 35 | Color=142,224,142 36 | 37 | [Color3] 38 | Color=178,104,24 39 | 40 | [Color3Intense] 41 | Color=255,255,84 42 | 43 | [Color3Faint] 44 | Color=224,224,142 45 | 46 | [Color4] 47 | Color=24,24,178 48 | 49 | [Color4Intense] 50 | Color=84,84,255 51 | 52 | [Color4Faint] 53 | Color=142,142,224 54 | 55 | [Color5] 56 | Color=178,24,178 57 | 58 | [Color5Intense] 59 | Color=255,84,255 60 | 61 | [Color5Faint] 62 | Color=224,142,224 63 | 64 | [Color6] 65 | Color=24,178,178 66 | 67 | [Color6Intense] 68 | Color=84,255,255 69 | 70 | [Color6Faint] 71 | Color=142,224,224 72 | 73 | [Color7] 74 | Color=178,178,178 75 | 76 | [Color7Intense] 77 | Color=255,255,255 78 | 79 | [Color7Faint] 80 | Color=142,142,142 81 | 82 | [Foreground] 83 | Color=0,0,0 84 | 85 | [ForegroundIntense] 86 | Bold=true 87 | Color=0,0,0 88 | 89 | [ForegroundFaint] 90 | Color=0,0,0 91 | 92 | [General] 93 | Description=Black on Light Yellow 94 | Opacity=1 95 | -------------------------------------------------------------------------------- /data/color-schemes/BlackOnLightYellow.schema: -------------------------------------------------------------------------------- 1 | # example scheme for konsole 2 | 3 | # the title is to appear in the menu. 4 | 5 | title Black on Light Yellow 6 | 7 | # foreground colors 8 | 9 | # note that the default background color is flagged 10 | # to become transparent when an image is present. 11 | 12 | # slot transparent bold 13 | # | | | 14 | # V V--color--V V V 15 | 16 | color 0 0 0 0 0 0 # regular foreground color (Black) 17 | color 1 255 255 221 1 0 # regular background color (Light Yellow) 18 | 19 | color 2 0 0 0 0 0 # regular color 0 Black 20 | color 3 178 24 24 0 0 # regular color 1 Red 21 | color 4 24 178 24 0 0 # regular color 2 Green 22 | color 5 178 104 24 0 0 # regular color 3 Yellow 23 | color 6 24 24 178 0 0 # regular color 4 Blue 24 | color 7 178 24 178 0 0 # regular color 5 Magenta 25 | color 8 24 178 178 0 0 # regular color 6 Cyan 26 | color 9 178 178 178 0 0 # regular color 7 White 27 | 28 | # intensive colors 29 | 30 | # instead of changing the colors, we've flaged the text to become bold 31 | 32 | color 10 0 0 0 0 1 # intensive foreground color 33 | color 11 255 255 221 1 0 # intensive background color 34 | 35 | color 12 104 104 104 0 0 # intensive color 0 36 | color 13 255 84 84 0 0 # intensive color 1 37 | color 14 84 255 84 0 0 # intensive color 2 38 | color 15 255 255 84 0 0 # intensive color 3 39 | color 16 84 84 255 0 0 # intensive color 4 40 | color 17 255 84 255 0 0 # intensive color 5 41 | color 18 84 255 255 0 0 # intensive color 6 42 | color 19 255 255 255 0 0 # intensive color 7 43 | -------------------------------------------------------------------------------- /data/color-schemes/BlackOnRandomLight.colorscheme: -------------------------------------------------------------------------------- 1 | [Background] 2 | Color=247,247,214 3 | RandomHueRange=360 4 | RandomSaturationRange=25 5 | RandomLightnessRange=10 6 | 7 | [BackgroundIntense] 8 | Color=255,255,221 9 | RandomHueRange=360 10 | RandomSaturationRange=25 11 | RandomLightnessRange=10 12 | 13 | [BackgroundFaint] 14 | Color=247,247,214 15 | RandomHueRange=360 16 | RandomSaturationRange=25 17 | RandomLightnessRange=10 18 | 19 | [Color0] 20 | Color=0,0,0 21 | 22 | [Color0Intense] 23 | Color=104,104,104 24 | 25 | [Color0Faint] 26 | Color=192,192,192 27 | 28 | [Color1] 29 | Color=178,24,24 30 | 31 | [Color1Intense] 32 | Color=255,84,84 33 | 34 | [Color1Faint] 35 | Color=224,142,142 36 | 37 | [Color2] 38 | Color=24,178,24 39 | 40 | [Color2Intense] 41 | Color=84,255,84 42 | 43 | [Color2Faint] 44 | Color=142,224,142 45 | 46 | [Color3] 47 | Color=178,104,24 48 | 49 | [Color3Intense] 50 | Color=255,255,84 51 | 52 | [Color3Faint] 53 | Color=224,224,142 54 | 55 | [Color4] 56 | Color=24,24,178 57 | 58 | [Color4Intense] 59 | Color=84,84,255 60 | 61 | [Color4Faint] 62 | Color=142,142,224 63 | 64 | [Color5] 65 | Color=178,24,178 66 | 67 | [Color5Intense] 68 | Color=255,84,255 69 | 70 | [Color5Faint] 71 | Color=224,142,224 72 | 73 | [Color6] 74 | Color=24,178,178 75 | 76 | [Color6Intense] 77 | Color=84,255,255 78 | 79 | [Color6Faint] 80 | Color=142,224,224 81 | 82 | [Color7] 83 | Color=178,178,178 84 | 85 | [Color7Intense] 86 | Color=255,255,255 87 | 88 | [Color7Faint] 89 | Color=142,142,142 90 | 91 | [Foreground] 92 | Color=0,0,0 93 | 94 | [ForegroundIntense] 95 | Bold=true 96 | Color=0,0,0 97 | 98 | [ForegroundFaint] 99 | Color=0,0,0 100 | 101 | [General] 102 | Description=Black on Random Light 103 | ColorRandomization=true 104 | Opacity=1 105 | -------------------------------------------------------------------------------- /data/color-schemes/BlackOnWhite.colorscheme: -------------------------------------------------------------------------------- 1 | [Background] 2 | Color=255,255,255 3 | 4 | [BackgroundIntense] 5 | Color=255,255,255 6 | 7 | [BackgroundFaint] 8 | Color=255,255,255 9 | 10 | [Color0] 11 | Color=0,0,0 12 | 13 | [Color0Intense] 14 | Color=104,104,104 15 | 16 | [Color0Faint] 17 | Color=192,192,192 18 | 19 | [Color1] 20 | Color=178,24,24 21 | 22 | [Color1Intense] 23 | Color=255,84,84 24 | 25 | [Color1Faint] 26 | Color=224,142,142 27 | 28 | [Color2] 29 | Color=24,178,24 30 | 31 | [Color2Intense] 32 | Color=84,255,84 33 | 34 | [Color2Faint] 35 | Color=142,224,142 36 | 37 | [Color3] 38 | Color=178,104,24 39 | 40 | [Color3Intense] 41 | Color=255,255,84 42 | 43 | [Color3Faint] 44 | Color=224,224,142 45 | 46 | [Color4] 47 | Color=24,24,178 48 | 49 | [Color4Intense] 50 | Color=84,84,255 51 | 52 | [Color4Faint] 53 | Color=142,142,224 54 | 55 | [Color5] 56 | Color=178,24,178 57 | 58 | [Color5Intense] 59 | Color=255,84,255 60 | 61 | [Color5Faint] 62 | Color=224,142,224 63 | 64 | [Color6] 65 | Color=24,178,178 66 | 67 | [Color6Intense] 68 | Color=84,255,255 69 | 70 | [Color6Faint] 71 | Color=142,224,224 72 | 73 | [Color7] 74 | Color=178,178,178 75 | 76 | [Color7Intense] 77 | Color=255,255,255 78 | 79 | [Color7Faint] 80 | Color=142,142,142 81 | 82 | [Foreground] 83 | Color=0,0,0 84 | 85 | [ForegroundIntense] 86 | Bold=true 87 | Color=0,0,0 88 | 89 | [ForegroundFaint] 90 | Color=0,0,0 91 | 92 | [General] 93 | Description=Black on White 94 | Opacity=1 95 | -------------------------------------------------------------------------------- /data/color-schemes/BlackOnWhite.schema: -------------------------------------------------------------------------------- 1 | # example scheme for konsole 2 | 3 | # the title is to appear in the menu. 4 | 5 | title Black on White 6 | 7 | # foreground colors 8 | 9 | # note that the default background color is flagged 10 | # to become transparent when an image is present. 11 | 12 | # slot transparent bold 13 | # | | | 14 | # V V--color--V V V 15 | 16 | color 0 0 0 0 0 0 # regular foreground color (Black) 17 | color 1 255 255 255 1 0 # regular background color (White) 18 | 19 | color 2 0 0 0 0 0 # regular color 0 Black 20 | color 3 178 24 24 0 0 # regular color 1 Red 21 | color 4 24 178 24 0 0 # regular color 2 Green 22 | color 5 178 104 24 0 0 # regular color 3 Yellow 23 | color 6 24 24 178 0 0 # regular color 4 Blue 24 | color 7 178 24 178 0 0 # regular color 5 Magenta 25 | color 8 24 178 178 0 0 # regular color 6 Cyan 26 | color 9 178 178 178 0 0 # regular color 7 White 27 | 28 | # intensive colors 29 | 30 | # instead of changing the colors, we've flaged the text to become bold 31 | 32 | color 10 0 0 0 0 1 # intensive foreground color 33 | color 11 255 255 255 1 0 # intensive background color 34 | 35 | color 12 104 104 104 0 0 # intensive color 0 36 | color 13 255 84 84 0 0 # intensive color 1 37 | color 14 84 255 84 0 0 # intensive color 2 38 | color 15 255 255 84 0 0 # intensive color 3 39 | color 16 84 84 255 0 0 # intensive color 4 40 | color 17 255 84 255 0 0 # intensive color 5 41 | color 18 84 255 255 0 0 # intensive color 6 42 | color 19 255 255 255 0 0 # intensive color 7 43 | -------------------------------------------------------------------------------- /data/color-schemes/BlueOnBlack.colorscheme: -------------------------------------------------------------------------------- 1 | [Background] 2 | Color=0,0,0 3 | 4 | [BackgroundIntense] 5 | Color=0,0,0 6 | 7 | [BackgroundFaint] 8 | Color=0,0,0 9 | 10 | [Color0] 11 | Color=0,0,0 12 | 13 | [Color0Intense] 14 | Color=104,104,104 15 | 16 | [Color0Faint] 17 | Color=192,192,192 18 | 19 | [Color1] 20 | Color=250,0,0 21 | 22 | [Color1Intense] 23 | Color=75,93,255 24 | 25 | [Color1Faint] 26 | Color=250,0,0 27 | 28 | [Color2] 29 | Color=24,178,24 30 | 31 | [Color2Intense] 32 | Color=84,255,84 33 | 34 | [Color2Faint] 35 | Color=142,224,142 36 | 37 | [Color3] 38 | Color=178,104,24 39 | 40 | [Color3Intense] 41 | Color=255,255,84 42 | 43 | [Color3Faint] 44 | Color=224,224,142 45 | 46 | [Color4] 47 | Color=125,152,35 48 | 49 | [Color4Intense] 50 | Color=84,84,255 51 | 52 | [Color4Faint] 53 | Color=125,152,35 54 | 55 | [Color5] 56 | Color=225,30,225 57 | 58 | [Color5Intense] 59 | Color=255,84,255 60 | 61 | [Color5Faint] 62 | Color=175,29,175 63 | 64 | [Color6] 65 | Color=0,134,223 66 | 67 | [Color6Intense] 68 | Color=0,68,255 69 | 70 | [Color6Faint] 71 | Color=0,98,173 72 | 73 | [Color7] 74 | Color=255,255,255 75 | 76 | [Color7Intense] 77 | Color=50,50,50 78 | 79 | [Color7Faint] 80 | Color=200,200,200 81 | 82 | [Foreground] 83 | Color=0,119,255 84 | 85 | [ForegroundIntense] 86 | Bold=true 87 | Color=23,74,240 88 | 89 | [ForegroundFaint] 90 | Color=0,90,195 91 | 92 | [General] 93 | Description=Blue on Black 94 | Opacity=1 95 | -------------------------------------------------------------------------------- /data/color-schemes/Breeze.colorscheme: -------------------------------------------------------------------------------- 1 | [Background] 2 | Color=35,38,39 3 | 4 | [BackgroundFaint] 5 | Color=49,54,59 6 | 7 | [BackgroundIntense] 8 | Color=0,0,0 9 | 10 | [Color0] 11 | Color=35,38,39 12 | 13 | [Color0Faint] 14 | Color=49,54,59 15 | 16 | [Color0Intense] 17 | Color=127,140,141 18 | 19 | [Color1] 20 | Color=237,21,21 21 | 22 | [Color1Faint] 23 | Color=120,50,40 24 | 25 | [Color1Intense] 26 | Color=192,57,43 27 | 28 | [Color2] 29 | Color=17,209,22 30 | 31 | [Color2Faint] 32 | Color=23,162,98 33 | 34 | [Color2Intense] 35 | Color=28,220,154 36 | 37 | [Color3] 38 | Color=246,116,0 39 | 40 | [Color3Faint] 41 | Color=182,86,25 42 | 43 | [Color3Intense] 44 | Color=253,188,75 45 | 46 | [Color4] 47 | Color=29,153,243 48 | 49 | [Color4Faint] 50 | Color=27,102,143 51 | 52 | [Color4Intense] 53 | Color=61,174,233 54 | 55 | [Color5] 56 | Color=155,89,182 57 | 58 | [Color5Faint] 59 | Color=97,74,115 60 | 61 | [Color5Intense] 62 | Color=142,68,173 63 | 64 | [Color6] 65 | Color=26,188,156 66 | 67 | [Color6Faint] 68 | Color=24,108,96 69 | 70 | [Color6Intense] 71 | Color=22,160,133 72 | 73 | [Color7] 74 | Color=252,252,252 75 | 76 | [Color7Faint] 77 | Color=99,104,109 78 | 79 | [Color7Intense] 80 | Color=255,255,255 81 | 82 | [Foreground] 83 | Color=252,252,252 84 | 85 | [ForegroundFaint] 86 | Color=239,240,241 87 | 88 | [ForegroundIntense] 89 | Color=255,255,255 90 | 91 | [General] 92 | Description=Breeze 93 | Opacity=1 94 | Wallpaper= 95 | -------------------------------------------------------------------------------- /data/color-schemes/BreezeModified.colorscheme: -------------------------------------------------------------------------------- 1 | [Background] 2 | Color=49,54,59 3 | 4 | [BackgroundFaint] 5 | Color=49,54,59 6 | 7 | [BackgroundIntense] 8 | Color=35,38,41 9 | 10 | [Color0] 11 | Color=7,54,66 12 | 13 | [Color0Faint] 14 | Color=32,43,54 15 | 16 | [Color0Intense] 17 | Color=255,85,0 18 | 19 | [Color1] 20 | Color=237,21,21 21 | 22 | [Color1Faint] 23 | Color=120,50,40 24 | 25 | [Color1Intense] 26 | Color=192,57,43 27 | 28 | [Color2] 29 | Color=17,209,22 30 | 31 | [Color2Faint] 32 | Color=23,162,98 33 | 34 | [Color2Intense] 35 | Color=28,220,154 36 | 37 | [Color3] 38 | Color=246,116,0 39 | 40 | [Color3Faint] 41 | Color=182,86,25 42 | 43 | [Color3Intense] 44 | Color=253,188,75 45 | 46 | [Color4] 47 | Color=29,153,243 48 | 49 | [Color4Faint] 50 | Color=27,102,143 51 | 52 | [Color4Intense] 53 | Color=61,174,233 54 | 55 | [Color5] 56 | Color=155,89,182 57 | 58 | [Color5Faint] 59 | Color=97,74,115 60 | 61 | [Color5Intense] 62 | Color=142,68,173 63 | 64 | [Color6] 65 | Color=26,188,156 66 | 67 | [Color6Faint] 68 | Color=24,108,96 69 | 70 | [Color6Intense] 71 | Color=22,160,133 72 | 73 | [Color7] 74 | Color=239,240,241 75 | 76 | [Color7Faint] 77 | Color=99,104,109 78 | 79 | [Color7Intense] 80 | Color=252,252,252 81 | 82 | [Foreground] 83 | Color=239,240,241 84 | 85 | [ForegroundFaint] 86 | Color=220,230,231 87 | 88 | [ForegroundIntense] 89 | Color=252,252,252 90 | 91 | [General] 92 | Description=BreezeModified 93 | Opacity=0.95 94 | Wallpaper= 95 | 96 | -------------------------------------------------------------------------------- /data/color-schemes/DarkPastels.colorscheme: -------------------------------------------------------------------------------- 1 | [Background] 2 | Color=44,44,44 3 | 4 | [BackgroundIntense] 5 | Bold=true 6 | Color=44,44,44 7 | 8 | [BackgroundFaint] 9 | Color=44,44,44 10 | 11 | [Color0] 12 | Color=63,63,63 13 | 14 | [Color0Intense] 15 | Bold=true 16 | Color=112,144,128 17 | 18 | [Color0Faint] 19 | Color=52,52,52 20 | 21 | [Color1] 22 | Color=112,80,80 23 | 24 | [Color1Intense] 25 | Bold=true 26 | Color=220,163,163 27 | 28 | [Color1Faint] 29 | Color=102,72,72 30 | 31 | [Color2] 32 | Color=96,180,138 33 | 34 | [Color2Intense] 35 | Bold=true 36 | Color=114,213,163 37 | 38 | [Color2Faint] 39 | Color=87,163,124 40 | 41 | [Color3] 42 | Color=223,175,143 43 | 44 | [Color3Intense] 45 | Bold=true 46 | Color=240,223,175 47 | 48 | [Color3Faint] 49 | Color=170,133,111 50 | 51 | [Color4] 52 | Color=154,184,215 53 | 54 | [Color4Intense] 55 | Bold=true 56 | Color=148,191,243 57 | 58 | [Color4Faint] 59 | Color=117,141,161 60 | 61 | [Color5] 62 | Color=220,140,195 63 | 64 | [Color5Intense] 65 | Bold=true 66 | Color=236,147,211 67 | 68 | [Color5Faint] 69 | Color=154,98,137 70 | 71 | [Color6] 72 | Color=140,208,211 73 | 74 | [Color6Intense] 75 | Bold=true 76 | Color=147,224,227 77 | 78 | [Color6Faint] 79 | Color=107,159,161 80 | 81 | [Color7] 82 | Color=220,220,204 83 | 84 | [Color7Intense] 85 | Bold=true 86 | Color=255,255,255 87 | 88 | [Color7Faint] 89 | Color=149,149,139 90 | 91 | [Foreground] 92 | Color=220,220,204 93 | 94 | [ForegroundIntense] 95 | Bold=true 96 | Color=220,220,204 97 | 98 | [ForegroundFaint] 99 | Color=220,220,204 100 | 101 | [General] 102 | Description=Dark Pastels 103 | Opacity=1 104 | -------------------------------------------------------------------------------- /data/color-schemes/GreenOnBlack.colorscheme: -------------------------------------------------------------------------------- 1 | [Background] 2 | Color=0,0,0 3 | 4 | [BackgroundIntense] 5 | Color=0,0,0 6 | 7 | [BackgroundFaint] 8 | Color=0,0,0 9 | 10 | [Color0] 11 | Color=0,0,0 12 | 13 | [Color0Intense] 14 | Color=104,104,104 15 | 16 | [Color0Faint] 17 | Color=24,24,24 18 | 19 | [Color1] 20 | Color=250,75,75 21 | 22 | [Color1Intense] 23 | Color=255,84,84 24 | 25 | [Color1Faint] 26 | Color=101,25,25 27 | 28 | [Color2] 29 | Color=24,178,24 30 | 31 | [Color2Intense] 32 | Color=84,255,84 33 | 34 | [Color2Faint] 35 | Color=0,101,0 36 | 37 | [Color3] 38 | Color=178,104,24 39 | 40 | [Color3Intense] 41 | Color=255,255,84 42 | 43 | [Color3Faint] 44 | Color=101,74,0 45 | 46 | [Color4] 47 | Color=24,24,178 48 | 49 | [Color4Intense] 50 | Color=84,84,255 51 | 52 | [Color4Faint] 53 | Color=0,0,101 54 | 55 | [Color5] 56 | Color=225,30,225 57 | 58 | [Color5Intense] 59 | Color=255,84,255 60 | 61 | [Color5Faint] 62 | Color=95,5,95 63 | 64 | [Color6] 65 | Color=24,178,178 66 | 67 | [Color6Intense] 68 | Color=84,255,255 69 | 70 | [Color6Faint] 71 | Color=0,101,101 72 | 73 | [Color7] 74 | Color=178,178,178 75 | 76 | [Color7Intense] 77 | Color=255,255,255 78 | 79 | [Color7Faint] 80 | Color=101,101,101 81 | 82 | [Foreground] 83 | Color=24,240,24 84 | 85 | [ForegroundIntense] 86 | Bold=true 87 | Color=24,240,24 88 | 89 | [ForegroundFaint] 90 | Color=18,200,18 91 | 92 | [General] 93 | Description=Green on Black 94 | Opacity=1 95 | -------------------------------------------------------------------------------- /data/color-schemes/Linux.colorscheme: -------------------------------------------------------------------------------- 1 | [Background] 2 | Color=0,0,0 3 | 4 | [BackgroundIntense] 5 | Color=104,104,104 6 | 7 | [BackgroundFaint] 8 | Color=0,0,0 9 | 10 | [Color0] 11 | Color=0,0,0 12 | 13 | [Color0Intense] 14 | Color=104,104,104 15 | 16 | [Color0Faint] 17 | Color=24,24,24 18 | 19 | [Color1] 20 | Color=178,24,24 21 | 22 | [Color1Intense] 23 | Color=255,84,84 24 | 25 | [Color1Faint] 26 | Color=101,0,0 27 | 28 | [Color2] 29 | Color=24,178,24 30 | 31 | [Color2Intense] 32 | Color=84,255,84 33 | 34 | [Color2Faint] 35 | Color=0,101,0 36 | 37 | [Color3] 38 | Color=178,104,24 39 | 40 | [Color3Intense] 41 | Color=255,255,84 42 | 43 | [Color3Faint] 44 | Color=101,94,0 45 | 46 | [Color4] 47 | Color=24,24,178 48 | 49 | [Color4Intense] 50 | Color=84,84,255 51 | 52 | [Color4Faint] 53 | Color=0,0,101 54 | 55 | [Color5] 56 | Color=178,24,178 57 | 58 | [Color5Intense] 59 | Color=255,84,255 60 | 61 | [Color5Faint] 62 | Color=101,0,101 63 | 64 | [Color6] 65 | Color=24,178,178 66 | 67 | [Color6Intense] 68 | Color=84,255,255 69 | 70 | [Color6Faint] 71 | Color=0,101,101 72 | 73 | [Color7] 74 | Color=178,178,178 75 | 76 | [Color7Intense] 77 | Color=255,255,255 78 | 79 | [Color7Faint] 80 | Color=101,101,101 81 | 82 | [Foreground] 83 | Color=178,178,178 84 | 85 | [ForegroundIntense] 86 | Color=255,255,255 87 | 88 | [ForegroundFaint] 89 | Color=101,101,101 90 | 91 | [General] 92 | Description=Linux Colors 93 | -------------------------------------------------------------------------------- /data/color-schemes/RedOnBlack.colorscheme: -------------------------------------------------------------------------------- 1 | [Background] 2 | Color=0,0,0 3 | 4 | [BackgroundIntense] 5 | Color=0,0,0 6 | 7 | [BackgroundFaint] 8 | Color=0,0,0 9 | 10 | [Color0] 11 | Color=0,0,0 12 | 13 | [Color0Intense] 14 | Color=104,104,104 15 | 16 | [Color0Faint] 17 | Color=24,24,24 18 | 19 | [Color1] 20 | Color=250,142,8 21 | 22 | [Color1Intense] 23 | Color=255,84,84 24 | 25 | [Color1Faint] 26 | Color=101,25,0 27 | 28 | [Color2] 29 | Color=24,178,24 30 | 31 | [Color2Intense] 32 | Color=84,255,84 33 | 34 | [Color2Faint] 35 | Color=0,101,0 36 | 37 | [Color3] 38 | Color=178,104,24 39 | 40 | [Color3Intense] 41 | Color=255,255,84 42 | 43 | [Color3Faint] 44 | Color=101,74,0 45 | 46 | [Color4] 47 | Color=30,71,152 48 | 49 | [Color4Intense] 50 | Color=84,84,255 51 | 52 | [Color4Faint] 53 | Color=0,24,102 54 | 55 | [Color5] 56 | Color=225,30,225 57 | 58 | [Color5Intense] 59 | Color=255,84,255 60 | 61 | [Color5Faint] 62 | Color=95,5,95 63 | 64 | [Color6] 65 | Color=0,134,223 66 | 67 | [Color6Intense] 68 | Color=255,0,4 69 | 70 | [Color6Faint] 71 | Color=0,94,163 72 | 73 | [Color7] 74 | Color=255,255,255 75 | 76 | [Color7Intense] 77 | Color=50,50,50 78 | 79 | [Color7Faint] 80 | Color=101,101,101 81 | 82 | [Foreground] 83 | Color=255,0,0 84 | 85 | [ForegroundIntense] 86 | Bold=true 87 | Color=24,240,24 88 | 89 | [ForegroundFaint] 90 | Color=205,0,0 91 | 92 | [General] 93 | Description=Red on Black 94 | Opacity=1 95 | -------------------------------------------------------------------------------- /data/color-schemes/Solarized.colorscheme: -------------------------------------------------------------------------------- 1 | [Color0] 2 | Color=7,54,66 3 | 4 | [Color0Intense] 5 | Color=0,43,54 6 | 7 | [Color0Faint] 8 | Color=6,48,59 9 | 10 | [Color1] 11 | Color=220,50,47 12 | 13 | [Color1Intense] 14 | Color=203,75,22 15 | 16 | [Color1Faint] 17 | Color=147,33,31 18 | 19 | [Color2] 20 | Color=133,153,0 21 | 22 | [Color2Intense] 23 | Color=88,110,117 24 | 25 | [Color2Faint] 26 | Color=94,106,0 27 | 28 | [Color3] 29 | Color=181,137,0 30 | 31 | [Color3Intense] 32 | Color=101,123,131 33 | 34 | [Color3Faint] 35 | Color=138,103,0 36 | 37 | [Color4] 38 | Color=38,139,210 39 | 40 | [Color4Intense] 41 | Color=131,148,150 42 | 43 | [Color4Faint] 44 | Color=20,77,115 45 | 46 | [Color5] 47 | Color=211,54,130 48 | 49 | [Color5Intense] 50 | Color=108,113,196 51 | 52 | [Color5Faint] 53 | Color=120,30,75 54 | 55 | [Color6] 56 | Color=42,161,152 57 | 58 | [Color6Intense] 59 | Color=147,161,161 60 | 61 | [Color6Faint] 62 | Color=24,94,88 63 | 64 | [Color7] 65 | Color=238,232,213 66 | 67 | [Color7Intense] 68 | Color=253,246,227 69 | 70 | [Color7Faint] 71 | Color=171,167,154 72 | 73 | [Background] 74 | Color=0,43,54 75 | 76 | [BackgroundIntense] 77 | Color=7,54,66 78 | 79 | [BackgroundFaint] 80 | Color=0,43,54 81 | 82 | [Foreground] 83 | Color=131,148,150 84 | 85 | [ForegroundIntense] 86 | Color=147,161,161 87 | 88 | [ForegroundFaint] 89 | Color=106,119,121 90 | 91 | [General] 92 | Description=Solarized 93 | Opacity=1 94 | -------------------------------------------------------------------------------- /data/color-schemes/SolarizedLight.colorscheme: -------------------------------------------------------------------------------- 1 | [Color0] 2 | Color=7,54,66 3 | 4 | [Color0Intense] 5 | Color=0,43,54 6 | 7 | [Color0Faint] 8 | Color=8,65,80 9 | 10 | [Color1] 11 | Color=220,50,47 12 | 13 | [Color1Intense] 14 | Color=203,75,22 15 | 16 | [Color1Faint] 17 | Color=222,81,81 18 | 19 | [Color2] 20 | Color=133,153,0 21 | 22 | [Color2Intense] 23 | Color=88,110,117 24 | 25 | [Color2Faint] 26 | Color=153,168,39 27 | 28 | [Color3] 29 | Color=181,137,0 30 | 31 | [Color3Intense] 32 | Color=101,123,131 33 | 34 | [Color3Faint] 35 | Color=213,170,49 36 | 37 | [Color4] 38 | Color=38,139,210 39 | 40 | [Color4Intense] 41 | Color=131,148,150 42 | 43 | [Color4Faint] 44 | Color=80,173,226 45 | 46 | [Color5] 47 | Color=211,54,130 48 | 49 | [Color5Intense] 50 | Color=108,113,196 51 | 52 | [Color5Faint] 53 | Color=223,92,158 54 | 55 | [Color6] 56 | Color=42,161,152 57 | 58 | [Color6Intense] 59 | Color=147,161,161 60 | 61 | [Color6Faint] 62 | Color=78,211,200 63 | 64 | [Color7] 65 | Color=238,232,213 66 | 67 | [Color7Intense] 68 | Color=253,246,227 69 | 70 | [Color7Faint] 71 | Color=238,232,213 72 | 73 | [Background] 74 | Color=253,246,227 75 | 76 | [BackgroundIntense] 77 | Color=238,232,213 78 | 79 | [BackgroundFaint] 80 | Color=253,246,227 81 | 82 | [Foreground] 83 | Color=101,123,131 84 | 85 | [ForegroundIntense] 86 | Color=88,110,117 87 | 88 | [ForegroundFaint] 89 | Color=141,172,182 90 | 91 | [General] 92 | Description=Solarized Light 93 | Opacity=1 94 | -------------------------------------------------------------------------------- /data/color-schemes/Tango.colorscheme: -------------------------------------------------------------------------------- 1 | [General] 2 | Description=Tango 3 | 4 | [Background] 5 | Color=0,0,0 6 | 7 | [BackgroundIntense] 8 | Color=104,104,104 9 | 10 | [Foreground] 11 | ;Color=211,215,207 12 | Color=255,255,255 13 | 14 | [ForegroundIntense] 15 | Color=255,255,255 16 | 17 | ; black 18 | [Color0] 19 | Color=0,0,0 20 | 21 | [Color0Intense] 22 | Color=85,87,83 23 | 24 | ; red 25 | [Color1] 26 | Color=204,0,0 27 | 28 | [Color1Intense] 29 | Color=239,41,41 30 | 31 | ; green 32 | [Color2] 33 | Color=78,154,6 34 | 35 | [Color2Intense] 36 | Color=138,226,52 37 | 38 | ; yellow 39 | [Color3] 40 | Color=196,160,0 41 | 42 | [Color3Intense] 43 | Color=252,233,79 44 | 45 | ; blue 46 | [Color4] 47 | Color=52,101,164 48 | 49 | [Color4Intense] 50 | Color=114,159,207 51 | 52 | ; magenta 53 | [Color5] 54 | Color=117,80,123 55 | 56 | [Color5Intense] 57 | Color=173,127,168 58 | 59 | ; aqua 60 | [Color6] 61 | Color=6,152,154 62 | 63 | [Color6Intense] 64 | Color=52,226,226 65 | 66 | ; grey 67 | [Color7] 68 | Color=211,215,207 69 | 70 | [Color7Intense] 71 | Color=238,238,236 72 | -------------------------------------------------------------------------------- /data/color-schemes/Ubuntu.colorscheme: -------------------------------------------------------------------------------- 1 | [General] 2 | Description=Ubuntu 3 | Opacity=1 4 | Wallpaper= 5 | 6 | [Background] 7 | Color=48,10,36 8 | MaxRandomHue=0 9 | MaxRandomSaturation=0 10 | MaxRandomValue=0 11 | 12 | [BackgroundIntense] 13 | Color=48,10,36 14 | 15 | [Color0] 16 | Color=46,52,54 17 | 18 | [Color0Intense] 19 | Color=85,87,83 20 | 21 | [Color1] 22 | Color=204,0,0 23 | 24 | [Color1Intense] 25 | Color=239,41,41 26 | 27 | [Color2] 28 | Color=78,154,6 29 | 30 | [Color2Intense] 31 | Color=138,226,52 32 | 33 | [Color3] 34 | Color=196,160,0 35 | 36 | [Color3Intense] 37 | Color=252,233,79 38 | 39 | [Color4] 40 | Color=52,101,164 41 | 42 | [Color4Intense] 43 | Color=114,159,207 44 | 45 | [Color5] 46 | Color=117,80,123 47 | 48 | [Color5Intense] 49 | Color=173,127,168 50 | 51 | [Color6] 52 | Color=6,152,154 53 | 54 | [Color6Intense] 55 | Color=52,226,226 56 | 57 | [Color7] 58 | Color=211,215,207 59 | 60 | [Color7Intense] 61 | Color=238,238,236 62 | 63 | [Foreground] 64 | Color=238,238,236 65 | 66 | [ForegroundIntense] 67 | Color=238,238,236 -------------------------------------------------------------------------------- /data/color-schemes/WhiteOnBlack.colorscheme: -------------------------------------------------------------------------------- 1 | [Background] 2 | Color=0,0,0 3 | 4 | [BackgroundIntense] 5 | Color=0,0,0 6 | 7 | [BackgroundFaint] 8 | Color=0,0,0 9 | 10 | [Color0] 11 | Color=0,0,0 12 | 13 | [Color0Intense] 14 | Color=104,104,104 15 | 16 | [Color0Faint] 17 | Color=24,24,24 18 | 19 | [Color1] 20 | Color=178,24,24 21 | 22 | [Color1Intense] 23 | Color=255,84,84 24 | 25 | [Color1Faint] 26 | Color=101,0,0 27 | 28 | [Color2] 29 | Color=24,178,24 30 | 31 | [Color2Intense] 32 | Color=84,255,84 33 | 34 | [Color2Faint] 35 | Color=0,101,0 36 | 37 | [Color3] 38 | Color=178,104,24 39 | 40 | [Color3Intense] 41 | Color=255,255,84 42 | 43 | [Color3Faint] 44 | Color=101,74,0 45 | 46 | [Color4] 47 | Color=24,24,178 48 | 49 | [Color4Intense] 50 | Color=84,84,255 51 | 52 | [Color4Faint] 53 | Color=0,0,101 54 | 55 | [Color5] 56 | Color=178,24,178 57 | 58 | [Color5Intense] 59 | Color=255,84,255 60 | 61 | [Color5Faint] 62 | Color=95,5,95 63 | 64 | [Color6] 65 | Color=24,178,178 66 | 67 | [Color6Intense] 68 | Color=84,255,255 69 | 70 | [Color6Faint] 71 | Color=24,178,178 72 | 73 | [Color7] 74 | Color=178,178,178 75 | 76 | [Color7Intense] 77 | Color=255,255,255 78 | 79 | [Color7Faint] 80 | Color=101,101,101 81 | 82 | [Foreground] 83 | Color=255,255,255 84 | 85 | [ForegroundIntense] 86 | Bold=true 87 | Color=255,255,255 88 | 89 | [ForegroundFaint] 90 | Color=255,255,255 91 | 92 | [General] 93 | Description=White on Black 94 | Opacity=1 95 | -------------------------------------------------------------------------------- /data/color-schemes/WhiteOnBlack.schema: -------------------------------------------------------------------------------- 1 | # example scheme for konsole 2 | 3 | # the title is to appear in the menu. 4 | 5 | title White on Black 6 | 7 | # foreground colors 8 | 9 | # note that the default background color is flagged 10 | # to become transparent when an image is present. 11 | 12 | # slot transparent bold 13 | # | | | 14 | # V V--color--V V V 15 | 16 | color 0 255 255 255 0 0 # regular foreground color (White) 17 | color 1 0 0 0 1 0 # regular background color (Black) 18 | 19 | color 2 0 0 0 0 0 # regular color 0 Black 20 | color 3 178 24 24 0 0 # regular color 1 Red 21 | color 4 24 178 24 0 0 # regular color 2 Green 22 | color 5 178 104 24 0 0 # regular color 3 Yellow 23 | color 6 24 24 178 0 0 # regular color 4 Blue 24 | color 7 178 24 178 0 0 # regular color 5 Magenta 25 | color 8 24 178 178 0 0 # regular color 6 Cyan 26 | color 9 178 178 178 0 0 # regular color 7 White 27 | 28 | # intensive colors 29 | 30 | # instead of changing the colors, we've flaged the text to become bold 31 | 32 | color 10 255 255 255 0 1 # intensive foreground color 33 | color 11 0 0 0 1 0 # intensive background color 34 | 35 | color 12 104 104 104 0 0 # intensive color 0 36 | color 13 255 84 84 0 0 # intensive color 1 37 | color 14 84 255 84 0 0 # intensive color 2 38 | color 15 255 255 84 0 0 # intensive color 3 39 | color 16 84 84 255 0 0 # intensive color 4 40 | color 17 255 84 255 0 0 # intensive color 5 41 | color 18 84 255 255 0 0 # intensive color 6 42 | color 19 255 255 255 0 0 # intensive color 7 43 | -------------------------------------------------------------------------------- /data/color-schemes/historic/BlackOnLightColor.schema: -------------------------------------------------------------------------------- 1 | # example scheme for konsole 2 | 3 | # the title is to appear in the menu. 4 | 5 | title Black on Light Color 6 | 7 | # foreground colors 8 | 9 | # note that the default background color is flagged 10 | # to become transparent when an image is present. 11 | 12 | # slot transparent bold 13 | # | | | 14 | # V V--color--V V V 15 | 16 | color 0 0 0 0 0 0 # regular foreground color (Black) 17 | rcolor 1 30 255 1 0 # regular background color (Light Color) 18 | 19 | color 2 0 0 0 0 0 # regular color 0 Black 20 | color 3 178 24 24 0 0 # regular color 1 Red 21 | color 4 24 178 24 0 0 # regular color 2 Green 22 | color 5 178 104 24 0 0 # regular color 3 Yellow 23 | color 6 24 24 178 0 0 # regular color 4 Blue 24 | color 7 178 24 178 0 0 # regular color 5 Magenta 25 | color 8 24 178 178 0 0 # regular color 6 Cyan 26 | color 9 178 178 178 0 0 # regular color 7 White 27 | 28 | # intensive colors 29 | 30 | # instead of changing the colors, we've flaged the text to become bold 31 | 32 | color 10 0 0 0 0 1 # intensive foreground color 33 | color 11 255 255 221 1 0 # intensive background color 34 | 35 | color 12 104 104 104 0 0 # intensive color 0 36 | color 13 255 84 84 0 0 # intensive color 1 37 | color 14 84 255 84 0 0 # intensive color 2 38 | color 15 255 255 84 0 0 # intensive color 3 39 | color 16 84 84 255 0 0 # intensive color 4 40 | color 17 255 84 255 0 0 # intensive color 5 41 | color 18 84 255 255 0 0 # intensive color 6 42 | color 19 255 255 255 0 0 # intensive color 7 43 | -------------------------------------------------------------------------------- /data/color-schemes/historic/BlackOnLightYellow.schema: -------------------------------------------------------------------------------- 1 | # example scheme for konsole 2 | 3 | # the title is to appear in the menu. 4 | 5 | title Black on Light Yellow 6 | 7 | # foreground colors 8 | 9 | # note that the default background color is flagged 10 | # to become transparent when an image is present. 11 | 12 | # slot transparent bold 13 | # | | | 14 | # V V--color--V V V 15 | 16 | color 0 0 0 0 0 0 # regular foreground color (Black) 17 | color 1 255 255 221 1 0 # regular background color (Light Yellow) 18 | 19 | color 2 0 0 0 0 0 # regular color 0 Black 20 | color 3 178 24 24 0 0 # regular color 1 Red 21 | color 4 24 178 24 0 0 # regular color 2 Green 22 | color 5 178 104 24 0 0 # regular color 3 Yellow 23 | color 6 24 24 178 0 0 # regular color 4 Blue 24 | color 7 178 24 178 0 0 # regular color 5 Magenta 25 | color 8 24 178 178 0 0 # regular color 6 Cyan 26 | color 9 178 178 178 0 0 # regular color 7 White 27 | 28 | # intensive colors 29 | 30 | # instead of changing the colors, we've flaged the text to become bold 31 | 32 | color 10 0 0 0 0 1 # intensive foreground color 33 | color 11 255 255 221 1 0 # intensive background color 34 | 35 | color 12 104 104 104 0 0 # intensive color 0 36 | color 13 255 84 84 0 0 # intensive color 1 37 | color 14 84 255 84 0 0 # intensive color 2 38 | color 15 255 255 84 0 0 # intensive color 3 39 | color 16 84 84 255 0 0 # intensive color 4 40 | color 17 255 84 255 0 0 # intensive color 5 41 | color 18 84 255 255 0 0 # intensive color 6 42 | color 19 255 255 255 0 0 # intensive color 7 43 | -------------------------------------------------------------------------------- /data/color-schemes/historic/BlackOnWhite.schema: -------------------------------------------------------------------------------- 1 | # example scheme for konsole 2 | 3 | # the title is to appear in the menu. 4 | 5 | title Black on White 6 | 7 | # foreground colors 8 | 9 | # note that the default background color is flagged 10 | # to become transparent when an image is present. 11 | 12 | # slot transparent bold 13 | # | | | 14 | # V V--color--V V V 15 | 16 | color 0 0 0 0 0 0 # regular foreground color (Black) 17 | color 1 255 255 255 1 0 # regular background color (White) 18 | 19 | color 2 0 0 0 0 0 # regular color 0 Black 20 | color 3 178 24 24 0 0 # regular color 1 Red 21 | color 4 24 178 24 0 0 # regular color 2 Green 22 | color 5 178 104 24 0 0 # regular color 3 Yellow 23 | color 6 24 24 178 0 0 # regular color 4 Blue 24 | color 7 178 24 178 0 0 # regular color 5 Magenta 25 | color 8 24 178 178 0 0 # regular color 6 Cyan 26 | color 9 178 178 178 0 0 # regular color 7 White 27 | 28 | # intensive colors 29 | 30 | # instead of changing the colors, we've flaged the text to become bold 31 | 32 | color 10 0 0 0 0 1 # intensive foreground color 33 | color 11 255 255 255 1 0 # intensive background color 34 | 35 | color 12 104 104 104 0 0 # intensive color 0 36 | color 13 255 84 84 0 0 # intensive color 1 37 | color 14 84 255 84 0 0 # intensive color 2 38 | color 15 255 255 84 0 0 # intensive color 3 39 | color 16 84 84 255 0 0 # intensive color 4 40 | color 17 255 84 255 0 0 # intensive color 5 41 | color 18 84 255 255 0 0 # intensive color 6 42 | color 19 255 255 255 0 0 # intensive color 7 43 | -------------------------------------------------------------------------------- /data/color-schemes/historic/DarkPicture.schema: -------------------------------------------------------------------------------- 1 | # example scheme for konsole 2 | 3 | # the title is to appear in the menu. 4 | 5 | title Marble 6 | 7 | image tile Blkmarble.jpg 8 | 9 | # foreground colors 10 | 11 | # note that the default background color is flagged 12 | # to become transparent when an image is present. 13 | 14 | # slot transparent bold 15 | # | | | 16 | # V V--color--V V V 17 | 18 | color 0 255 255 255 0 0 # regular foreground color (White) 19 | color 1 0 0 0 1 0 # regular background color (Black) 20 | 21 | color 2 0 0 0 0 0 # regular color 0 Black 22 | color 3 178 24 24 0 0 # regular color 1 Red 23 | color 4 24 178 24 0 0 # regular color 2 Green 24 | color 5 178 104 24 0 0 # regular color 3 Yellow 25 | color 6 24 24 178 0 0 # regular color 4 Blue 26 | color 7 178 24 178 0 0 # regular color 5 Magenta 27 | color 8 24 178 178 0 0 # regular color 6 Cyan 28 | color 9 178 178 178 0 0 # regular color 7 White 29 | 30 | # intensive colors 31 | 32 | # instead of changing the colors, we've flaged the text to become bold 33 | 34 | color 10 255 255 255 0 1 # intensive foreground color 35 | color 11 0 0 0 1 0 # intensive background color 36 | 37 | color 12 104 104 104 0 0 # intensive color 0 38 | color 13 255 84 84 0 0 # intensive color 1 39 | color 14 84 255 84 0 0 # intensive color 2 40 | color 15 255 255 84 0 0 # intensive color 3 41 | color 16 84 84 255 0 0 # intensive color 4 42 | color 17 255 84 255 0 0 # intensive color 5 43 | color 18 84 255 255 0 0 # intensive color 6 44 | color 19 255 255 255 0 0 # intensive color 7 45 | -------------------------------------------------------------------------------- /data/color-schemes/historic/Example.Schema: -------------------------------------------------------------------------------- 1 | # example scheme for konsole 2 | 3 | # the title is to appear in the menu. 4 | 5 | title Ugly 1 6 | 7 | # add a wallpaper, if you like. Second word one of { tile,center,full } 8 | 9 | image tile /opt/kde/share/wallpapers/dancy_pants.jpg 10 | 11 | 12 | # foreground colors 13 | 14 | # note that the default background color is flagged 15 | # to become transparent when an image is present. 16 | 17 | # slot transparent bold 18 | # | | | 19 | # V V--color--V V V 20 | 21 | color 0 0 0 0 0 0 # regular foreground color (Black) 22 | color 1 255 255 255 1 0 # regular background color (White) 23 | 24 | color 2 0 0 0 0 0 # regular color 0 Black 25 | color 3 255 0 0 0 0 # regular color 1 Red 26 | color 4 0 255 0 0 0 # regular color 2 Green 27 | color 5 255 255 0 0 0 # regular color 3 Yellow 28 | color 6 0 0 255 0 0 # regular color 4 Blue 29 | color 7 255 0 255 0 0 # regular color 5 Magenta 30 | color 8 0 255 255 0 0 # regular color 6 Cyan 31 | color 9 255 255 255 0 0 # regular color 7 White 32 | 33 | # intensive colors 34 | 35 | # instead of changing the colors, we've flaged the text to become bold 36 | 37 | color 10 0 0 0 0 1 # intensive foreground color 38 | color 11 255 255 255 1 1 # intensive background color 39 | 40 | color 12 0 0 0 0 1 # intensive color 0 41 | color 13 255 0 0 0 1 # intensive color 1 42 | color 14 0 255 0 0 1 # intensive color 2 43 | color 15 255 255 0 0 1 # intensive color 3 44 | color 16 0 0 255 0 1 # intensive color 4 45 | color 17 255 0 255 0 1 # intensive color 5 46 | color 18 0 255 255 0 1 # intensive color 6 47 | color 19 255 255 255 0 1 # intensive color 7 48 | -------------------------------------------------------------------------------- /data/color-schemes/historic/GreenOnBlack.schema: -------------------------------------------------------------------------------- 1 | # example scheme for konsole 2 | 3 | # the title is to appear in the menu. 4 | 5 | title Green on Black 6 | 7 | # foreground colors 8 | 9 | # note that the default background color is flagged 10 | # to become transparent when an image is present. 11 | 12 | # slot transparent bold 13 | # | | | 14 | # V V--color--V V V 15 | 16 | color 0 24 240 24 0 0 # regular foreground color (Green) 17 | color 1 0 0 0 1 0 # regular background color (Black) 18 | 19 | color 2 0 0 0 0 0 # regular color 0 Black 20 | color 3 178 24 24 0 0 # regular color 1 Red 21 | color 4 24 178 24 0 0 # regular color 2 Green 22 | color 5 178 104 24 0 0 # regular color 3 Yellow 23 | color 6 24 24 178 0 0 # regular color 4 Blue 24 | color 7 178 24 178 0 0 # regular color 5 Magenta 25 | color 8 24 178 178 0 0 # regular color 6 Cyan 26 | color 9 178 178 178 0 0 # regular color 7 White 27 | 28 | # intensive colors 29 | 30 | # instead of changing the colors, we've flaged the text to become bold 31 | 32 | color 10 24 240 24 0 1 # intensive foreground color 33 | color 11 0 0 0 1 0 # intensive background color 34 | 35 | color 12 104 104 104 0 0 # intensive color 0 36 | color 13 255 84 84 0 0 # intensive color 1 37 | color 14 84 255 84 0 0 # intensive color 2 38 | color 15 255 255 84 0 0 # intensive color 3 39 | color 16 84 84 255 0 0 # intensive color 4 40 | color 17 255 84 255 0 0 # intensive color 5 41 | color 18 84 255 255 0 0 # intensive color 6 42 | color 19 255 255 255 0 0 # intensive color 7 43 | -------------------------------------------------------------------------------- /data/color-schemes/historic/GreenTint.schema: -------------------------------------------------------------------------------- 1 | # linux color schema for konsole 2 | 3 | title Green Tint 4 | 5 | transparency 0.3 0 150 0 6 | 7 | # FIXME 8 | # 9 | # The flaw in this schema is that "blick" comes out on the 10 | # Linux console as intensive background, really. 11 | # Since this is not used in clients you'll hardly notice 12 | # it in practice. 13 | 14 | # foreground colors 15 | 16 | # note that the default background color is flagged 17 | # to become transparent when an image is present. 18 | 19 | # slot transparent bold 20 | # | red grn blu | | 21 | # V V--color--V V V 22 | 23 | color 0 178 178 178 0 0 # regular foreground color (White) 24 | color 1 0 0 0 1 0 # regular background color (Black) 25 | 26 | color 2 0 0 0 0 0 # regular color 0 Black 27 | color 3 178 24 24 0 0 # regular color 1 Red 28 | color 4 24 178 24 0 0 # regular color 2 Green 29 | color 5 178 104 24 0 0 # regular color 3 Yellow 30 | color 6 24 24 178 0 0 # regular color 4 Blue 31 | color 7 178 24 178 0 0 # regular color 5 Magenta 32 | color 8 24 178 178 0 0 # regular color 6 Cyan 33 | color 9 178 178 178 0 0 # regular color 7 White 34 | 35 | # intensive colors 36 | 37 | # instead of changing the colors, we've flaged the text to become bold 38 | 39 | color 10 255 255 255 0 0 # intensive foreground color 40 | color 11 104 104 104 1 0 # intensive background color 41 | 42 | color 12 104 104 104 0 0 # intensive color 0 43 | color 13 255 84 84 0 0 # intensive color 1 44 | color 14 84 255 84 0 0 # intensive color 2 45 | color 15 255 255 84 0 0 # intensive color 3 46 | color 16 84 84 255 0 0 # intensive color 4 47 | color 17 255 84 255 0 0 # intensive color 5 48 | color 18 84 255 255 0 0 # intensive color 6 49 | color 19 255 255 255 0 0 # intensive color 7 50 | -------------------------------------------------------------------------------- /data/color-schemes/historic/GreenTint_MC.schema: -------------------------------------------------------------------------------- 1 | # linux color schema for konsole 2 | 3 | title Green Tint with Transparent MC 4 | 5 | transparency 0.3 0 150 0 6 | 7 | # FIXME 8 | # 9 | # The flaw in this schema is that "blick" comes out on the 10 | # Linux console as intensive background, really. 11 | # Since this is not used in clients you'll hardly notice 12 | # it in practice. 13 | 14 | # foreground colors 15 | 16 | # note that the default background color is flagged 17 | # to become transparent when an image is present. 18 | 19 | # slot transparent bold 20 | # | red grn blu | | 21 | # V V--color--V V V 22 | 23 | color 0 178 178 178 0 0 # regular foreground color (White) 24 | color 1 0 0 0 1 0 # regular background color (Black) 25 | 26 | color 2 0 0 0 0 0 # regular color 0 Black 27 | color 3 178 24 24 0 0 # regular color 1 Red 28 | color 4 24 178 24 0 0 # regular color 2 Green 29 | color 5 178 104 24 0 0 # regular color 3 Yellow 30 | color 6 0 0 0 1 0 # regular color 4 Blue 31 | color 7 178 24 178 0 0 # regular color 5 Magenta 32 | color 8 24 178 178 0 0 # regular color 6 Cyan 33 | color 9 178 178 178 0 0 # regular color 7 White 34 | 35 | # intensive colors 36 | 37 | # instead of changing the colors, we've flaged the text to become bold 38 | 39 | color 10 255 255 255 0 0 # intensive foreground color 40 | color 11 104 104 104 1 0 # intensive background color 41 | 42 | color 12 104 104 104 0 0 # intensive color 0 43 | color 13 255 84 84 0 0 # intensive color 1 44 | color 14 84 255 84 0 0 # intensive color 2 45 | color 15 255 255 84 0 0 # intensive color 3 46 | color 16 84 84 255 0 0 # intensive color 4 47 | color 17 255 84 255 0 0 # intensive color 5 48 | color 18 84 255 255 0 0 # intensive color 6 49 | color 19 255 255 255 0 0 # intensive color 7 50 | -------------------------------------------------------------------------------- /data/color-schemes/historic/LightPicture.schema: -------------------------------------------------------------------------------- 1 | # example scheme for konsole 2 | 3 | # the title is to appear in the menu. 4 | 5 | title Paper 6 | 7 | image tile Paper01.jpg 8 | 9 | # foreground colors 10 | 11 | # note that the default background color is flagged 12 | # to become transparent when an image is present. 13 | 14 | # slot transparent bold 15 | # | | | 16 | # V V--color--V V V 17 | 18 | color 0 0 0 0 0 0 # regular foreground color (Black) 19 | color 1 255 255 255 1 0 # regular background color (White) 20 | 21 | color 2 0 0 0 0 0 # regular color 0 Black 22 | color 3 178 24 24 0 0 # regular color 1 Red 23 | color 4 24 178 24 0 0 # regular color 2 Green 24 | color 5 178 104 24 0 0 # regular color 3 Yellow 25 | color 6 24 24 178 0 0 # regular color 4 Blue 26 | color 7 178 24 178 0 0 # regular color 5 Magenta 27 | color 8 24 178 178 0 0 # regular color 6 Cyan 28 | color 9 178 178 178 0 0 # regular color 7 White 29 | 30 | # intensive colors 31 | 32 | # instead of changing the colors, we've flaged the text to become bold 33 | 34 | color 10 0 0 0 0 1 # intensive foreground color 35 | color 11 255 255 255 1 0 # intensive background color 36 | 37 | color 12 104 104 104 0 0 # intensive color 0 38 | color 13 255 84 84 0 0 # intensive color 1 39 | color 14 84 255 84 0 0 # intensive color 2 40 | color 15 255 255 84 0 0 # intensive color 3 41 | color 16 84 84 255 0 0 # intensive color 4 42 | color 17 255 84 255 0 0 # intensive color 5 43 | color 18 84 255 255 0 0 # intensive color 6 44 | color 19 255 255 255 0 0 # intensive color 7 45 | -------------------------------------------------------------------------------- /data/color-schemes/historic/Linux.schema: -------------------------------------------------------------------------------- 1 | # linux color schema for konsole 2 | 3 | title Linux Colors 4 | 5 | # FIXME 6 | # 7 | # The flaw in this schema is that "blick" comes out on the 8 | # Linux console as intensive background, really. 9 | # Since this is not used in clients you'll hardly notice 10 | # it in practice. 11 | 12 | # foreground colors 13 | 14 | # note that the default background color is flagged 15 | # to become transparent when an image is present. 16 | 17 | # slot transparent bold 18 | # | red grn blu | | 19 | # V V--color--V V V 20 | 21 | color 0 178 178 178 0 0 # regular foreground color (White) 22 | color 1 0 0 0 1 0 # regular background color (Black) 23 | 24 | color 2 0 0 0 0 0 # regular color 0 Black 25 | color 3 178 24 24 0 0 # regular color 1 Red 26 | color 4 24 178 24 0 0 # regular color 2 Green 27 | color 5 178 104 24 0 0 # regular color 3 Yellow 28 | color 6 24 24 178 0 0 # regular color 4 Blue 29 | color 7 178 24 178 0 0 # regular color 5 Magenta 30 | color 8 24 178 178 0 0 # regular color 6 Cyan 31 | color 9 178 178 178 0 0 # regular color 7 White 32 | 33 | # intensive colors 34 | 35 | # instead of changing the colors, we've flaged the text to become bold 36 | 37 | color 10 255 255 255 0 0 # intensive foreground color 38 | color 11 104 104 104 1 0 # intensive background color 39 | 40 | color 12 104 104 104 0 0 # intensive color 0 41 | color 13 255 84 84 0 0 # intensive color 1 42 | color 14 84 255 84 0 0 # intensive color 2 43 | color 15 255 255 84 0 0 # intensive color 3 44 | color 16 84 84 255 0 0 # intensive color 4 45 | color 17 255 84 255 0 0 # intensive color 5 46 | color 18 84 255 255 0 0 # intensive color 6 47 | color 19 255 255 255 0 0 # intensive color 7 48 | -------------------------------------------------------------------------------- /data/color-schemes/historic/README.default.Schema: -------------------------------------------------------------------------------- 1 | # default scheme for konsole (only here for documentation purposes) 2 | 3 | # the title is to appear in the menu. 4 | 5 | title Konsole Defaults 6 | 7 | # image tile /opt/kde/share/wallpapers/gray2.jpg 8 | 9 | # foreground colors 10 | 11 | # note that the default background color is flagged 12 | # to become transparent when an image is present. 13 | 14 | # slot transparent bold 15 | # | | | 16 | # V V--color--V V V 17 | 18 | color 0 0 0 0 0 0 # regular foreground color (Black) 19 | color 1 255 255 255 1 0 # regular background color (White) 20 | 21 | color 2 0 0 0 0 0 # regular color 0 Black 22 | color 3 178 24 24 0 0 # regular color 1 Red 23 | color 4 24 178 24 0 0 # regular color 2 Green 24 | color 5 178 104 24 0 0 # regular color 3 Yellow 25 | color 6 24 24 178 0 0 # regular color 4 Blue 26 | color 7 178 24 178 0 0 # regular color 5 Magenta 27 | color 8 24 178 178 0 0 # regular color 6 Cyan 28 | color 9 178 178 178 0 0 # regular color 7 White 29 | 30 | # intensive colors 31 | 32 | # instead of changing the colors, we've flaged the text to become bold 33 | 34 | color 10 0 0 0 0 1 # intensive foreground color 35 | color 11 255 255 255 1 0 # intensive background color 36 | 37 | color 12 104 104 104 0 0 # intensive color 0 38 | color 13 255 84 84 0 0 # intensive color 1 39 | color 14 84 255 84 0 0 # intensive color 2 40 | color 15 255 255 84 0 0 # intensive color 3 41 | color 16 84 84 255 0 0 # intensive color 4 42 | color 17 255 84 255 0 0 # intensive color 5 43 | color 18 84 255 255 0 0 # intensive color 6 44 | color 19 255 255 255 0 0 # intensive color 7 45 | -------------------------------------------------------------------------------- /data/color-schemes/historic/Transparent.schema: -------------------------------------------------------------------------------- 1 | # linux color schema for konsole 2 | 3 | title Transparent Konsole 4 | 5 | transparency 0.35 0 0 0 6 | 7 | # FIXME 8 | # 9 | # The flaw in this schema is that "blick" comes out on the 10 | # Linux console as intensive background, really. 11 | # Since this is not used in clients you'll hardly notice 12 | # it in practice. 13 | 14 | # foreground colors 15 | 16 | # note that the default background color is flagged 17 | # to become transparent when an image is present. 18 | 19 | # slot transparent bold 20 | # | red grn blu | | 21 | # V V--color--V V V 22 | 23 | color 0 178 178 178 0 0 # regular foreground color (White) 24 | color 1 0 0 0 1 0 # regular background color (Black) 25 | 26 | color 2 0 0 0 0 0 # regular color 0 Black 27 | color 3 178 24 24 0 0 # regular color 1 Red 28 | color 4 24 178 24 0 0 # regular color 2 Green 29 | color 5 178 104 24 0 0 # regular color 3 Yellow 30 | color 6 24 24 178 0 0 # regular color 4 Blue 31 | color 7 178 24 178 0 0 # regular color 5 Magenta 32 | color 8 24 178 178 0 0 # regular color 6 Cyan 33 | color 9 178 178 178 0 0 # regular color 7 White 34 | 35 | # intensive colors 36 | 37 | # instead of changing the colors, we've flaged the text to become bold 38 | 39 | color 10 255 255 255 0 0 # intensive foreground color 40 | color 11 104 104 104 1 0 # intensive background color 41 | 42 | color 12 104 104 104 0 0 # intensive color 0 43 | color 13 255 84 84 0 0 # intensive color 1 44 | color 14 84 255 84 0 0 # intensive color 2 45 | color 15 255 255 84 0 0 # intensive color 3 46 | color 16 84 84 255 0 0 # intensive color 4 47 | color 17 255 84 255 0 0 # intensive color 5 48 | color 18 84 255 255 0 0 # intensive color 6 49 | color 19 255 255 255 0 0 # intensive color 7 50 | -------------------------------------------------------------------------------- /data/color-schemes/historic/Transparent_MC.schema: -------------------------------------------------------------------------------- 1 | # linux color schema for konsole 2 | 3 | title Transparent for MC 4 | 5 | transparency 0.35 0 0 0 6 | 7 | # FIXME 8 | # 9 | # The flaw in this schema is that "blick" comes out on the 10 | # Linux console as intensive background, really. 11 | # Since this is not used in clients you'll hardly notice 12 | # it in practice. 13 | 14 | # foreground colors 15 | 16 | # note that the default background color is flagged 17 | # to become transparent when an image is present. 18 | 19 | # slot transparent bold 20 | # | red grn blu | | 21 | # V V--color--V V V 22 | 23 | color 0 178 178 178 0 0 # regular foreground color (White) 24 | color 1 0 0 0 1 0 # regular background color (Black) 25 | 26 | color 2 0 0 0 0 0 # regular color 0 Black 27 | color 3 178 24 24 0 0 # regular color 1 Red 28 | color 4 24 178 24 0 0 # regular color 2 Green 29 | color 5 178 104 24 0 0 # regular color 3 Yellow 30 | #color 6 24 24 178 0 0 # regular color 4 Blue 31 | color 6 0 0 0 1 0 # regular color 4 Blue 32 | 33 | color 7 178 24 178 0 0 # regular color 5 Magenta 34 | color 8 24 178 178 0 0 # regular color 6 Cyan 35 | color 9 178 178 178 0 0 # regular color 7 White 36 | 37 | # intensive colors 38 | 39 | # instead of changing the colors, we've flaged the text to become bold 40 | 41 | color 10 255 255 255 0 0 # intensive foreground color 42 | color 11 104 104 104 1 0 # intensive background color 43 | 44 | color 12 104 104 104 0 0 # intensive color 0 45 | color 13 255 84 84 0 0 # intensive color 1 46 | color 14 84 255 84 0 0 # intensive color 2 47 | color 15 255 255 84 0 0 # intensive color 3 48 | color 16 84 84 255 0 0 # intensive color 4 49 | color 17 255 84 255 0 0 # intensive color 5 50 | color 18 84 255 255 0 0 # intensive color 6 51 | color 19 255 255 255 0 0 # intensive color 7 52 | -------------------------------------------------------------------------------- /data/color-schemes/historic/Transparent_darkbg.schema: -------------------------------------------------------------------------------- 1 | # linux color schema for konsole 2 | 3 | title Transparent, Dark Background 4 | 5 | transparency 0.75 0 0 0 6 | 7 | # foreground colors 8 | 9 | # note that the default background color is flagged 10 | # to become transparent when an image is present. 11 | 12 | # slot transparent bold 13 | # | red grn blu | | 14 | # V V--color--V V V 15 | 16 | color 0 255 255 255 0 0 # regular foreground color (White) 17 | color 1 0 0 0 1 0 # regular background color (Black) 18 | 19 | color 2 0 0 0 0 0 # regular color 0 Black 20 | color 3 178 24 24 0 0 # regular color 1 Red 21 | color 4 24 178 24 0 0 # regular color 2 Green 22 | color 5 178 104 24 0 0 # regular color 3 Yellow 23 | color 6 24 24 178 0 0 # regular color 4 Blue 24 | color 7 178 24 178 0 0 # regular color 5 Magenta 25 | color 8 24 178 178 0 0 # regular color 6 Cyan 26 | color 9 178 178 178 0 0 # regular color 7 White 27 | 28 | # intensive colors 29 | 30 | # instead of changing the colors, we've flaged the text to become bold 31 | 32 | color 10 255 255 255 0 0 # intensive foreground color 33 | color 11 104 104 104 1 0 # intensive background color 34 | 35 | color 12 104 104 104 0 0 # intensive color 0 36 | color 13 255 84 84 0 0 # intensive color 1 37 | color 14 84 255 84 0 0 # intensive color 2 38 | color 15 255 255 84 0 0 # intensive color 3 39 | color 16 84 84 255 0 0 # intensive color 4 40 | color 17 255 84 255 0 0 # intensive color 5 41 | color 18 84 255 255 0 0 # intensive color 6 42 | color 19 255 255 255 0 0 # intensive color 7 43 | -------------------------------------------------------------------------------- /data/color-schemes/historic/Transparent_lightbg.schema: -------------------------------------------------------------------------------- 1 | # linux color schema for konsole 2 | 3 | title Transparent, Light Background 4 | 5 | transparency 0.1 0 0 0 6 | 7 | # This is a schema for very light backgrounds. It makes some 8 | # hacks about the colors to make Midnight Commander transparent 9 | # and with suitable colors. 10 | 11 | # foreground colors 12 | 13 | # note that the default background color is flagged 14 | # to become transparent when an image is present. 15 | 16 | # slot transparent bold 17 | # | red grn blu | | 18 | # V V--color--V V V 19 | 20 | color 0 50 50 50 0 0 # regular foreground color (DarkGray) 21 | color 1 200 200 200 1 0 # regular background color (White) 22 | 23 | # color 2 0 0 0 0 0 # regular color 0 Black 24 | color 2 200 200 200 1 0 # regular background color (White) 25 | color 3 178 24 24 0 0 # regular color 1 Red 26 | color 4 24 178 24 0 0 # regular color 2 Green 27 | color 5 178 104 24 0 0 # regular color 3 Yellow 28 | #color 6 24 24 178 0 0 # regular color 4 Blue 29 | color 6 0 0 0 1 0 # regular color 4 Blue 30 | # Blue is transparent, to make MC transparent 31 | 32 | color 7 178 24 178 0 0 # regular color 5 Magenta 33 | color 8 24 178 178 0 0 # regular color 6 Cyan 34 | # color 9 178 178 178 0 0 # regular color 7 White 35 | color 9 50 50 50 0 0 # regular foreground color (DarkGray) 36 | 37 | # intensive colors 38 | 39 | # instead of changing the colors, we've flaged the text to become bold 40 | 41 | color 10 0 0 0 0 0 # intensive foreground color 42 | color 11 255 255 255 1 0 # intensive background color 43 | 44 | color 12 104 104 104 0 0 # intensive color 0 45 | color 13 255 84 84 0 0 # intensive color 1 46 | color 14 84 255 84 0 0 # intensive color 2 47 | color 15 255 255 84 0 0 # intensive color 3 48 | color 16 84 84 255 0 0 # intensive color 4 49 | color 17 255 84 255 0 0 # intensive color 5 50 | color 18 84 255 255 0 0 # intensive color 6 51 | color 19 255 255 255 0 0 # intensive color 7 52 | -------------------------------------------------------------------------------- /data/color-schemes/historic/WhiteOnBlack.schema: -------------------------------------------------------------------------------- 1 | # example scheme for konsole 2 | 3 | # the title is to appear in the menu. 4 | 5 | title White on Black 6 | 7 | # foreground colors 8 | 9 | # note that the default background color is flagged 10 | # to become transparent when an image is present. 11 | 12 | # slot transparent bold 13 | # | | | 14 | # V V--color--V V V 15 | 16 | color 0 255 255 255 0 0 # regular foreground color (White) 17 | color 1 0 0 0 1 0 # regular background color (Black) 18 | 19 | color 2 0 0 0 0 0 # regular color 0 Black 20 | color 3 178 24 24 0 0 # regular color 1 Red 21 | color 4 24 178 24 0 0 # regular color 2 Green 22 | color 5 178 104 24 0 0 # regular color 3 Yellow 23 | color 6 24 24 178 0 0 # regular color 4 Blue 24 | color 7 178 24 178 0 0 # regular color 5 Magenta 25 | color 8 24 178 178 0 0 # regular color 6 Cyan 26 | color 9 178 178 178 0 0 # regular color 7 White 27 | 28 | # intensive colors 29 | 30 | # instead of changing the colors, we've flaged the text to become bold 31 | 32 | color 10 255 255 255 0 1 # intensive foreground color 33 | color 11 0 0 0 1 0 # intensive background color 34 | 35 | color 12 104 104 104 0 0 # intensive color 0 36 | color 13 255 84 84 0 0 # intensive color 1 37 | color 14 84 255 84 0 0 # intensive color 2 38 | color 15 255 255 84 0 0 # intensive color 3 39 | color 16 84 84 255 0 0 # intensive color 4 40 | color 17 255 84 255 0 0 # intensive color 5 41 | color 18 84 255 255 0 0 # intensive color 6 42 | color 19 255 255 255 0 0 # intensive color 7 43 | -------------------------------------------------------------------------------- /data/color-schemes/historic/XTerm.schema: -------------------------------------------------------------------------------- 1 | # xterm color schema for konsole 2 | 3 | # xterm colors can be configured (almost) like 4 | # konsole colors can. This is the uncustomized 5 | # xterm schema. 6 | # Please refere to your local xterm setup files 7 | # if this schema differs. 8 | 9 | title XTerm Colors 10 | 11 | # foreground colors ------------------------------- 12 | 13 | # note that the default background color is flagged 14 | # to become transparent when an image is present. 15 | 16 | # slot transparent bold 17 | # | red grn blu | | 18 | # V V--color--V V V 19 | 20 | color 0 0 0 0 0 0 # regular foreground color (Black) 21 | color 1 255 255 255 1 0 # regular background color (White) 22 | 23 | color 2 0 0 0 0 0 # regular color 0 Black 24 | color 3 205 0 0 0 0 # regular color 1 Red 25 | color 4 0 205 0 0 0 # regular color 2 Green 26 | color 5 205 205 0 0 0 # regular color 3 Yellow 27 | color 6 0 0 205 0 0 # regular color 4 Blue 28 | color 7 205 0 205 0 0 # regular color 5 Magenta 29 | color 8 0 205 205 0 0 # regular color 6 Cyan 30 | color 9 229 229 229 0 0 # regular color 7 White 31 | 32 | # intensive colors ------------------------------------------- 33 | 34 | # for some strange reason, intensive colors are bold, also. 35 | 36 | color 10 77 77 77 0 1 # intensive foreground color 37 | color 11 255 255 255 1 1 # intensive background color 38 | 39 | color 12 77 77 77 0 1 # intensive color 0 40 | color 13 255 0 0 0 1 # intensive color 1 41 | color 14 0 255 0 0 1 # intensive color 2 42 | color 15 255 255 0 0 1 # intensive color 3 43 | color 16 0 0 255 0 1 # intensive color 4 44 | color 17 255 0 255 0 1 # intensive color 5 45 | color 18 0 255 255 0 1 # intensive color 6 46 | color 19 255 255 255 0 1 # intensive color 7 47 | -------------------------------------------------------------------------------- /data/color-schemes/historic/syscolor.schema: -------------------------------------------------------------------------------- 1 | # schema that uses system colors 2 | 3 | # the title is to appear in the menu. 4 | 5 | title System Colors 6 | 7 | # image none 8 | 9 | # foreground colors 10 | 11 | # note that the default background color is flagged 12 | # to become transparent when an image is present. 13 | 14 | # slot transparent bold 15 | # | | | 16 | # V V--color--V V V 17 | 18 | sysfg 0 0 0 # regular foreground color (system) 19 | sysbg 1 1 0 # regular background color (system) 20 | 21 | color 2 0 0 0 0 0 # regular color 0 Black 22 | color 3 178 24 24 0 0 # regular color 1 Red 23 | color 4 24 178 24 0 0 # regular color 2 Green 24 | color 5 178 104 24 0 0 # regular color 3 Yellow 25 | color 6 24 24 178 0 0 # regular color 4 Blue 26 | color 7 178 24 178 0 0 # regular color 5 Magenta 27 | color 8 24 178 178 0 0 # regular color 6 Cyan 28 | color 9 178 178 178 0 0 # regular color 7 White 29 | 30 | # intensive colors 31 | 32 | # instead of changing the colors, we've flaged the text to become bold 33 | 34 | color 10 0 0 0 0 1 # intensive foreground color 35 | color 11 255 255 255 1 0 # intensive background color 36 | 37 | color 12 104 104 104 0 0 # intensive color 0 38 | color 13 255 84 84 0 0 # intensive color 1 39 | color 14 84 255 84 0 0 # intensive color 2 40 | color 15 255 255 84 0 0 # intensive color 3 41 | color 16 84 84 255 0 0 # intensive color 4 42 | color 17 255 84 255 0 0 # intensive color 5 43 | color 18 84 255 255 0 0 # intensive color 6 44 | color 19 255 255 255 0 0 # intensive color 7 45 | -------------------------------------------------------------------------------- /data/color-schemes/historic/vim.schema: -------------------------------------------------------------------------------- 1 | # VIM-recommended color schema for konsole 2 | 3 | # VIM (VI improved) in "help xiterm" recommends these colors for xterm. 4 | 5 | title VIM Colors 6 | 7 | # foreground colors ------------------------------- 8 | 9 | # note that the default background color is flagged 10 | # to become transparent when an image is present. 11 | 12 | # slot transparent bold 13 | # | red grn blu | | 14 | # V V--color--V V V 15 | 16 | color 0 0 0 0 0 0 # regular foreground color (Black) 17 | color 1 255 255 255 1 0 # regular background color (White) 18 | 19 | color 2 0 0 0 0 0 # regular color 0 Black 20 | color 3 192 0 0 0 0 # regular color 1 Red 21 | color 4 0 128 0 0 0 # regular color 2 Green 22 | color 5 128 128 0 0 0 # regular color 3 Yellow 23 | color 6 0 0 192 0 0 # regular color 4 Blue 24 | color 7 192 0 192 0 0 # regular color 5 Magenta 25 | color 8 0 128 128 0 0 # regular color 6 Cyan 26 | color 9 192 192 192 0 0 # regular color 7 White 27 | 28 | # intensive colors ------------------------------------------- 29 | 30 | color 10 77 77 77 0 1 # intensive foreground color 31 | color 11 255 255 255 1 1 # intensive background color 32 | 33 | color 12 128 128 128 0 0 # intensive color 0 34 | color 13 255 96 96 0 0 # intensive color 1 35 | color 14 0 255 0 0 0 # intensive color 2 36 | color 15 255 255 0 0 0 # intensive color 3 37 | color 16 128 128 255 0 0 # intensive color 4 38 | color 17 255 64 255 0 0 # intensive color 5 39 | color 18 0 255 255 0 0 # intensive color 6 40 | color 19 255 255 255 0 0 # intensive color 7 41 | -------------------------------------------------------------------------------- /data/kb-layouts/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | install( FILES 2 | default.keytab 3 | linux.keytab 4 | solaris.keytab 5 | DESTINATION 6 | ${KDE_INSTALL_DATADIR}/konsole ) 7 | -------------------------------------------------------------------------------- /data/kb-layouts/README: -------------------------------------------------------------------------------- 1 | [README.KeyTab] 2 | 3 | The keytabs offered in the Options/Keyboard menu are 4 | taken from from configurations files with a *.keytab 5 | pattern either located in $KDEDIR/share/apps/konsole 6 | or ~/.kde/share/apps/konsole. 7 | 8 | Keytabs allow to configure the behavior of konsole 9 | on keyboard events, especially for functions keys. 10 | Please have a look into the README.keyboard file, too. 11 | 12 | The syntax is that each entry has the form : 13 | 14 | "key" Keyname { ("+"|"-") Modename } ":" (String|Operation) 15 | 16 | Keynames are those defined in with the 17 | "Qt::Key_" prefix removed. 18 | 19 | Mode names are: 20 | 21 | - Shift : Shift Key pressed 22 | - Alt : Alt Key pressed 23 | - Control : Control Key pressed 24 | 25 | ( The VT100 emulation has modes that can affect the 26 | sequences emitted by certain keys. These modes are 27 | under control of the client program. 28 | 29 | - Newline : effects Return and Enter key. 30 | - Application : effects Up and Down key. 31 | - Ansi : effects Up and Down key (This is for VT52, really). 32 | 33 | Since sending a state to a program that has set the state 34 | itself is positivly wrong and obsolete design, better forget 35 | about this nasty detail. I may well remove this "feature" 36 | in a future clean up round. ) 37 | 38 | A "+" preceeding a Modename means the Key is pressed. 39 | A "-" preceeding a Modename means the Key is not pressed. 40 | If no mode is given it means don't care. 41 | 42 | Note that the combination of Key and Modes (set/reset) 43 | has to be unique. This means, that 44 | 45 | key A + Shift : "A" 46 | key A : "a" 47 | 48 | will not accept the small letter "a" rule as expected, 49 | one has to add a "- Shift" to the last clause. Use 50 | the stdout/stderr dianostics of konsole when modifying 51 | keytabs to find problems like this. 52 | 53 | Operations are 54 | 55 | - scrollUpLine : scroll up one line in the history log 56 | - scrollUpPage : scroll up one page in the history log 57 | - scrollDownLine : scroll down one line in the history log 58 | - scrollDownPage : scroll down one page in the history log 59 | - emitClipboard : "paste" the current clipboard 60 | - emitSelection : "paste" the current selection 61 | 62 | Strings have the syntax of C strings, 63 | one may use the following escapes: 64 | 65 | - \E - escape 66 | - \\ - backslash 67 | - \" - double quote 68 | - \t - tab 69 | - \r - return 70 | - \n - newline 71 | - \b - backspace 72 | - \xHH - where HH are two hex digits 73 | -------------------------------------------------------------------------------- /data/kb-layouts/README-KeyTab: -------------------------------------------------------------------------------- 1 | [README-KeyTab] 2 | 3 | The keytabs shown in the Edit Profile dialog -> Keyboard tab are taken from 4 | *.keytab configuration files located in the system-wide location (typically 5 | /usr/share/applications/konsole on Linux) or the writable location in the 6 | user's home directory (typically ~/.local/share/applications/konsole on Linux). 7 | 8 | Keytabs allow users to configure the behavior of konsole on keyboard events, 9 | especially functions keys. Have a look at doc/user/README.keyboard. 10 | 11 | The syntax of each entry/rule follows the pattern: 12 | 13 | "key" Keyname { ("+"|"-") Modename } ":" (String|Operation) 14 | 15 | Key names are those defined in with the "Qt::Key_" prefix 16 | removed. For a list of key names check the Qt::Key enum at: 17 | https://doc.qt.io/qt-5/qt.html#Key-enum 18 | 19 | Mode names are: 20 | 21 | - Shift : Shift Key pressed 22 | - Alt : Alt Key pressed 23 | - Control : Control Key pressed 24 | 25 | ( The VT100 emulation has modes that can affect the sequences emitted 26 | by certain keys. Those modes are under control of the client program. 27 | 28 | - Newline : affects Return and Enter keys, when set makes them send 29 | both \r and \n control characters; when reset makes them 30 | send \r only. 31 | 32 | - Application : affects applications that use the Alternate Screen buffer. 33 | 34 | - Ansi : send ANSI escape and control sequences (v.s. sending VT52 35 | escape and control sequences). 36 | 37 | Since sending a state to a program that has set the state itself is 38 | positivly wrong and obsolete design, better forget about this nasty 39 | detail. I may well remove this "feature" in a future clean up round. ) 40 | 41 | A "+" preceding a Modename means the Key/mode is pressed/active respectively. 42 | 43 | A "-" preceding a Modename means the Key/mode isn't pressed/active respectively. 44 | 45 | If a mode isn't present in a key combination, its state is ignored. 46 | 47 | Note that the combination of Key and Modes (set/reset) has to be unique. 48 | This means, that 49 | 50 | key A + Shift : "A" 51 | key A : "a" 52 | 53 | will not accept the small letter "a" rule as you'd exepct, you'll have 54 | to add a "- Shift" to the latter rule to make it work. 55 | Use the stdout/stderr dianostics of konsole when modifying keytabs to 56 | find problems like these. 57 | 58 | Supported operations are 59 | 60 | - scrollUpLine : scroll up one line in the history log 61 | - scrollUpPage : scroll up one page in the history log 62 | - scrollDownLine : scroll down one line in the history log 63 | - scrollDownPage : scroll down one page in the history log 64 | - scrollUpToTop : scroll up to the begining of the history log 65 | - scrollDownToBottom : scroll down to the end of the history log 66 | 67 | 68 | Strings have the syntax of C strings, 69 | one may use the following escapes: 70 | 71 | - \E - Escape 72 | - \\ - Backslash 73 | - \" - Double quote 74 | - \t - Tab 75 | - \r - Carriage Return 76 | - \n - New Line 77 | - \b - Backspace 78 | - \xHH - where HH are two hex digits (e.g. \x00 (the NUL character)) 79 | -------------------------------------------------------------------------------- /data/kb-layouts/README-KeyTab-original: -------------------------------------------------------------------------------- 1 | [README.KeyTab] 2 | 3 | The keytabs offered in the Options/Keyboard menu 4 | are taken from configurations files with a *.keytab 5 | pattern either located in $KDEDIR/share/apps/konsole 6 | or ~/.kde/share/apps/konsole. 7 | 8 | Keytabs allow to configure the behavior of konsole 9 | on keyboard events, especially for functions keys. 10 | Please have a look into the README.keyboard file, too. 11 | 12 | The syntax is that each entry has the form : 13 | 14 | "key" Keyname { ("+"|"-") Modename } ":" (String|Operation) 15 | 16 | Keynames are those defined in with the 17 | "Qt::Key_" prefix removed. 18 | 19 | Mode names are: 20 | 21 | - Shift : Shift Key pressed 22 | - Alt : Alt Key pressed 23 | - Control : Control Key pressed 24 | 25 | ( The VT100 emulation has modes that can affect the 26 | sequences emitted by certain keys. These modes are 27 | under control of the client program. 28 | 29 | - Newline : effects Return and Enter key. 30 | - Application : effects Up and Down key. 31 | - Ansi : effects Up and Down key (This is for VT52, really). 32 | 33 | Since sending a state to a program that has set the state 34 | itself is positivly wrong and obsolete design, better forget 35 | about this nasty detail. I may well remove this "feature" 36 | in a future clean up round. ) 37 | 38 | A "+" preceeding a Modename means the Key is pressed. 39 | A "-" preceeding a Modename means the Key is not pressed. 40 | If no mode is given it means don't care. 41 | 42 | Note that the combination of Key and Modes (set/reset) 43 | has to be unique. This means, that 44 | 45 | key A + Shift : "A" 46 | key A : "a" 47 | 48 | will not accept the small letter "a" rule as expected, 49 | one has to add a "- Shift" to the last clause. Use 50 | the stdout/stderr dianostics of konsole when modifying 51 | keytabs to find problems like this. 52 | 53 | Operations are 54 | 55 | - scrollUpLine : scroll up one line in the history log 56 | - scrollUpPage : scroll up one page in the history log 57 | - scrollDownLine : scroll down one line in the history log 58 | - scrollDownPage : scroll down one page in the history log 59 | - scrollUpToTop : scroll up to the begining of the history log 60 | - scrollDownToBottom : scroll down to the end of the history log 61 | 62 | 63 | Strings have the syntax of C strings, 64 | one may use the following escapes: 65 | 66 | - \E - escape 67 | - \\ - backslash 68 | - \" - double quote 69 | - \t - tab 70 | - \r - return 71 | - \n - newline 72 | - \b - backspace 73 | - \xHH - where HH are two hex digits 74 | -------------------------------------------------------------------------------- /data/kb-layouts/historic/x11r5.keytab: -------------------------------------------------------------------------------- 1 | # [x11r5.Keytab] Keyboard Table for X11 R5 2 | 3 | keyboard "XTerm (XFree 3.x.x)" 4 | 5 | # -------------------------------------------------------------- 6 | # 7 | # Note that this particular table is a "risc" version made to 8 | # ease customization without bothering with obsolete details. 9 | # See VT100.keytab for the more hairy stuff. 10 | # 11 | # -------------------------------------------------------------- 12 | 13 | # common keys 14 | 15 | key Escape : "\E" 16 | key Tab : "\t" 17 | 18 | key Return : "\r" 19 | 20 | # Backspace and Delete codes are preserving CTRL-H. 21 | 22 | key Backspace : "\x7f" 23 | 24 | # cursor keys 25 | 26 | key Up -Shift : "\EOA" 27 | key Down -Shift : "\EOB" 28 | key Right -Shift : "\EOC" 29 | key Left -Shift : "\EOD" 30 | 31 | # other grey PC keys 32 | 33 | key Enter : "\r" 34 | 35 | key Home : "\E[1~" 36 | key Insert-Shift : "\E[2~" 37 | key Delete : "\E[3~" 38 | key End : "\E[4~" 39 | key PgUp -Shift : "\E[5~" 40 | key PgDown -Shift : "\E[6~" 41 | 42 | # function keys 43 | 44 | key F1 : "\E[11~" 45 | key F2 : "\E[12~" 46 | key F3 : "\E[13~" 47 | key F4 : "\E[14~" 48 | key F5 : "\E[15~" 49 | key F6 : "\E[17~" 50 | key F7 : "\E[18~" 51 | key F8 : "\E[19~" 52 | key F9 : "\E[20~" 53 | key F10 : "\E[21~" 54 | key F11 : "\E[23~" 55 | key F12 : "\E[24~" 56 | 57 | # Work around dead keys 58 | 59 | key Space +Control : "\x00" 60 | 61 | # Some keys are used by konsole to cause operations. 62 | # The scroll* operations refer to the history buffer. 63 | 64 | key Up +Shift : scrollLineUp 65 | key PgUp +Shift : scrollPageUp 66 | key Down +Shift : scrollLineDown 67 | key PgDown +Shift : scrollPageDown 68 | 69 | key ScrollLock : scrollLock 70 | 71 | # keypad characters are not offered differently by Qt. 72 | -------------------------------------------------------------------------------- /data/kb-layouts/solaris.keytab: -------------------------------------------------------------------------------- 1 | # [solaris.keytab] Konsole Keyboard Table 2 | # 3 | 4 | keyboard "Solaris console" 5 | 6 | # -------------------------------------------------------------- 7 | # 8 | # This configuration table allows to customize the 9 | # meaning of the keys. 10 | # 11 | # The syntax is that each entry has the form : 12 | # 13 | # "key" Keyname { ("+"|"-") Modename } ":" (String|Operation) 14 | # 15 | # Keynames are those defined in with the 16 | # "Qt::Key_" removed. (We'd better insert the list here) 17 | # 18 | # Mode names are : 19 | # 20 | # - Shift 21 | # - Alt 22 | # - Control 23 | # 24 | # The VT100 emulation has two modes that can affect the 25 | # sequences emitted by certain keys. These modes are 26 | # under control of the client program. 27 | # 28 | # 29 | # - Newline : effects Return and Enter key. 30 | # - Application : effects Up and Down key. 31 | # 32 | # - Ansi : effects Up and Down key (This is for VT52, really). 33 | # 34 | # Operations are 35 | # 36 | # - scrollUpLine 37 | # - scrollUpPage 38 | # - scrollDownLine 39 | # - scrollDownPage 40 | # 41 | # - emitSelection 42 | # 43 | # If the key is not found here, the text of the 44 | # key event as provided by QT is emitted, possibly 45 | # preceeded by ESC if the Alt key is pressed. 46 | # 47 | # -------------------------------------------------------------- 48 | 49 | key Escape : "\E" 50 | key Tab : "\t" 51 | 52 | key Return-Alt : "\r" 53 | key Return+Alt : "\E\r" 54 | 55 | # Backspace and Delete codes are preserving CTRL-H. 56 | 57 | key Backspace : "\x08" 58 | #key Delete : "\x7F" 59 | 60 | # cursor keys 61 | 62 | key Up -Shift : "\EOA" 63 | key Down -Shift : "\EOB" 64 | key Right -Shift : "\EOC" 65 | key Left -Shift : "\EOD" 66 | 67 | # other grey PC keys 68 | 69 | key Enter : "\r" 70 | 71 | key Home : "\E[1~" 72 | key Insert-Shift : "\E[2~" 73 | key Delete : "\E[3~" 74 | key End : "\E[4~" 75 | key PgUp -Shift : "\E[5~" 76 | key PgDown -Shift : "\E[6~" 77 | 78 | # function keys 79 | 80 | key F1 : "\E[11~" 81 | key F2 : "\E[12~" 82 | key F3 : "\E[13~" 83 | key F4 : "\E[14~" 84 | key F5 : "\E[15~" 85 | key F6 : "\E[17~" 86 | key F7 : "\E[18~" 87 | key F8 : "\E[19~" 88 | key F9 : "\E[20~" 89 | key F10 : "\E[21~" 90 | key F11 : "\E[23~" 91 | key F12 : "\E[24~" 92 | 93 | # Work around dead keys 94 | 95 | key Space +Control : "\x00" 96 | 97 | # Some keys are used by konsole to cause operations. 98 | # The scroll* operations refer to the history buffer. 99 | 100 | #key Left +Shift : prevSession 101 | #key Right +Shift : nextSession 102 | key Up +Shift : scrollLineUp 103 | key PgUp +Shift : scrollPageUp 104 | key Down +Shift : scrollLineDown 105 | key PgDown +Shift : scrollPageDown 106 | #key Insert+Shift : emitSelection 107 | 108 | # keypad characters are not offered differently by Qt. 109 | -------------------------------------------------------------------------------- /src/CharacterWidth.h: -------------------------------------------------------------------------------- 1 | #ifndef CHARACTERWIDTH_H 2 | #define CHARACTERWIDTH_H 3 | 4 | #include 5 | 6 | int characterWidth(uint ucs4); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /src/ExtendedCharTable.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of terminal, an X terminal. 3 | 4 | Copyright 2007-2008 by Robert Knight 5 | 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. 10 | 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. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 19 | 02110-1301 USA. 20 | */ 21 | 22 | #ifndef EXTENDEDCHARTABLE_H 23 | #define EXTENDEDCHARTABLE_H 24 | 25 | // Qt 26 | #include 27 | 28 | namespace terminal { 29 | /** 30 | * A table which stores sequences of unicode characters, referenced 31 | * by hash keys. The hash key itself is the same size as a unicode 32 | * character ( uint ) so that it can occupy the same space in 33 | * a structure. 34 | */ 35 | class ExtendedCharTable 36 | { 37 | public: 38 | /** Constructs a new character table. */ 39 | ExtendedCharTable(); 40 | ~ExtendedCharTable(); 41 | 42 | /** 43 | * Adds a sequences of unicode characters to the table and returns 44 | * a hash code which can be used later to look up the sequence 45 | * using lookupExtendedChar() 46 | * 47 | * If the same sequence already exists in the table, the hash 48 | * of the existing sequence will be returned. 49 | * 50 | * @param unicodePoints An array of unicode character points 51 | * @param length Length of @p unicodePoints 52 | */ 53 | uint createExtendedChar(const uint *unicodePoints, ushort length); 54 | /** 55 | * Looks up and returns a pointer to a sequence of unicode characters 56 | * which was added to the table using createExtendedChar(). 57 | * 58 | * @param hash The hash key returned by createExtendedChar() 59 | * @param length This variable is set to the length of the 60 | * character sequence. 61 | * 62 | * @return A unicode character sequence of size @p length. 63 | */ 64 | uint *lookupExtendedChar(uint hash, ushort &length) const; 65 | 66 | /** The global ExtendedCharTable instance. */ 67 | static ExtendedCharTable instance; 68 | private: 69 | // calculates the hash key of a sequence of unicode points of size 'length' 70 | uint extendedCharHash(const uint *unicodePoints, ushort length) const; 71 | // tests whether the entry in the table specified by 'hash' matches the 72 | // character sequence 'unicodePoints' of size 'length' 73 | bool extendedCharMatch(uint hash, const uint *unicodePoints, ushort length) const; 74 | // internal, maps hash keys to character sequence buffers. The first uint 75 | // in each value is the length of the buffer, followed by the uints in the buffer 76 | // themselves. 77 | QHash _extendedCharTable; 78 | }; 79 | } 80 | #endif // end of EXTENDEDCHARTABLE_H 81 | -------------------------------------------------------------------------------- /src/HistorySearch.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2013 Christian Surlykke 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 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 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 17 | 02110-1301 USA. 18 | */ 19 | #ifndef TASK_H 20 | #define TASK_H 21 | 22 | #include 23 | #include 24 | #include 25 | 26 | #include 27 | #include 28 | 29 | #include "Emulation.h" 30 | #include "TerminalCharacterDecoder.h" 31 | 32 | using namespace cxxtools; 33 | 34 | typedef QPointer EmulationPtr; 35 | 36 | class HistorySearch : public QObject 37 | { 38 | Q_OBJECT 39 | 40 | public: 41 | explicit HistorySearch(EmulationPtr emulation, QRegExp regExp, bool forwards, 42 | int startColumn, int startLine, QObject* parent); 43 | 44 | ~HistorySearch() override; 45 | 46 | void search(); 47 | 48 | signals: 49 | void matchFound(int startColumn, int startLine, int endColumn, int endLine); 50 | void noMatchFound(); 51 | 52 | private: 53 | bool search(int startColumn, int startLine, int endColumn, int endLine); 54 | int findLineNumberInString(QList linePositions, int position); 55 | 56 | 57 | EmulationPtr m_emulation; 58 | QRegExp m_regExp; 59 | bool m_forwards; 60 | int m_startColumn; 61 | int m_startLine; 62 | 63 | int m_foundStartColumn; 64 | int m_foundStartLine; 65 | int m_foundEndColumn; 66 | int m_foundEndLine; 67 | }; 68 | 69 | #endif /* TASK_H */ 70 | 71 | -------------------------------------------------------------------------------- /src/LGPL_EXCEPTION.TXT: -------------------------------------------------------------------------------- 1 | Nokia Qt LGPL Exception version 1.1 2 | 3 | As an additional permission to the GNU Lesser General Public License version 4 | 2.1, the object code form of a "work that uses the Library" may incorporate 5 | material from a header file that is part of the Library. You may distribute 6 | such object code under terms of your choice, provided that: 7 | (i) the header files of the Library have not been modified; and 8 | (ii) the incorporated material is limited to numerical parameters, data 9 | structure layouts, accessors, macros, inline functions and 10 | templates; and 11 | (iii) you comply with the terms of Section 6 of the GNU Lesser General 12 | Public License version 2.1. 13 | 14 | Moreover, you may apply this exception to a modified version of the Library, 15 | provided that such modification does not involve copying material from the 16 | Library into the modified Library's header files unless such material is 17 | limited to (i) numerical parameters; (ii) data structure layouts; 18 | (iii) accessors; and (iv) small macros, templates and inline functions of 19 | five lines or less in length. 20 | 21 | Furthermore, you are not required to apply this additional permission to a 22 | modified version of the Library. 23 | -------------------------------------------------------------------------------- /src/LineBlockCharacters.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of terminal, a terminal emulator for KDE. 3 | 4 | Copyright 2019 by Mariusz Glebocki 5 | 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. 10 | 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. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 19 | 02110-1301 USA. 20 | */ 21 | 22 | #ifndef LINEBLOCKCHARACTERS_H 23 | #define LINEBLOCKCHARACTERS_H 24 | 25 | // Qt 26 | #include 27 | 28 | namespace terminal { 29 | 30 | /** 31 | * Helper functions for drawing characters from "Box Drawing" and "Block Elements" Unicode blocks. 32 | */ 33 | namespace LineBlockCharacters { 34 | 35 | /** 36 | * Returns true if the character can be drawn by draw() function. 37 | * 38 | * @param ucs4cp Character to test's UCS4 code point 39 | */ 40 | inline static bool canDraw(uint ucs4cp) { 41 | return (0x2500 <= ucs4cp && ucs4cp <= 0x259F); 42 | } 43 | 44 | /** 45 | * Draws character. 46 | * 47 | * @param paint QPainter to draw on 48 | * @param cellRect Rectangle to draw in 49 | * @param chr Character to be drawn 50 | * @param bold Whether the character should be boldface 51 | */ 52 | void draw(QPainter &paint, const QRect &cellRect, const QChar &chr, bool bold); 53 | 54 | } // namespace LineBlockCharacters 55 | } // namespace terminal 56 | 57 | #endif // LINEBLOCKCHARACTERS_H 58 | -------------------------------------------------------------------------------- /src/LineFont.h: -------------------------------------------------------------------------------- 1 | // WARNING: Autogenerated by "fontembedder ./linefont.src". 2 | // You probably do not want to hand-edit this! 3 | 4 | static const quint32 LineChars[] = { 5 | 0x00007c00, 0x000fffe0, 0x00421084, 0x00e739ce, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 6 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00427000, 0x004e7380, 0x00e77800, 0x00ef7bc0, 7 | 0x00421c00, 0x00439ce0, 0x00e73c00, 0x00e7bde0, 0x00007084, 0x000e7384, 0x000079ce, 0x000f7bce, 8 | 0x00001c84, 0x00039ce4, 0x00003dce, 0x0007bdee, 0x00427084, 0x004e7384, 0x004279ce, 0x00e77884, 9 | 0x00e779ce, 0x004f7bce, 0x00ef7bc4, 0x00ef7bce, 0x00421c84, 0x00439ce4, 0x00423dce, 0x00e73c84, 10 | 0x00e73dce, 0x0047bdee, 0x00e7bde4, 0x00e7bdee, 0x00427c00, 0x0043fce0, 0x004e7f80, 0x004fffe0, 11 | 0x004fffe0, 0x00e7fde0, 0x006f7fc0, 0x00efffe0, 0x00007c84, 0x0003fce4, 0x000e7f84, 0x000fffe4, 12 | 0x00007dce, 0x0007fdee, 0x000f7fce, 0x000fffee, 0x00427c84, 0x0043fce4, 0x004e7f84, 0x004fffe4, 13 | 0x00427dce, 0x00e77c84, 0x00e77dce, 0x0047fdee, 0x004e7fce, 0x00e7fde4, 0x00ef7f84, 0x004fffee, 14 | 0x00efffe4, 0x00e7fdee, 0x00ef7fce, 0x00efffee, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 15 | 0x000f83e0, 0x00a5294a, 0x004e1380, 0x00a57800, 0x00ad0bc0, 0x004390e0, 0x00a53c00, 0x00a5a1e0, 16 | 0x000e1384, 0x0000794a, 0x000f0b4a, 0x000390e4, 0x00003d4a, 0x0007a16a, 0x004e1384, 0x00a5694a, 17 | 0x00ad2b4a, 0x004390e4, 0x00a52d4a, 0x00a5a16a, 0x004f83e0, 0x00a57c00, 0x00ad83e0, 0x000f83e4, 18 | 0x00007d4a, 0x000f836a, 0x004f93e4, 0x00a57d4a, 0x00ad836a, 0x00000000, 0x00000000, 0x00000000, 19 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00001c00, 0x00001084, 0x00007000, 0x00421000, 20 | 0x00039ce0, 0x000039ce, 0x000e7380, 0x00e73800, 0x000e7f80, 0x00e73884, 0x0003fce0, 0x004239ce 21 | }; 22 | -------------------------------------------------------------------------------- /src/LinkManager.cpp: -------------------------------------------------------------------------------- 1 | #include "LinkManager.h" 2 | 3 | using namespace cxxtools; 4 | 5 | LinkManager::LinkManager() 6 | { 7 | 8 | } 9 | 10 | int LinkManager::AddLink(QString link) 11 | { 12 | auto loc = _linkMap.find(link); 13 | if (loc != _linkMap.end()) 14 | { 15 | return loc.value(); 16 | } 17 | 18 | auto id = _idSequence++; 19 | _linkMap.insert(link, id); 20 | _idMap.insert(id, link); 21 | 22 | return id; 23 | } 24 | 25 | QString LinkManager::FindLink(int linkId) 26 | { 27 | auto loc = _idMap.find(linkId); 28 | if (loc == _idMap.end()) 29 | { 30 | return QString(); 31 | } 32 | 33 | return loc.value(); 34 | } 35 | -------------------------------------------------------------------------------- /src/LinkManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace cxxtools 6 | { 7 | class LinkManager 8 | { 9 | QHash _idMap; 10 | QHash _linkMap; 11 | 12 | int _idSequence = 1; 13 | 14 | public: 15 | LinkManager(); 16 | 17 | int AddLink(QString link); 18 | QString FindLink(int linkId); 19 | }; 20 | } //cxxtools 21 | -------------------------------------------------------------------------------- /src/LinkParser.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include "Character.h" 8 | 9 | namespace cxxtools 10 | { 11 | class Screen; 12 | 13 | class TextBuffer 14 | { 15 | public: 16 | static constexpr int kBufferSize = 8; 17 | 18 | char Text[kBufferSize] = {}; 19 | int Length = 0; 20 | 21 | void Clear() 22 | { 23 | Text[0] = '\0'; 24 | Length = 0; 25 | } 26 | 27 | void SetText(Character& chr); 28 | 29 | static int ToUtf8(wchar_t g, char* txt); 30 | 31 | operator bool() const { return Length != 0; } 32 | 33 | char First() { return Text[0]; } 34 | 35 | void InsertAt(QByteArray& text, int index) const 36 | { 37 | if(Length == 0) 38 | { 39 | return; 40 | } 41 | 42 | text.insert(index, Text, Length); 43 | } 44 | 45 | void AppendTo(QByteArray& text) const 46 | { 47 | if(Length == 0) 48 | { 49 | return; 50 | } 51 | 52 | text.append(text, Length); 53 | } 54 | }; 55 | 56 | 57 | class StringBuilder 58 | { 59 | char* _buffer = nullptr; 60 | char* _bufferPtr = nullptr; 61 | int _gap = 0; 62 | int _length = 0; 63 | int _capacity = 0; 64 | 65 | static constexpr int kInitialReservation = 256; 66 | 67 | public: 68 | StringBuilder() 69 | : _buffer((char*) malloc(kInitialReservation)), 70 | _bufferPtr(_buffer), 71 | _capacity(kInitialReservation) 72 | 73 | { 74 | } 75 | 76 | ~StringBuilder(); 77 | 78 | bool Append(const TextBuffer& text); 79 | bool Prepend(const TextBuffer& text); 80 | 81 | void RightTrim(); 82 | void SkipLeft(int amount); 83 | void SkipRight(int amount); 84 | 85 | bool Empty() { return _length == 0; } 86 | bool NotEmpty() { return _length > 0; } 87 | 88 | const char* Position() const { return _bufferPtr; } 89 | const char* Buffer() const { return _buffer; } 90 | 91 | bool AtSpace() const { return std::isspace(*_bufferPtr); } 92 | bool AtProtocol(); 93 | bool AtUrl(); 94 | bool AtFile(); 95 | 96 | QString AsAbsolutePath(); 97 | QString AsString() { return QString(QLatin1String(_bufferPtr)); } 98 | 99 | private: 100 | inline bool StartsWith(const char* prefix) const; 101 | }; 102 | 103 | class LinkParser 104 | { 105 | Screen* _screen; 106 | 107 | public: 108 | LinkParser(Screen* screen); 109 | 110 | QString FindLink(int cx, int cy, QRect& region); 111 | 112 | private: 113 | 114 | 115 | bool GetTextAt(int& x, int& y, TextBuffer& text); 116 | bool GetPreviousTextAt(int& x, int& y, TextBuffer& text); 117 | bool GetNextTextAt(int& x, int& y, TextBuffer& text); 118 | }; 119 | 120 | } //namespace cxxtools 121 | -------------------------------------------------------------------------------- /src/ProfileReader.h: -------------------------------------------------------------------------------- 1 | /* 2 | This source file is part of Konsole, a terminal emulator. 3 | 4 | Copyright 2007-2008 by Robert Knight 5 | 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. 10 | 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. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 19 | 02110-1301 USA. 20 | */ 21 | 22 | #ifndef PROFILEREADER_H 23 | #define PROFILEREADER_H 24 | 25 | #include "Profile.h" 26 | 27 | class KConfig; 28 | 29 | namespace terminal { 30 | /** Interface for all classes which can load profile settings from a file. */ 31 | class ProfileReader 32 | { 33 | public: 34 | ProfileReader(); 35 | ~ProfileReader(); 36 | 37 | /** Returns a list of paths to profiles which this reader can read. */ 38 | QStringList findProfiles(); 39 | 40 | /** 41 | * Attempts to read a profile from @p path and 42 | * save the property values described into @p profile. 43 | * 44 | * Returns true if the profile was successfully read or false otherwise. 45 | * 46 | * @param path Path to the profile to read 47 | * @param profile Pointer to the Profile the settings will be read into 48 | * @param parentProfile Receives the name of the parent profile 49 | */ 50 | bool readProfile(const QString &path, Profile::Ptr profile, QString &parentProfile); 51 | 52 | private: 53 | void readProperties(const KConfig &config, Profile::Ptr profile, 54 | const Profile::PropertyInfo *properties); 55 | }; 56 | } 57 | 58 | #endif // PROFILEREADER_H 59 | -------------------------------------------------------------------------------- /src/ProfileWriter.h: -------------------------------------------------------------------------------- 1 | /* 2 | This source file is part of Konsole, a terminal emulator. 3 | 4 | Copyright 2007-2008 by Robert Knight 5 | 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. 10 | 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. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 19 | 02110-1301 USA. 20 | */ 21 | 22 | #ifndef PROFILEWRITER_H 23 | #define PROFILEWRITER_H 24 | 25 | #include "Profile.h" 26 | 27 | class KConfig; 28 | 29 | namespace terminal { 30 | /** Interface for all classes which can write profile settings to a file. */ 31 | class ProfileWriter 32 | { 33 | public: 34 | ProfileWriter(); 35 | ~ProfileWriter(); 36 | 37 | /** 38 | * Returns a suitable path-name for writing 39 | * @p profile to. The path-name should be accepted by 40 | * the corresponding ProfileReader class. 41 | */ 42 | QString getPath(const Profile::Ptr &profile); 43 | /** 44 | * Writes the properties and values from @p profile to the file specified 45 | * by @p path. This profile should be readable by the corresponding 46 | * ProfileReader class. 47 | */ 48 | bool writeProfile(const QString &path, const Profile::Ptr &profile); 49 | 50 | private: 51 | void writeProperties(KConfig &config, const Profile::Ptr &profile, 52 | const Profile::PropertyInfo *properties); 53 | }; 54 | } 55 | 56 | #endif // PROFILEWRITER_H 57 | -------------------------------------------------------------------------------- /src/PtyConfig.h: -------------------------------------------------------------------------------- 1 | /* Defined to the path of the PTY multiplexer device, if any */ 2 | /* #undef PTM_DEVICE */ 3 | 4 | #define HAVE_POSIX_OPENPT 1 5 | #define HAVE_GETPT 0 6 | #define HAVE_GRANTPT 0 7 | #define HAVE_OPENPTY 1 8 | #define HAVE_PTSNAME 1 9 | #define HAVE_REVOKE 0 10 | #define HAVE_UNLOCKPT 0 11 | #define HAVE__GETPTY 0 12 | #define HAVE_TCGETATTR 1 13 | #define HAVE_TCSETATTR 1 14 | 15 | #define HAVE_LIBUTIL_H 0 16 | #define HAVE_UTIL_H 0 17 | #define HAVE_PTY_H 1 18 | /* Unused ? */ 19 | #define HAVE_TERMIOS_H 1 20 | #define HAVE_TERMIO_H 1 21 | #define HAVE_SYS_STROPTS_H 0 22 | #define HAVE_SYS_FILIO_H 0 23 | 24 | #define HAVE_UTEMPTER 1 25 | #define HAVE_LOGIN 0 26 | #define HAVE_UTMPX 0 27 | #define HAVE_LOGINX 0 28 | #define HAVE_STRUCT_UTMP_UT_TYPE 0 29 | #define HAVE_STRUCT_UTMP_UT_PID 0 30 | #define HAVE_STRUCT_UTMP_UT_SESSION 0 31 | #define HAVE_STRUCT_UTMP_UT_SYSLEN 0 32 | #define HAVE_STRUCT_UTMP_UT_ID 0 33 | 34 | #define HAVE_SYS_TIME_H 1 35 | 36 | /* 37 | * Steven Schultz tells us : 38 | * BSD/OS 4.2 doesn't have a prototype for openpty in its system header files 39 | */ 40 | #ifdef __bsdi__ 41 | __BEGIN_DECLS 42 | int openpty(int *, int *, char *, struct termios *, struct winsize *); 43 | __END_DECLS 44 | #endif 45 | 46 | -------------------------------------------------------------------------------- /src/QContainerAdapters.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | template 7 | class QMapAdapter 8 | { 9 | QMap _map; 10 | 11 | public: 12 | typedef QMap MapType; 13 | typedef typename MapType::key_value_iterator iterator; 14 | typedef typename MapType::const_key_value_iterator const_iterator; 15 | 16 | QMapAdapter(QMap map) 17 | : _map(map) 18 | {} 19 | 20 | iterator begin() { return _map.keyValueBegin(); } 21 | iterator end() { return _map.keyValueEnd(); } 22 | const_iterator cbegin() const { return _map.constKeyValueBegin(); } 23 | const_iterator cend() const { return _map.constKeyValueEnd(); } 24 | }; 25 | 26 | template 27 | class QHashAdapter 28 | { 29 | QHash _hash; 30 | 31 | public: 32 | typedef QHash HashType; 33 | typedef typename HashType::key_value_iterator iterator; 34 | typedef typename HashType::const_key_value_iterator const_iterator; 35 | 36 | QHashAdapter(QHash hash) 37 | : _hash(hash) 38 | {} 39 | 40 | iterator begin() { return _hash.keyValueBegin(); } 41 | iterator end() { return _hash.keyValueEnd(); } 42 | const_iterator cbegin() const { return _hash.constKeyValueBegin(); } 43 | const_iterator cend() const { return _hash.constKeyValueEnd(); } 44 | }; 45 | -------------------------------------------------------------------------------- /src/ScrollState.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2015 by Lindsay Roberts 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 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 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 17 | 02110-1301 USA. 18 | */ 19 | 20 | #include "ScrollState.h" 21 | 22 | #include 23 | 24 | using namespace terminal; 25 | 26 | void ScrollState::addWheelEvent(const QWheelEvent *wheel) 27 | { 28 | if ((wheel->angleDelta().y() != 0) && (wheel->pixelDelta().y() == 0)) { 29 | _remainingScrollPixel = 0; 30 | } else { 31 | _remainingScrollPixel += wheel->pixelDelta().y(); 32 | } 33 | _remainingScrollAngle += wheel->angleDelta().y(); 34 | } 35 | 36 | void ScrollState::clearAll() 37 | { 38 | _remainingScrollPixel = 0; 39 | _remainingScrollAngle = 0; 40 | } 41 | 42 | int ScrollState::consumeLegacySteps(int stepsize) 43 | { 44 | if (stepsize < 1) { 45 | stepsize = DEFAULT_ANGLE_SCROLL_LINE; 46 | } 47 | const int steps = _remainingScrollAngle / stepsize; 48 | _remainingScrollAngle -= steps * stepsize; 49 | if (steps != 0) { 50 | _remainingScrollPixel = 0; 51 | } 52 | return steps; 53 | } 54 | 55 | int ScrollState::consumeSteps(int pixelStepSize, int angleStepSize) 56 | { 57 | if (_remainingScrollPixel != 0) { 58 | int steps = _remainingScrollPixel / pixelStepSize; 59 | _remainingScrollPixel -= steps * pixelStepSize; 60 | _remainingScrollAngle = 0; 61 | return steps; 62 | } 63 | int steps = _remainingScrollAngle / angleStepSize; 64 | _remainingScrollAngle -= steps * angleStepSize; 65 | _remainingScrollPixel = 0; 66 | return steps; 67 | } 68 | -------------------------------------------------------------------------------- /src/ScrollState.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2015 by Lindsay Roberts 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 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 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 17 | 02110-1301 USA. 18 | */ 19 | 20 | #ifndef SCROLLSTATE_H 21 | #define SCROLLSTATE_H 22 | 23 | class QWheelEvent; 24 | 25 | namespace terminal { 26 | /** 27 | * Represents accumulation of wheel scroll from scroll events. 28 | * 29 | * Modern high precision scroll events supply many smaller events 30 | * that may or may not translate into a UI action to support smooth 31 | * pixel level scrolling. Builtin classes such as QScrollBar 32 | * support these events under Qt5, but custom code 33 | * written to handle scroll events in other ways must be modified 34 | * to accumulate small deltas and act when suitable thresholds have 35 | * been reached (ideally 1 for pixel scroll values towards any action 36 | * that can be mapped to a pixel movement). 37 | */ 38 | struct ScrollState 39 | { 40 | enum { 41 | DEFAULT_ANGLE_SCROLL_LINE = 120 42 | }; 43 | enum { 44 | DEGREES_PER_ANGLE_UNIT = 8 45 | }; 46 | static inline int degreesToAngle(const int angle) 47 | { 48 | return angle * DEGREES_PER_ANGLE_UNIT; 49 | } 50 | 51 | int angle() const 52 | { 53 | return _remainingScrollAngle; 54 | } 55 | 56 | int pixel() const 57 | { 58 | return _remainingScrollPixel; 59 | } 60 | 61 | /** Add scroll values from a QWheelEvent to the accumulated totals */ 62 | void addWheelEvent(const QWheelEvent *wheel); 63 | 64 | /** Clear all - used when scroll is consumed by another class like QScrollBar */ 65 | void clearAll(); 66 | /** Return the (signed) multiple of @p stepsize available and subtract it from 67 | * accumulated totals. Also clears accumulated pixel scroll. */ 68 | int consumeLegacySteps(int stepsize); 69 | /** Return the (signed) multiple of @p pixelStepSize if any pixel scroll is 70 | * available - that is, if pixel scroll is being supplied, or the same from 71 | * the @p angleStepSize else. The corresponding value is subtracted from 72 | * the accumulated total. The other scroll style value is cleared. */ 73 | int consumeSteps(int pixelStepSize, int angleStepSize); 74 | 75 | ScrollState() : _remainingScrollAngle(0), 76 | _remainingScrollPixel(0) 77 | { 78 | } 79 | 80 | int _remainingScrollAngle; 81 | int _remainingScrollPixel; 82 | }; 83 | } 84 | 85 | #endif // SCROLLSTATE_H 86 | -------------------------------------------------------------------------------- /src/ShellCommand.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2007-2008 by Robert Knight 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 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 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 17 | 02110-1301 USA. 18 | */ 19 | 20 | #ifndef SHELLCOMMAND_H 21 | #define SHELLCOMMAND_H 22 | 23 | // Qt 24 | #include 25 | 26 | // terminal 27 | 28 | 29 | namespace terminal { 30 | /** 31 | * A class to parse and extract information about shell commands. 32 | * 33 | * ShellCommand can be used to: 34 | * 35 | *
    36 | *
  • Take a command-line (eg "/bin/sh -c /path/to/my/script") and split it 37 | * into its component parts (eg. the command "/bin/sh" and the arguments 38 | * "-c","/path/to/my/script") 39 | *
  • 40 | *
  • Take a command and a list of arguments and combine them to 41 | * form a complete command line. 42 | *
  • 43 | *
  • Determine whether the binary specified by a command exists in the 44 | * user's PATH. 45 | *
  • 46 | *
  • Determine whether a command-line specifies the execution of 47 | * another command as the root user using su/sudo etc. 48 | *
  • 49 | *
50 | */ 51 | class ShellCommand 52 | { 53 | public: 54 | /** 55 | * Constructs a ShellCommand from a command line. 56 | * 57 | * @param aCommand The command line to parse. 58 | */ 59 | explicit ShellCommand(const QString &aCommand); 60 | /** 61 | * Constructs a ShellCommand with the specified @p aCommand and @p aArguments. 62 | */ 63 | ShellCommand(const QString &aCommand, const QStringList &aArguments); 64 | 65 | /** Returns the command. */ 66 | QString command() const; 67 | /** Returns the arguments. */ 68 | QStringList arguments() const; 69 | 70 | /** 71 | * Returns the full command line. 72 | */ 73 | QString fullCommand() const; 74 | 75 | /** Expands environment variables in @p text .*/ 76 | static QString expand(const QString &text); 77 | 78 | /** Expands environment variables in each string in @p list. */ 79 | static QStringList expand(const QStringList &items); 80 | 81 | static bool isValidEnvCharacter(const QChar &ch); 82 | 83 | static bool isValidLeadingEnvCharacter(const QChar &ch); 84 | 85 | private: 86 | static bool expandEnv(QString &text); 87 | 88 | QStringList _arguments; 89 | }; 90 | } 91 | 92 | #endif // SHELLCOMMAND_H 93 | -------------------------------------------------------------------------------- /src/TerminalConfig.h: -------------------------------------------------------------------------------- 1 | #define KONSOLE_VERSION "19.11.70" 2 | 3 | /* Defined if on DragonFly BSD */ 4 | /* #undef HAVE_OS_DRAGONFLYBSD */ 5 | 6 | #define HAVE_X11 1 7 | 8 | /* If defined, remove public access to dbus sendInput/runCommand */ 9 | #define REMOVE_SENDTEXT_RUNCOMMAND_DBUS_METHODS 10 | 11 | #define USE_TERMINALINTERFACEV2 12 | -------------------------------------------------------------------------------- /src/TerminalDebug.cpp: -------------------------------------------------------------------------------- 1 | // This file was generated by ecm_qt_declare_logging_category(): DO NOT EDIT! 2 | 3 | #include "TerminalDebug.h" 4 | 5 | 6 | #if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) 7 | Q_LOGGING_CATEGORY(TerminalDebug, "org.kde.konsole", QtInfoMsg) 8 | #else 9 | Q_LOGGING_CATEGORY(TerminalDebug, "org.kde.konsole") 10 | #endif 11 | 12 | -------------------------------------------------------------------------------- /src/TerminalDebug.h: -------------------------------------------------------------------------------- 1 | // This file was generated by ecm_qt_declare_logging_category(): DO NOT EDIT! 2 | 3 | #ifndef ECM_QLOGGINGCATEGORY_KONSOLEDEBUG_KONSOLEDEBUG_H 4 | #define ECM_QLOGGINGCATEGORY_KONSOLEDEBUG_KONSOLEDEBUG_H 5 | 6 | #include 7 | 8 | Q_DECLARE_LOGGING_CATEGORY(TerminalDebug) 9 | 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /src/TerminalDisplayAccessible.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of terminal, a terminal emulator for KDE. 3 | * 4 | * Copyright 2012 Frederik Gladhorn 5 | * 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. 10 | * 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. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 19 | * 02110-1301 USA. 20 | */ 21 | 22 | #ifndef TERMINALDISPLAYACCESSIBLE_H 23 | #define TERMINALDISPLAYACCESSIBLE_H 24 | 25 | //#include 26 | 27 | #include 28 | #include 29 | 30 | #include "TerminalDisplay.h" 31 | #include "ScreenWindow.h" 32 | #include "Screen.h" 33 | 34 | namespace terminal { 35 | /** 36 | * Class implementing the QAccessibleInterface for the terminal display. 37 | * This exposes information about the display to assistive technology using the QAccessible framework. 38 | * 39 | * Most functions are re-implemented from QAccessibleTextInterface. 40 | */ 41 | class TerminalDisplayAccessible : public QAccessibleWidget, public QAccessibleTextInterface 42 | { 43 | public: 44 | explicit TerminalDisplayAccessible(TerminalDisplay *display); 45 | 46 | QString text(QAccessible::Text t) const override; 47 | QString text(int startOffset, int endOffset) const override; 48 | int characterCount() const override; 49 | 50 | int selectionCount() const override; 51 | void selection(int selectionIndex, int *startOffset, int *endOffset) const override; 52 | void addSelection(int startOffset, int endOffset) override; 53 | void setSelection(int selectionIndex, int startOffset, int endOffset) override; 54 | void removeSelection(int selectionIndex) override; 55 | 56 | QRect characterRect(int offset) const override; 57 | int offsetAtPoint(const QPoint &point) const override; 58 | void scrollToSubstring(int startIndex, int endIndex) override; 59 | 60 | QString attributes(int offset, int *startOffset, int *endOffset) const override; 61 | 62 | int cursorPosition() const override; 63 | void setCursorPosition(int position) override; 64 | 65 | void *interface_cast(QAccessible::InterfaceType type) override; 66 | 67 | private: 68 | terminal::TerminalDisplay *display() const; 69 | 70 | inline int positionToOffset(int column, int line) const 71 | { 72 | return line * display()->_usedColumns + column; 73 | } 74 | 75 | inline int lineForOffset(int offset) const 76 | { 77 | return offset / display()->_usedColumns; 78 | } 79 | 80 | inline int columnForOffset(int offset) const 81 | { 82 | return offset % display()->_usedColumns; 83 | } 84 | 85 | QString visibleText() const; 86 | }; 87 | } // namespace 88 | 89 | #endif // TERMINALDISPLAYACCESSIBLE_H 90 | -------------------------------------------------------------------------------- /src/TerminalOutputPane.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 Adam Treat. All rights reserved. 3 | */ 4 | 5 | #pragma once 6 | 7 | #include "TerminalWindow.h" 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | #include 15 | 16 | class QLabel; 17 | class QVBoxLayout; 18 | class QToolButton; 19 | class QTabWidget; 20 | class QWidget; 21 | class QAction; 22 | 23 | namespace terminal 24 | { 25 | class TerminalOutputPane: public Core::IOutputPane 26 | { 27 | Q_OBJECT 28 | 29 | public: 30 | TerminalOutputPane(QObject* parent = 0); 31 | 32 | QWidget* outputWidget(QWidget* parent) override; 33 | QList toolBarWidgets() const override; 34 | QString displayName() const override; 35 | int priorityInStatusBar() const override; 36 | void clearContents() override; 37 | void visibilityChanged(bool visible) override; 38 | void setFocus() override; 39 | bool hasFocus() const override; 40 | bool canFocus() const override; 41 | bool canNavigate() const override; 42 | bool canNext() const override; 43 | bool canPrevious() const override; 44 | void goToNext() override; 45 | void goToPrev() override; 46 | 47 | private slots: 48 | void termInitialized(); 49 | void AddTab(); 50 | void ActiveTabChanged(int index); 51 | void ShowContextMenu(const QPoint &pos); 52 | void SessionEnded(int terminalId); 53 | 54 | private: 55 | std::unique_ptr _tabs; 56 | TerminalWindow* _activeWindow; 57 | QToolButton* _addButton; 58 | QMap _windows; 59 | int _nextTerminalNumber; 60 | QTimer _delayCloseTimer; 61 | 62 | QAction* _closeCurrentAction; 63 | QAction* _closeAllAction; 64 | QAction* _closeOtherAction; 65 | 66 | void CreateControls(); 67 | bool CloseTab(int index); 68 | void CloseAllTabs(int except = -1); 69 | void UpdateCloseState(); 70 | }; 71 | 72 | } // namespace terminal 73 | -------------------------------------------------------------------------------- /src/TerminalPlugin.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 Adam Treat. All rights reserved. 3 | */ 4 | 5 | #include "TerminalPlugin.h" 6 | #include "TerminalOutputPane.h" 7 | #include "TerminalWindow.h" 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | //#include 16 | #include 17 | 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | namespace terminal 26 | { 27 | 28 | 29 | /*! Constructs the Terminal plugin. Normally plugins don't do anything in 30 | their constructor except for initializing their member variables. The 31 | actual work is done later, in the initialize() and extensionsInitialized() 32 | methods. 33 | */ 34 | TerminalPlugin::TerminalPlugin() 35 | : _outputPane(nullptr) 36 | { 37 | } 38 | 39 | /*! Plugins are responsible for deleting objects they created on the heap, and 40 | to unregister objects from the plugin manager that they registered there. 41 | */ 42 | TerminalPlugin::~TerminalPlugin() 43 | { 44 | ExtensionSystem::PluginManager::instance()->removeObject(_outputPane); 45 | delete _outputPane; 46 | _outputPane = nullptr; 47 | } 48 | 49 | /*! Initializes the plugin. Returns true on success. 50 | Plugins want to register objects with the plugin manager here. 51 | 52 | \a errorMessage can be used to pass an error message to the plugin system, 53 | if there was any. 54 | */ 55 | bool TerminalPlugin::initialize(const QStringList &arguments, QString *errorMessage) 56 | { 57 | Q_UNUSED(arguments) 58 | Q_UNUSED(errorMessage) 59 | 60 | _outputPane = new TerminalOutputPane(this); 61 | 62 | ExtensionSystem::PluginManager::instance()->addObject(_outputPane); 63 | 64 | return true; 65 | } 66 | 67 | /*! Notification that all extensions that this plugin depends on have been 68 | initialized. The dependencies are defined in the plugins .pluginspec file. 69 | 70 | Normally this method is used for things that rely on other plugins to have 71 | added objects to the plugin manager, that implement interfaces that we're 72 | interested in. These objects can now be requested through the 73 | PluginManagerInterface. 74 | 75 | The TerminalPlugin doesn't need things from other plugins, so it does 76 | nothing here. 77 | */ 78 | void TerminalPlugin::extensionsInitialized() 79 | { 80 | } 81 | 82 | } // namespace Terminal 83 | -------------------------------------------------------------------------------- /src/TerminalPlugin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 Adam Treat. All rights reserved. 3 | */ 4 | 5 | #pragma once 6 | 7 | #include "TerminalOutputPane.h" 8 | 9 | #include 10 | 11 | namespace terminal { 12 | 13 | class TerminalWindow; 14 | 15 | class TerminalPlugin 16 | : public ExtensionSystem::IPlugin 17 | { 18 | Q_OBJECT 19 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "TerminalPlugin.json") 20 | 21 | public: 22 | TerminalPlugin(); 23 | ~TerminalPlugin(); 24 | 25 | bool initialize(const QStringList &arguments, QString *errorMessage); 26 | void extensionsInitialized(); 27 | 28 | private: 29 | TerminalOutputPane* _outputPane; 30 | }; 31 | 32 | } // namespace Terminal 33 | -------------------------------------------------------------------------------- /src/TerminalPlugin.json.in: -------------------------------------------------------------------------------- 1 | { 2 | \"Name\" : \"TerminalPlugin\", 3 | \"Version\" : \"1.0.0\", 4 | \"CompatVersion\" : \"1.0.0\", 5 | \"Vendor\" : \"JakeSays\", 6 | \"Copyright\" : \"(C) JakeSays, portions (C) The KDE Project\", 7 | \"License\" : \"GNU GPL\", 8 | \"Description\" : \"The best damn terminal plugin ever!\", 9 | \"Url\" : \"http://www.jakesays.com\", 10 | $$dependencyList 11 | } 12 | -------------------------------------------------------------------------------- /src/TerminalWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | QT_FORWARD_DECLARE_CLASS(QLabel) 8 | QT_FORWARD_DECLARE_CLASS(QVBoxLayout) 9 | 10 | namespace terminal 11 | { 12 | class TerminalDisplay; 13 | class Session; 14 | 15 | class TerminalWindow : public QWidget 16 | { 17 | Q_OBJECT 18 | 19 | public: 20 | TerminalWindow(QWidget *parent, QString title = QString(), int id = -1); 21 | void initialze(); 22 | 23 | TerminalDisplay *Display() const { return _display; } 24 | QString Title() const { return _title; } 25 | int Id() const { return _id; } 26 | 27 | Session* session() const { return _session; } 28 | 29 | void ClearDisplay(); 30 | 31 | int tabIndex() const; 32 | void setTabIndex(int newTabIndex); 33 | 34 | signals: 35 | void initialized(); 36 | void sessionEnded(int terminalId); 37 | 38 | private: 39 | void focusInEvent(QFocusEvent *event) override; 40 | void focusOutEvent(QFocusEvent *event) override; 41 | 42 | void SetActionState(bool enable); 43 | 44 | void InstallActions(); 45 | void RemoveActions(); 46 | 47 | private slots: 48 | void contextMenuRequested(const QPoint& location, SpotType spotType); 49 | void copyAvailable(bool); 50 | void onCopyAction(); 51 | void onPasteAction(); 52 | void closeInvoked(); 53 | void finishedInvoked(); 54 | void displayFocusLost(); 55 | void displayFocusGained(); 56 | 57 | private: 58 | void CreateDisplay(); 59 | 60 | QString _title; 61 | int _id; 62 | int _tabIndex; 63 | Session* _session = nullptr; 64 | QVBoxLayout *_layout = nullptr; 65 | TerminalDisplay *_display = nullptr; 66 | QAction *_copyAction = nullptr; 67 | QAction *_pasteAction = nullptr; 68 | QAction *_closeAction = nullptr; 69 | QWidget *_parent = nullptr; 70 | }; 71 | } //terminal 72 | -------------------------------------------------------------------------------- /src/config/GenericPathProvider.cpp: -------------------------------------------------------------------------------- 1 | #include "GenericPathProvider.h" 2 | 3 | using namespace devtools; 4 | 5 | GenericPathProvider::GenericPathProvider() 6 | { 7 | 8 | } 9 | 10 | 11 | QString devtools::GenericPathProvider::writableLocation(PathProvider::StandardLocation type) 12 | { 13 | Q_UNUSED(type) 14 | return QString(); 15 | } 16 | 17 | QStringList devtools::GenericPathProvider::standardLocations(PathProvider::StandardLocation type) 18 | { 19 | Q_UNUSED(type) 20 | return QStringList(); 21 | } 22 | 23 | QString devtools::GenericPathProvider::locate(PathProvider::StandardLocation type, const QString &fileName, PathProvider::LocateOptions options) 24 | { 25 | Q_UNUSED(type) 26 | Q_UNUSED(fileName) 27 | Q_UNUSED(options) 28 | return QString(); 29 | } 30 | 31 | QStringList devtools::GenericPathProvider::locateAll(PathProvider::StandardLocation type, const QString &fileName, PathProvider::LocateOptions options) 32 | { 33 | Q_UNUSED(type) 34 | Q_UNUSED(fileName) 35 | Q_UNUSED(options) 36 | return QStringList(); 37 | } 38 | 39 | QString devtools::GenericPathProvider::displayName(PathProvider::StandardLocation type) 40 | { 41 | Q_UNUSED(type) 42 | return QString(); 43 | } 44 | 45 | QString devtools::GenericPathProvider::findExecutable(const QString &executableName, const QStringList &paths) 46 | { 47 | Q_UNUSED(executableName) 48 | Q_UNUSED(paths) 49 | return QString(); 50 | } 51 | -------------------------------------------------------------------------------- /src/config/GenericPathProvider.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace devtools 6 | { 7 | class GenericPathProvider : PathProvider 8 | { 9 | GenericPathProvider(); 10 | friend class PathProvider; 11 | 12 | public: 13 | 14 | QString writableLocation(StandardLocation type) override; 15 | QStringList standardLocations(StandardLocation type) override; 16 | QString locate(StandardLocation type, const QString &fileName, LocateOptions options) override; 17 | QStringList locateAll(StandardLocation type, const QString &fileName, LocateOptions options) override; 18 | QString displayName(StandardLocation type) override; 19 | QString findExecutable(const QString &executableName, const QStringList &paths) override; 20 | }; 21 | 22 | } // namespace devtools 23 | -------------------------------------------------------------------------------- /src/config/PathProvider.cpp: -------------------------------------------------------------------------------- 1 | #include "PathProvider.h" 2 | #include "StandardPathProvider.h" 3 | #include "GenericPathProvider.h" 4 | 5 | using namespace devtools; 6 | 7 | namespace 8 | { 9 | bool RunningOnKde() 10 | { 11 | return qgetenv("XDG_CURRENT_DESKTOP").toLower() == "kde"; 12 | } 13 | 14 | } 15 | 16 | PathProvider::PathProvider() 17 | { 18 | 19 | } 20 | 21 | PathProvider &PathProvider::Instance() 22 | { 23 | static PathProvider* provider = 24 | RunningOnKde() 25 | ? (PathProvider*) new StandardPathProvider() 26 | : (PathProvider*) new GenericPathProvider(); 27 | 28 | return *provider; 29 | } 30 | -------------------------------------------------------------------------------- /src/config/PathProvider.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace devtools 7 | { 8 | class PathProvider 9 | { 10 | PathProvider(); 11 | 12 | friend class GenericPathProvider; 13 | friend class StandardPathProvider; 14 | 15 | public: 16 | using StandardLocation = QStandardPaths::StandardLocation; 17 | using LocateOption = QStandardPaths::LocateOption; 18 | using LocateOptions = QStandardPaths::LocateOptions; 19 | 20 | PathProvider& Instance(); 21 | 22 | virtual QString writableLocation(StandardLocation type) = 0; 23 | virtual QStringList standardLocations(StandardLocation type) = 0; 24 | 25 | virtual QString locate(StandardLocation type, const QString &fileName, LocateOptions options = LocateOption::LocateFile) = 0; 26 | virtual QStringList locateAll(StandardLocation type, const QString &fileName, LocateOptions options = LocateOption::LocateFile) = 0; 27 | virtual QString displayName(StandardLocation type) = 0; 28 | 29 | virtual QString findExecutable(const QString &executableName, const QStringList &paths = QStringList()) = 0; 30 | 31 | }; 32 | } //devtools 33 | -------------------------------------------------------------------------------- /src/config/StandardPathProvider.cpp: -------------------------------------------------------------------------------- 1 | #include "StandardPathProvider.h" 2 | 3 | using namespace devtools; 4 | 5 | StandardPathProvider::StandardPathProvider() 6 | { 7 | 8 | } 9 | 10 | PathProvider &StandardPathProvider::Instance() 11 | { 12 | static StandardPathProvider provider; 13 | 14 | return provider; 15 | } 16 | 17 | 18 | QString devtools::StandardPathProvider::writableLocation(PathProvider::StandardLocation type) 19 | { 20 | return QStandardPaths::writableLocation(type); 21 | } 22 | 23 | QStringList devtools::StandardPathProvider::standardLocations(PathProvider::StandardLocation type) 24 | { 25 | return QStandardPaths::standardLocations(type); 26 | } 27 | 28 | QString devtools::StandardPathProvider::locate(PathProvider::StandardLocation type, const QString &fileName, PathProvider::LocateOptions options) 29 | { 30 | return QStandardPaths::locate(type, fileName, options); 31 | } 32 | 33 | QStringList devtools::StandardPathProvider::locateAll(PathProvider::StandardLocation type, const QString &fileName, PathProvider::LocateOptions options) 34 | { 35 | return QStandardPaths::locateAll(type, fileName, options); 36 | } 37 | 38 | QString devtools::StandardPathProvider::displayName(PathProvider::StandardLocation type) 39 | { 40 | return QStandardPaths::displayName(type); 41 | } 42 | 43 | QString devtools::StandardPathProvider::findExecutable(const QString &executableName, const QStringList &paths) 44 | { 45 | return QStandardPaths::findExecutable(executableName, paths); 46 | } 47 | -------------------------------------------------------------------------------- /src/config/StandardPathProvider.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace devtools 6 | { 7 | class StandardPathProvider : PathProvider 8 | { 9 | StandardPathProvider(); 10 | 11 | friend class PathProvider; 12 | 13 | public: 14 | 15 | static PathProvider& Instance(); 16 | 17 | QString writableLocation(StandardLocation type) override; 18 | QStringList standardLocations(StandardLocation type) override; 19 | QString locate(StandardLocation type, const QString &fileName, LocateOptions options) override; 20 | QStringList locateAll(StandardLocation type, const QString &fileName, LocateOptions options) override; 21 | QString displayName(StandardLocation type) override; 22 | QString findExecutable(const QString &executableName, const QStringList &paths) override; 23 | }; 24 | } //devtools 25 | -------------------------------------------------------------------------------- /src/config/config-kconfig.h: -------------------------------------------------------------------------------- 1 | #define KCONFIG_USE_DBUS 0 2 | -------------------------------------------------------------------------------- /src/config/kconfig_core_log_settings.cpp: -------------------------------------------------------------------------------- 1 | // This file was generated by ecm_qt_declare_logging_category(): DO NOT EDIT! 2 | 3 | #include "kconfig_core_log_settings.h" 4 | 5 | 6 | #if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) 7 | Q_LOGGING_CATEGORY(KCONFIG_CORE_LOG, "kf5.kconfig.core", QtInfoMsg) 8 | #else 9 | Q_LOGGING_CATEGORY(KCONFIG_CORE_LOG, "kf5.kconfig.core") 10 | #endif 11 | 12 | -------------------------------------------------------------------------------- /src/config/kconfig_core_log_settings.h: -------------------------------------------------------------------------------- 1 | // This file was generated by ecm_qt_declare_logging_category(): DO NOT EDIT! 2 | 3 | #ifndef ECM_QLOGGINGCATEGORY_KCONFIG_CORE_LOG_KCONFIG_CORE_LOG_SETTINGS_H 4 | #define ECM_QLOGGINGCATEGORY_KCONFIG_CORE_LOG_KCONFIG_CORE_LOG_SETTINGS_H 5 | 6 | #include 7 | 8 | Q_DECLARE_LOGGING_CATEGORY(KCONFIG_CORE_LOG) 9 | 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /src/config/kconfig_version.h: -------------------------------------------------------------------------------- 1 | // This file was generated by ecm_setup_version(): DO NOT EDIT! 2 | 3 | #ifndef KCONFIG_VERSION_H 4 | #define KCONFIG_VERSION_H 5 | 6 | #define KCONFIG_VERSION_STRING "5.64.0" 7 | #define KCONFIG_VERSION_MAJOR 5 8 | #define KCONFIG_VERSION_MINOR 64 9 | #define KCONFIG_VERSION_PATCH 0 10 | #define KCONFIG_VERSION ((5<<16)|(64<<8)|(0)) 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /src/config/kconfigbase_p.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of the KDE libraries 3 | Copyright (c) 1999 Preston Brown 4 | Copyright (C) 1997 Matthias Kalle Dalheimer 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Library General Public 8 | License as published by the Free Software Foundation; either 9 | version 2 of the License, or (at your option) any later version. 10 | 11 | This library 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 GNU 14 | Library General Public License for more details. 15 | 16 | You should have received a copy of the GNU Library General Public License 17 | along with this library; see the file COPYING.LIB. If not, write to 18 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 | Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | #ifndef KCONFIGBASE_P_H 23 | #define KCONFIGBASE_P_H 24 | 25 | #include 26 | 27 | class KConfigBasePrivate : public QSharedData 28 | { 29 | }; 30 | #endif 31 | -------------------------------------------------------------------------------- /src/config/kconfiggroup_p.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of the KDE libraries 3 | Copyright (c) 2007 Thiago Macieira 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Library General Public 7 | License as published by the Free Software Foundation; either 8 | version 2 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Library General Public License for more details. 14 | 15 | You should have received a copy of the GNU Library General Public License 16 | along with this library; see the file COPYING.LIB. If not, write to 17 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 | Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifndef KCONFIGGROUP_P_H 22 | #define KCONFIGGROUP_P_H 23 | 24 | #include 25 | #include "kconfiggroup.h" 26 | 27 | class KConfigGroup; 28 | 29 | struct KConfigGroupGui { 30 | typedef bool (*kReadEntryGui)(const QByteArray &data, const char *key, const QVariant &input, 31 | QVariant &output); 32 | typedef bool (*kWriteEntryGui)(KConfigGroup *, const char *key, const QVariant &input, 33 | KConfigGroup::WriteConfigFlags flags); 34 | 35 | kReadEntryGui readEntryGui; 36 | kWriteEntryGui writeEntryGui; 37 | }; 38 | 39 | extern KConfigGroupGui _kde_internal_KConfigGroupGui; 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/config/kconfigini_p.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of the KDE libraries 3 | Copyright (c) 2006, 2007 Thomas Braxton 4 | Copyright (c) 1999 Preston Brown 5 | Portions copyright (c) 1997 Matthias Kalle Dalheimer 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Library General Public 9 | License as published by the Free Software Foundation; either 10 | version 2 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Library General Public License for more details. 16 | 17 | You should have received a copy of the GNU Library General Public License 18 | along with this library; see the file COPYING.LIB. If not, write to 19 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 | Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #ifndef KCONFIGINI_P_H 24 | #define KCONFIGINI_P_H 25 | 26 | #include 27 | 28 | class QLockFile; 29 | class QIODevice; 30 | 31 | class KConfigIniBackend : public KConfigBackend 32 | { 33 | Q_OBJECT 34 | private: 35 | QLockFile *lockFile; 36 | 37 | public: 38 | class BufferFragment; 39 | 40 | KConfigIniBackend(); 41 | ~KConfigIniBackend() override; 42 | 43 | ParseInfo parseConfig(const QByteArray &locale, 44 | KEntryMap &entryMap, 45 | ParseOptions options) override; 46 | ParseInfo parseConfig(const QByteArray &locale, 47 | KEntryMap &entryMap, 48 | ParseOptions options, 49 | bool merging); 50 | bool writeConfig(const QByteArray &locale, KEntryMap &entryMap, 51 | WriteOptions options) override; 52 | 53 | bool isWritable() const override; 54 | QString nonWritableErrorMessage() const override; 55 | KConfigBase::AccessMode accessMode() const override; 56 | void createEnclosing() override; 57 | void setFilePath(const QString &path) override; 58 | bool lock() override; 59 | void unlock() override; 60 | bool isLocked() const override; 61 | 62 | protected: 63 | 64 | enum StringType { 65 | GroupString = 0, 66 | KeyString = 1, 67 | ValueString = 2 68 | }; 69 | // Warning: this modifies data in-place. Other BufferFragment objects referencing the same buffer 70 | // fragment will get their data modified too. 71 | static void printableToString(BufferFragment *aString, const QFile &file, int line); 72 | static QByteArray stringToPrintable(const QByteArray &aString, StringType type); 73 | static char charFromHex(const char *str, const QFile &file, int line); 74 | static QString warningProlog(const QFile &file, int line); 75 | 76 | void writeEntries(const QByteArray &locale, QIODevice &file, const KEntryMap &map); 77 | void writeEntries(const QByteArray &locale, QIODevice &file, const KEntryMap &map, 78 | bool defaultGroup, bool &firstEntry); 79 | }; 80 | 81 | #endif // KCONFIGINI_P_H 82 | -------------------------------------------------------------------------------- /src/config/kconfigwatcher.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 David Edmundson 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU Library General Public License as 6 | * published by the Free Software Foundation; either version 2, or 7 | * (at your option) any later version. 8 | * 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 12 | * GNU General Public License for more details 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this program; if not, write to the 16 | * Free Software Foundation, Inc., 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #ifndef KCONFIGWATCHER_H 21 | #define KCONFIGWATCHER_H 22 | 23 | #include 24 | #include 25 | 26 | #include 27 | #include 28 | 29 | 30 | 31 | class KConfigWatcherPrivate; 32 | 33 | /** 34 | * \class KConfigWatcher kconfigwatcher.h 35 | * 36 | * Notifies when another client has updated this config file with the Notify flag set. 37 | * @since 5.51 38 | */ 39 | class KConfigWatcher: public QObject 40 | { 41 | Q_OBJECT 42 | public: 43 | typedef QSharedPointer Ptr; 44 | 45 | /** 46 | * Instantiate a ConfigWatcher for a given config 47 | * 48 | * @note any additional config sources should be set before this point. 49 | */ 50 | static Ptr create(const KSharedConfig::Ptr &config); 51 | 52 | ~KConfigWatcher() override; 53 | 54 | Q_SIGNALS: 55 | /** 56 | * Emitted when a config group has changed 57 | * The config will be reloaded before this signal is emitted 58 | * 59 | * @arg group the config group that has changed 60 | * @arg names a list of entries that have changed within that group 61 | */ 62 | void configChanged(const KConfigGroup &group, const QByteArrayList &names); 63 | 64 | private Q_SLOTS: 65 | void onConfigChangeNotification(const QHash &changes); 66 | 67 | private: 68 | KConfigWatcher(const KSharedConfig::Ptr &config); 69 | Q_DISABLE_COPY(KConfigWatcher) 70 | const QScopedPointer d; 71 | }; 72 | 73 | #endif 74 | -------------------------------------------------------------------------------- /src/config/kcoreconfigskeleton_p.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of KOrganizer. 3 | Copyright (c) 2000,2001 Cornelius Schumacher 4 | Copyright (c) 2003 Waldo Bastian 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Library General Public 8 | License as published by the Free Software Foundation; either 9 | version 2 of the License, or (at your option) any later version. 10 | 11 | This library 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 GNU 14 | Library General Public License for more details. 15 | 16 | You should have received a copy of the GNU Library General Public License 17 | along with this library; see the file COPYING.LIB. If not, write to 18 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 | Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | #ifndef KCORECONFIGSKELETON_P_H 23 | #define KCORECONFIGSKELETON_P_H 24 | 25 | #include "kcoreconfigskeleton.h" 26 | 27 | class KCoreConfigSkeletonPrivate 28 | { 29 | public: 30 | KCoreConfigSkeletonPrivate() 31 | : mCurrentGroup(QStringLiteral("No Group")), mUseDefaults(false) 32 | {} 33 | ~KCoreConfigSkeletonPrivate() 34 | { 35 | KConfigSkeletonItem::List::ConstIterator it; 36 | for (it = mItems.constBegin(); it != mItems.constEnd(); ++it) { 37 | delete *it; 38 | } 39 | } 40 | QString mCurrentGroup; 41 | 42 | KSharedConfig::Ptr mConfig; // pointer to KConfig object 43 | 44 | KConfigSkeletonItem::List mItems; 45 | KConfigSkeletonItem::Dict mItemDict; 46 | 47 | bool mUseDefaults; 48 | }; 49 | 50 | class KConfigSkeletonItemPrivate 51 | { 52 | public: 53 | KConfigSkeletonItemPrivate() 54 | : mIsImmutable(true) 55 | , mWriteFlags(KConfigBase::Normal) 56 | {} 57 | bool mIsImmutable; ///< Indicates this item is immutable 58 | KConfigBase::WriteConfigFlags mWriteFlags; ///< The flags to pass to calls of writeEntry() and revertToDefault() 59 | 60 | QString mLabel; ///< The label for this item 61 | QString mToolTip; ///< The ToolTip text for this item 62 | QString mWhatsThis; ///< The What's This text for this item 63 | 64 | // HACK: Necessary to avoid introducing new virtuals in KConfigSkeletonItem 65 | std::function mIsDefaultImpl; 66 | std::function mIsSaveNeededImpl; 67 | }; 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /src/ki18n/KLocalizedContext: -------------------------------------------------------------------------------- 1 | #include "klocalizedcontext.h" 2 | -------------------------------------------------------------------------------- /src/ki18n/KLocalizedString: -------------------------------------------------------------------------------- 1 | #include "klocalizedstring.h" 2 | -------------------------------------------------------------------------------- /src/ki18n/KLocalizedTranslator: -------------------------------------------------------------------------------- 1 | #include "klocalizedtranslator.h" 2 | -------------------------------------------------------------------------------- /src/ki18n/KuitMarkup: -------------------------------------------------------------------------------- 1 | #include "kuitmarkup.h" 2 | -------------------------------------------------------------------------------- /src/ki18n/KuitSetup: -------------------------------------------------------------------------------- 1 | #include "kuitsetup.h" 2 | -------------------------------------------------------------------------------- /src/ki18n/Messages.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | $XGETTEXT *.cpp *.h -o $podir/ki18n5.pot 3 | -------------------------------------------------------------------------------- /src/ki18n/common_helpers_p.h: -------------------------------------------------------------------------------- 1 | /* This file is part of the KDE libraries 2 | Copyright (C) 2008 Chusslove Illich 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Library 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. 8 | 9 | This library 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 | Library General Public License for more details. 13 | 14 | You should have received a copy of the GNU Library General Public License 15 | along with this library; see the file COPYING.LIB. If not, write to 16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #ifndef COMMON_HELPERS_P_H 21 | #define COMMON_HELPERS_P_H 22 | 23 | #include 24 | 25 | // Standalone (pure Qt) functionality needed internally in more than 26 | // one source file on localization. 27 | 28 | /** 29 | * @internal 30 | * 31 | * Removes accelerator marker from a UI text label. 32 | * 33 | * Accelerator marker is not always a plain ampersand (&), 34 | * so it is not enough to just remove it by @c QString::remove(). 35 | * The label may contain escaped markers ("&&") which must be resolved 36 | * and skipped, as well as CJK-style markers ("Foo (&F)") where 37 | * the whole parenthesis construct should be removed. 38 | * Therefore always use this function to remove accelerator marker 39 | * from UI labels. 40 | * 41 | * @param label UI label which may contain an accelerator marker 42 | * @return label without the accelerator marker 43 | */ 44 | QString removeAcceleratorMarker(const QString &label); 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /src/ki18n/config.h: -------------------------------------------------------------------------------- 1 | /* This file is part of the KDE libraries 2 | Copyright (c) 2016 A. Wilcox 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Library 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. 8 | 9 | This library 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 | Library General Public License for more details. 13 | 14 | You should have received a copy of the GNU Library General Public License 15 | along with this library; see the file COPYING.LIB. If not, write to 16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #ifndef KI18N_CONFIG_H 21 | #define KI18N_CONFIG_H 22 | 23 | #define HAVE_NL_MSG_CAT_CNTR 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /src/ki18n/ki18n_logging.cpp: -------------------------------------------------------------------------------- 1 | // This file was generated by ecm_qt_declare_logging_category(): DO NOT EDIT! 2 | 3 | #include "ki18n_logging.h" 4 | 5 | 6 | #if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) 7 | Q_LOGGING_CATEGORY(KI18N, "kf5.ki18n", QtInfoMsg) 8 | #else 9 | Q_LOGGING_CATEGORY(KI18N, "kf5.ki18n") 10 | #endif 11 | 12 | -------------------------------------------------------------------------------- /src/ki18n/ki18n_logging.h: -------------------------------------------------------------------------------- 1 | // This file was generated by ecm_qt_declare_logging_category(): DO NOT EDIT! 2 | 3 | #ifndef ECM_QLOGGINGCATEGORY_KI18N_KI18N_LOGGING_H 4 | #define ECM_QLOGGINGCATEGORY_KI18N_KI18N_LOGGING_H 5 | 6 | #include 7 | 8 | Q_DECLARE_LOGGING_CATEGORY(KI18N) 9 | 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /src/ki18n/ki18n_logging_kuit.cpp: -------------------------------------------------------------------------------- 1 | // This file was generated by ecm_qt_declare_logging_category(): DO NOT EDIT! 2 | 3 | #include "ki18n_logging_kuit.h" 4 | 5 | 6 | #if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) 7 | Q_LOGGING_CATEGORY(KI18N_KUIT, "kf5.ki18n.kuit", QtInfoMsg) 8 | #else 9 | Q_LOGGING_CATEGORY(KI18N_KUIT, "kf5.ki18n.kuit") 10 | #endif 11 | 12 | -------------------------------------------------------------------------------- /src/ki18n/ki18n_logging_kuit.h: -------------------------------------------------------------------------------- 1 | // This file was generated by ecm_qt_declare_logging_category(): DO NOT EDIT! 2 | 3 | #ifndef ECM_QLOGGINGCATEGORY_KI18N_KUIT_KI18N_LOGGING_KUIT_H 4 | #define ECM_QLOGGINGCATEGORY_KI18N_KUIT_KI18N_LOGGING_KUIT_H 5 | 6 | #include 7 | 8 | Q_DECLARE_LOGGING_CATEGORY(KI18N_KUIT) 9 | 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /src/ki18n/ki18n_version.h: -------------------------------------------------------------------------------- 1 | // This file was generated by ecm_setup_version(): DO NOT EDIT! 2 | 3 | #ifndef KI18N_VERSION_H 4 | #define KI18N_VERSION_H 5 | 6 | #define KI18N_VERSION_STRING "5.64.0" 7 | #define KI18N_VERSION_MAJOR 5 8 | #define KI18N_VERSION_MINOR 64 9 | #define KI18N_VERSION_PATCH 0 10 | #define KI18N_VERSION ((5<<16)|(64<<8)|(0)) 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /src/ki18n/klocalizedtranslator.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 Martin Gräßlin 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) version 3, or any 8 | * later version accepted by the membership of KDE e.V. (or its 9 | * successor approved by the membership of KDE e.V.), which shall 10 | * act as a proxy defined in Section 6 of version 3 of the license. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library. If not, see . 19 | */ 20 | #include "klocalizedtranslator.h" 21 | #include "klocalizedstring.h" 22 | 23 | // Qt 24 | #include 25 | #include 26 | 27 | class KLocalizedTranslatorPrivate 28 | { 29 | public: 30 | QString translationDomain; 31 | QSet monitoredContexts; 32 | }; 33 | 34 | KLocalizedTranslator::KLocalizedTranslator(QObject *parent) 35 | : QTranslator(parent) 36 | , d(new KLocalizedTranslatorPrivate) 37 | { 38 | } 39 | 40 | KLocalizedTranslator::~KLocalizedTranslator() 41 | { 42 | } 43 | 44 | void KLocalizedTranslator::setTranslationDomain(const QString &translationDomain) 45 | { 46 | d->translationDomain = translationDomain; 47 | } 48 | 49 | void KLocalizedTranslator::addContextToMonitor(const QString &context) 50 | { 51 | d->monitoredContexts.insert(context); 52 | } 53 | 54 | void KLocalizedTranslator::removeContextToMonitor(const QString &context) 55 | { 56 | d->monitoredContexts.remove(context); 57 | } 58 | 59 | QString KLocalizedTranslator::translate(const char *context, const char *sourceText, const char *disambiguation, int n) const 60 | { 61 | if (d->translationDomain.isEmpty() || !d->monitoredContexts.contains(QString::fromUtf8(context))) { 62 | return QTranslator::translate(context, sourceText, disambiguation, n); 63 | } 64 | if (qstrlen(disambiguation) == 0) { 65 | return ki18nd(d->translationDomain.toUtf8().constData(), sourceText).toString(); 66 | } else { 67 | return ki18ndc(d->translationDomain.toUtf8().constData(), disambiguation, sourceText).toString(); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/ki18n/ktranscript_export.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef KTRANSCRIPT_EXPORT_H 3 | #define KTRANSCRIPT_EXPORT_H 4 | 5 | #ifdef KTRANSCRIPT_STATIC_DEFINE 6 | # define KTRANSCRIPT_EXPORT 7 | # define KTRANSCRIPT_NO_EXPORT 8 | #else 9 | # ifndef KTRANSCRIPT_EXPORT 10 | # ifdef ktranscript_EXPORTS 11 | /* We are building this library */ 12 | # define KTRANSCRIPT_EXPORT __attribute__((visibility("default"))) 13 | # else 14 | /* We are using this library */ 15 | # define KTRANSCRIPT_EXPORT __attribute__((visibility("default"))) 16 | # endif 17 | # endif 18 | 19 | # ifndef KTRANSCRIPT_NO_EXPORT 20 | # define KTRANSCRIPT_NO_EXPORT __attribute__((visibility("hidden"))) 21 | # endif 22 | #endif 23 | 24 | #ifndef KTRANSCRIPT_DEPRECATED 25 | # define KTRANSCRIPT_DEPRECATED __attribute__ ((__deprecated__)) 26 | #endif 27 | 28 | #ifndef KTRANSCRIPT_DEPRECATED_EXPORT 29 | # define KTRANSCRIPT_DEPRECATED_EXPORT KTRANSCRIPT_EXPORT KTRANSCRIPT_DEPRECATED 30 | #endif 31 | 32 | #ifndef KTRANSCRIPT_DEPRECATED_NO_EXPORT 33 | # define KTRANSCRIPT_DEPRECATED_NO_EXPORT KTRANSCRIPT_NO_EXPORT KTRANSCRIPT_DEPRECATED 34 | #endif 35 | 36 | #if 0 /* DEFINE_NO_DEPRECATED */ 37 | # ifndef KTRANSCRIPT_NO_DEPRECATED 38 | # define KTRANSCRIPT_NO_DEPRECATED 39 | # endif 40 | #endif 41 | 42 | #endif /* KTRANSCRIPT_EXPORT_H */ 43 | -------------------------------------------------------------------------------- /src/ki18n/kuitmarkup_p.h: -------------------------------------------------------------------------------- 1 | /* This file is part of the KDE libraries 2 | Copyright (C) 2007, 2013 Chusslove Illich 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Library 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. 8 | 9 | This library 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 | Library General Public License for more details. 13 | 14 | You should have received a copy of the GNU Library General Public License 15 | along with this library; see the file COPYING.LIB. If not, write to 16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #ifndef KUITMARKUP_P_H 21 | #define KUITMARKUP_P_H 22 | 23 | #include 24 | 25 | class KuitFormatter; 26 | class KuitFormatterPrivate; 27 | 28 | namespace Kuit 29 | { 30 | /** 31 | * Convert &, ", ', <, > characters into XML entities 32 | * &, <, >, ', ", respectively. 33 | */ 34 | QString escape(const QString &text); 35 | } 36 | 37 | /** 38 | * @internal 39 | * (used by KLocalizedString) 40 | * 41 | * KuitFormatter resolves KUIT markup in user interface text 42 | * into appropriate visual formatting. 43 | * 44 | * @author Chusslove Illich 45 | * @short class for formatting KUIT markup in UI messages 46 | */ 47 | class KuitFormatter 48 | { 49 | public: 50 | 51 | /** 52 | * Constructor. 53 | * 54 | * @param language language to create the formatter for 55 | */ 56 | KuitFormatter(const QString &language); 57 | 58 | /** 59 | * Transforms KUIT markup in the given text into visual formatting. 60 | * The appropriate visual formatting is decided based on 61 | * the context marker provided in the context string. 62 | * 63 | * @param domain translation domain from which the text was fetched 64 | * @param context context of the text (used if \p format == UndefinedFormat) 65 | * @param text text containing the KUIT markup 66 | * @param format target visual format 67 | * @param isArgument whether this text is inserted into an outer text 68 | */ 69 | QString format(const QByteArray &domain, 70 | const QString &context, const QString &text, 71 | Kuit::VisualFormat format) const; 72 | 73 | /** 74 | * Destructor. 75 | */ 76 | ~KuitFormatter(); 77 | 78 | private: 79 | 80 | KuitFormatter(const KuitFormatter &t); 81 | KuitFormatter &operator=(const KuitFormatter &t); 82 | 83 | KuitFormatterPrivate *d; 84 | }; 85 | 86 | #endif 87 | -------------------------------------------------------------------------------- /src/ki18n/kuitsetup.h: -------------------------------------------------------------------------------- 1 | /* This file is part of the KDE libraries 2 | Copyright (C) 2013 Chusslove Illich 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Library 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. 8 | 9 | This library 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 | Library General Public License for more details. 13 | 14 | You should have received a copy of the GNU Library General Public License 15 | along with this library; see the file COPYING.LIB. If not, write to 16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #ifndef KUITSETUP_H 21 | #define KUITSETUP_H 22 | 23 | #include 24 | 25 | #endif // KUITSETUP_H 26 | -------------------------------------------------------------------------------- /src/ki18n/main.cpp: -------------------------------------------------------------------------------- 1 | /* This file is part of the KDE libraries 2 | Copyright (C) 2015 Lukáš Tinkl 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Library 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. 8 | 9 | This library 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 | Library General Public License for more details. 13 | 14 | You should have received a copy of the GNU Library General Public License 15 | along with this library; see the file COPYING.LIB. If not, write to 16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | // load global Qt translation, needed in KDE e.g. by lots of builtin dialogs (QColorDialog, QFontDialog) that we use 26 | static bool loadTranslation(const QString &localeName) 27 | { 28 | QTranslator *translator = new QTranslator(QCoreApplication::instance()); 29 | if (!translator->load(QLocale(localeName), QStringLiteral("qt_"), QString(), QLibraryInfo::location(QLibraryInfo::TranslationsPath))) { 30 | delete translator; 31 | return false; 32 | } 33 | QCoreApplication::instance()->installTranslator(translator); 34 | return true; 35 | } 36 | 37 | static void load() 38 | { 39 | // The way Qt translation system handles plural forms makes it necessary to 40 | // have a translation file which contains only plural forms for `en`. That's 41 | // why we load the `en` translation unconditionally, then load the 42 | // translation for the current locale to overload it. 43 | loadTranslation(QStringLiteral("en")); 44 | 45 | QLocale locale = QLocale::system(); 46 | if (locale.name() != QStringLiteral("en")) { 47 | if (!loadTranslation(locale.name())) { 48 | loadTranslation(locale.bcp47Name()); 49 | } 50 | } 51 | } 52 | 53 | Q_COREAPP_STARTUP_FUNCTION(load) 54 | -------------------------------------------------------------------------------- /src/kpty_p.h: -------------------------------------------------------------------------------- 1 | /* This file is part of the KDE libraries 2 | 3 | Copyright (C) 2003,2007 Oswald Buddenhagen 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Library General Public 7 | License as published by the Free Software Foundation; either 8 | version 2 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Library General Public License for more details. 14 | 15 | You should have received a copy of the GNU Library General Public License 16 | along with this library; see the file COPYING.LIB. If not, write to 17 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 | Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifndef kpty_p_h 22 | #define kpty_p_h 23 | 24 | #include "kpty.h" 25 | 26 | #include 27 | 28 | #include 29 | #include 30 | 31 | class KPtyPrivate 32 | { 33 | public: 34 | Q_DECLARE_PUBLIC(KPty) 35 | 36 | KPtyPrivate(KPty *parent); 37 | virtual ~KPtyPrivate(); 38 | #if ! HAVE_OPENPTY 39 | bool chownpty(bool grant); 40 | #endif 41 | 42 | int masterFd; 43 | int slaveFd; 44 | bool ownMaster: 1; 45 | 46 | QByteArray ttyName; 47 | QString utempterPath; 48 | 49 | KPty *q_ptr; 50 | }; 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/kui/KCollapsibleGroupBox: -------------------------------------------------------------------------------- 1 | #include "kcollapsiblegroupbox.h" 2 | -------------------------------------------------------------------------------- /src/kui/KConfigGui: -------------------------------------------------------------------------------- 1 | #include "kconfiggui.h" 2 | -------------------------------------------------------------------------------- /src/kui/KConfigLoader: -------------------------------------------------------------------------------- 1 | #include "kconfigloader.h" 2 | -------------------------------------------------------------------------------- /src/kui/KConfigSkeleton: -------------------------------------------------------------------------------- 1 | #include "kconfigskeleton.h" 2 | -------------------------------------------------------------------------------- /src/kui/KGuiItem: -------------------------------------------------------------------------------- 1 | #include "kguiitem.h" 2 | -------------------------------------------------------------------------------- /src/kui/KMessageBox: -------------------------------------------------------------------------------- 1 | #include "kmessagebox.h" 2 | -------------------------------------------------------------------------------- /src/kui/KMessageBoxDontAskAgainInterface: -------------------------------------------------------------------------------- 1 | #include "kmessageboxdontaskagaininterface.h" 2 | -------------------------------------------------------------------------------- /src/kui/KMessageBoxNotifyInterface: -------------------------------------------------------------------------------- 1 | #include "kmessageboxnotifyinterface.h" 2 | -------------------------------------------------------------------------------- /src/kui/KMessageWidget: -------------------------------------------------------------------------------- 1 | #include "kmessagewidget.h" 2 | -------------------------------------------------------------------------------- /src/kui/KPluralHandlingSpinBox: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "kpluralhandlingspinbox.h" 4 | -------------------------------------------------------------------------------- /src/kui/KSqueezedTextLabel: -------------------------------------------------------------------------------- 1 | #include "ksqueezedtextlabel.h" 2 | -------------------------------------------------------------------------------- /src/kui/KStandardGuiItem: -------------------------------------------------------------------------------- 1 | #include "kstandardguiitem.h" 2 | -------------------------------------------------------------------------------- /src/kui/fonthelpers_p.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2008 Chusslove Illich 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Library 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. 8 | 9 | This library 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 | Library General Public License for more details. 13 | 14 | You should have received a copy of the GNU Library General Public License 15 | along with this library; see the file COPYING.LIB. If not, write to 16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | Boston, MA 02110-1301, USA. 18 | */ 19 | #ifndef FONTHELPERS_P_H 20 | #define FONTHELPERS_P_H 21 | 22 | // i18n-related helpers for fonts, common to KFont* widgets. 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | /** 29 | * @internal 30 | * 31 | * Split the compound raw font name into family and foundry. 32 | * 33 | * @param name the raw font name reported by Qt 34 | * @param family the storage for family name 35 | * @param foundry the storage for foundry name 36 | */ 37 | void splitFontString(const QString &name, 38 | QString *family, QString *foundry = nullptr); 39 | 40 | /** 41 | * @internal 42 | * 43 | * Translate the font name for the user. 44 | * Primarily for generic fonts like Serif, Sans-Serif, etc. 45 | * 46 | * @param name the raw font name reported by Qt 47 | * @return translated font name 48 | */ 49 | QString translateFontName(const QString &name); 50 | 51 | /** 52 | * @internal 53 | * 54 | * Compose locale-aware sorted list of translated font names, 55 | * with generic fonts handled in a special way. 56 | * The mapping of translated to raw names can be reported too if required. 57 | * 58 | * @param names raw font names as reported by Qt 59 | * @param trToRawNames storage for mapping of translated to raw names 60 | * @return sorted list of translated font names 61 | */ 62 | QStringList translateFontNameList(const QStringList &names, 63 | QHash *trToRawNames = nullptr); 64 | 65 | # endif 66 | -------------------------------------------------------------------------------- /src/kui/kconfiggui.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of the KDE libraries 3 | Copyright (c) 1999 Matthias Ettrich 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) version 3, or any 9 | later version accepted by the membership of KDE e.V. (or its 10 | successor approved by the membership of KDE e.V.), which shall 11 | act as a proxy defined in Section 6 of version 3 of the license. 12 | 13 | This library is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | Lesser General Public License for more details. 17 | 18 | You should have received a copy of the GNU Lesser General Public 19 | License along with this library. If not, see . 20 | */ 21 | 22 | #include "kconfiggui.h" 23 | 24 | #include 25 | 26 | #include 27 | 28 | static QString configName(const QString &id, const QString &key) 29 | { 30 | return(QLatin1String("session/") + QGuiApplication::applicationName() + 31 | QLatin1Char('_') + id + 32 | QLatin1Char('_') + key); 33 | } 34 | 35 | static KConfig *s_sessionConfig = nullptr; 36 | 37 | KConfig *KConfigGui::sessionConfig() 38 | { 39 | #ifdef QT_NO_SESSIONMANAGER 40 | #error QT_NO_SESSIONMANAGER was set, this will not compile. Reconfigure Qt with Session management support. 41 | #endif 42 | if (!hasSessionConfig()) { 43 | // create the default instance specific config object 44 | // from applications' -session command line parameter 45 | s_sessionConfig = new KConfig(configName(qApp->sessionId(), 46 | qApp->sessionKey()), 47 | KConfig::SimpleConfig); 48 | } 49 | 50 | return s_sessionConfig; 51 | } 52 | 53 | void KConfigGui::setSessionConfig(const QString &id, const QString &key) 54 | { 55 | if (hasSessionConfig()) { 56 | delete s_sessionConfig; 57 | s_sessionConfig = nullptr; 58 | } 59 | 60 | // create a new instance specific config object from supplied id & key 61 | s_sessionConfig = new KConfig(configName(id, key), 62 | KConfig::SimpleConfig); 63 | } 64 | 65 | bool KConfigGui::hasSessionConfig() 66 | { 67 | return s_sessionConfig != nullptr; 68 | } 69 | 70 | //#if KCONFIGGUI_BUILD_DEPRECATED_SINCE(5, 11) 71 | //QString KConfigGui::sessionConfigName() 72 | //{ 73 | // return sessionConfig()->name(); 74 | //} 75 | //#endif 76 | -------------------------------------------------------------------------------- /src/kui/kconfiggui.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of the KDE libraries 3 | Copyright (c) 1999 Matthias Ettrich 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) version 3, or any 9 | later version accepted by the membership of KDE e.V. (or its 10 | successor approved by the membership of KDE e.V.), which shall 11 | act as a proxy defined in Section 6 of version 3 of the license. 12 | 13 | This library is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | Lesser General Public License for more details. 17 | 18 | You should have received a copy of the GNU Lesser General Public 19 | License along with this library. If not, see . 20 | */ 21 | 22 | #ifndef KCONFIGGUI_H 23 | #define KCONFIGGUI_H 24 | 25 | #include 26 | 27 | class KConfig; 28 | 29 | /** 30 | * Interface-related functions. 31 | */ 32 | namespace KConfigGui 33 | { 34 | /** 35 | * Returns the current application session config object. 36 | * 37 | * @return A pointer to the application's instance specific 38 | * KConfig object. 39 | * @see KConfig 40 | */ 41 | KConfig *sessionConfig(); 42 | 43 | /** 44 | * Replaces the current application session config object. 45 | * 46 | * @param id new session id 47 | * @param key new session key 48 | * 49 | * @since 5.11 50 | */ 51 | void setSessionConfig(const QString &id, const QString &key); 52 | 53 | /** 54 | * Indicates if a session config has been created for that application 55 | * (ie. if sessionConfig() got called at least once) 56 | * 57 | * @return true if a sessionConfig object was created, false otherwise 58 | */ 59 | bool hasSessionConfig(); 60 | 61 | //#if KCONFIGGUI_ENABLE_DEPRECATED_SINCE(5, 11) 62 | ///** 63 | // * Returns the name of the application session 64 | // * 65 | // * @return the application session name 66 | // * @deprecated since 5.11, use sessionConfig()->name() 67 | // */ 68 | //KCONFIGGUI_DEPRECATED_VERSION(5, 11, "Use KConfigGui::sessionConfig()->name()") 69 | //KCONFIGGUI_EXPORT QString sessionConfigName(); 70 | //#endif 71 | } 72 | 73 | #endif // KCONFIGGUI_H 74 | -------------------------------------------------------------------------------- /src/kui/kconfigloaderhandler_p.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007-2008 Aaron Seigo 3 | * Copyright 2013 Marco Martin 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU Library General Public License as 7 | * published by the Free Software Foundation; either version 2, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details 14 | * 15 | * You should have received a copy of the GNU Library General Public 16 | * License along with this program; if not, write to the 17 | * Free Software Foundation, Inc., 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifndef KCONFIGLOADERHANDLER_P_H 22 | #define KCONFIGLOADERHANDLER_P_H 23 | 24 | #include 25 | #include "kconfigloader.h" 26 | 27 | class ConfigLoaderHandler : public QXmlDefaultHandler 28 | { 29 | public: 30 | ConfigLoaderHandler(KConfigLoader *config, ConfigLoaderPrivate *d); 31 | bool startElement(const QString &namespaceURI, const QString &localName, 32 | const QString &qName, const QXmlAttributes &atts) override; 33 | bool endElement(const QString &namespaceURI, const QString &localName, 34 | const QString &qName) override; 35 | bool characters(const QString &ch) override; 36 | 37 | QString name() const; 38 | void setName(const QString &name); 39 | QString key() const; 40 | void setKey(const QString &name); 41 | QString type() const; 42 | QString defaultValue() const; 43 | 44 | private: 45 | virtual void addItem(); 46 | void resetState(); 47 | 48 | KConfigLoader *m_config; 49 | ConfigLoaderPrivate *d; 50 | int m_min; 51 | int m_max; 52 | QString m_name; 53 | QString m_key; 54 | QString m_type; 55 | QString m_label; 56 | QString m_default; 57 | QString m_cdata; 58 | QString m_whatsThis; 59 | KConfigSkeleton::ItemEnum::Choice m_choice; 60 | QList m_enumChoices; 61 | bool m_haveMin; 62 | bool m_haveMax; 63 | bool m_inChoice; 64 | }; 65 | 66 | #endif 67 | 68 | -------------------------------------------------------------------------------- /src/kui/kconfigwidgets_debug.cpp: -------------------------------------------------------------------------------- 1 | // This file was generated by ecm_qt_declare_logging_category(): DO NOT EDIT! 2 | 3 | #include "kconfigwidgets_debug.h" 4 | 5 | 6 | #if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) 7 | Q_LOGGING_CATEGORY(KCONFIG_WIDGETS_LOG, "kf5.kconfigwidgets", QtInfoMsg) 8 | #else 9 | Q_LOGGING_CATEGORY(KCONFIG_WIDGETS_LOG, "kf5.kconfigwidgets") 10 | #endif 11 | 12 | -------------------------------------------------------------------------------- /src/kui/kconfigwidgets_debug.h: -------------------------------------------------------------------------------- 1 | // This file was generated by ecm_qt_declare_logging_category(): DO NOT EDIT! 2 | 3 | #ifndef ECM_QLOGGINGCATEGORY_KCONFIG_WIDGETS_LOG_KCONFIGWIDGETS_DEBUG_H 4 | #define ECM_QLOGGINGCATEGORY_KCONFIG_WIDGETS_LOG_KCONFIGWIDGETS_DEBUG_H 5 | 6 | #include 7 | 8 | Q_DECLARE_LOGGING_CATEGORY(KCONFIG_WIDGETS_LOG) 9 | 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /src/kui/kfontaction.h: -------------------------------------------------------------------------------- 1 | /* This file is part of the KDE libraries 2 | Copyright (C) 1999 Reginald Stadlbauer 3 | (C) 1999 Simon Hausmann 4 | (C) 2000 Nicolas Hadacek 5 | (C) 2000 Kurt Granroth 6 | (C) 2000 Michael Koch 7 | (C) 2001 Holger Freyther 8 | (C) 2002 Ellis Whitehead 9 | (C) 2003 Andras Mantia 10 | (C) 2005-2006 Hamish Rodda 11 | 12 | This library is free software; you can redistribute it and/or 13 | modify it under the terms of the GNU Library General Public 14 | License version 2 as published by the Free Software Foundation. 15 | 16 | This library is distributed in the hope that it will be useful, 17 | but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | Library General Public License for more details. 20 | 21 | You should have received a copy of the GNU Library General Public License 22 | along with this library; see the file COPYING.LIB. If not, write to 23 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 24 | Boston, MA 02110-1301, USA. 25 | */ 26 | 27 | #ifndef KFONTACTION_H 28 | #define KFONTACTION_H 29 | 30 | #include 31 | 32 | /** 33 | * @class KFontAction kfontaction.h KFontAction 34 | * 35 | * An action to select a font family. 36 | * On a toolbar this will show a combobox with all the fonts on the system. 37 | */ 38 | class KFontAction : public KSelectAction 39 | { 40 | Q_OBJECT 41 | Q_PROPERTY(QString font READ font WRITE setFont) 42 | 43 | public: 44 | KFontAction(uint fontListCriteria, QObject *parent); 45 | explicit KFontAction(QObject *parent); 46 | KFontAction(const QString &text, QObject *parent); 47 | KFontAction(const QIcon &icon, const QString &text, QObject *parent); 48 | ~KFontAction() override; 49 | 50 | QString font() const; 51 | 52 | void setFont(const QString &family); 53 | 54 | QWidget *createWidget(QWidget *parent) override; 55 | 56 | private: 57 | class KFontActionPrivate; 58 | KFontActionPrivate *const d; 59 | }; 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /src/kui/kfontsizeaction.h: -------------------------------------------------------------------------------- 1 | /* This file is part of the KDE libraries 2 | Copyright (C) 1999 Reginald Stadlbauer 3 | (C) 1999 Simon Hausmann 4 | (C) 2000 Nicolas Hadacek 5 | (C) 2000 Kurt Granroth 6 | (C) 2000 Michael Koch 7 | (C) 2001 Holger Freyther 8 | (C) 2002 Ellis Whitehead 9 | (C) 2003 Andras Mantia 10 | (C) 2005-2006 Hamish Rodda 11 | 12 | This library is free software; you can redistribute it and/or 13 | modify it under the terms of the GNU Library General Public 14 | License version 2 as published by the Free Software Foundation. 15 | 16 | This library is distributed in the hope that it will be useful, 17 | but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | Library General Public License for more details. 20 | 21 | You should have received a copy of the GNU Library General Public License 22 | along with this library; see the file COPYING.LIB. If not, write to 23 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 24 | Boston, MA 02110-1301, USA. 25 | */ 26 | 27 | #ifndef KFONTSIZEACTION_H 28 | #define KFONTSIZEACTION_H 29 | 30 | #include 31 | 32 | /** 33 | * @class KFontSizeAction kfontsizeaction.h KFontSizeAction 34 | * 35 | * An action to allow changing of the font size. 36 | * This action will be shown as a combobox on a toolbar with a proper set of font sizes. 37 | */ 38 | class KFontSizeAction : public KSelectAction 39 | { 40 | Q_OBJECT 41 | Q_PROPERTY(int fontSize READ fontSize WRITE setFontSize) 42 | 43 | public: 44 | explicit KFontSizeAction(QObject *parent); 45 | KFontSizeAction(const QString &text, QObject *parent); 46 | KFontSizeAction(const QIcon &icon, const QString &text, QObject *parent); 47 | 48 | ~KFontSizeAction() override; 49 | 50 | int fontSize() const; 51 | 52 | void setFontSize(int size); 53 | 54 | Q_SIGNALS: 55 | void fontSizeChanged(int); 56 | 57 | protected Q_SLOTS: 58 | /** 59 | * This function is called whenever an action from the selections is triggered. 60 | */ 61 | void actionTriggered(QAction *action) override; 62 | 63 | private: 64 | class Private; 65 | Private *const d; 66 | }; 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /src/kui/kguiitem.h: -------------------------------------------------------------------------------- 1 | /* This file is part of the KDE libraries 2 | Copyright (C) 2001 Holger Freyther (freyher@yahoo.com) 3 | based on ideas from Martijn and Simon 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Library General Public 7 | License version 2 as published by the Free Software Foundation. 8 | 9 | This library 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 | Library General Public License for more details. 13 | 14 | You should have received a copy of the GNU Library General Public License 15 | along with this library; see the file COPYING.LIB. If not, write to 16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | Boston, MA 02110-1301, USA. 18 | 19 | Many thanks to Simon tronical Hausmann 20 | */ 21 | 22 | #ifndef kguiitem_h 23 | #define kguiitem_h 24 | 25 | #include 26 | 27 | #include 28 | 29 | class QPushButton; 30 | 31 | /** 32 | * @class KGuiItem kguiitem.h KGuiItem 33 | * 34 | * @short An abstract class for GUI data such as ToolTip and Icon. 35 | * 36 | * @author Holger Freyther 37 | * @see KStandardGuiItem 38 | */ 39 | class KGuiItem 40 | { 41 | public: 42 | KGuiItem(); 43 | 44 | // This is explicit because it's easy to get subtle bugs otherwise. The 45 | // icon name, tooltip and whatsthis text get changed behind your back if 46 | // you do 'setButtonFoo( "Bar" );' It gives the wrong impression that you 47 | // just change the text. 48 | explicit KGuiItem(const QString &text, 49 | const QString &iconName = QString(), 50 | const QString &toolTip = QString(), 51 | const QString &whatsThis = QString()); 52 | 53 | KGuiItem(const QString &text, const QIcon &icon, 54 | const QString &toolTip = QString(), 55 | const QString &whatsThis = QString()); 56 | 57 | KGuiItem(const KGuiItem &rhs); 58 | KGuiItem &operator=(const KGuiItem &rhs); 59 | 60 | ~KGuiItem(); 61 | 62 | QString text() const; 63 | QString plainText() const; 64 | 65 | QIcon icon() const; 66 | 67 | QString iconName() const; 68 | QString toolTip() const; 69 | QString whatsThis() const; 70 | bool isEnabled() const; 71 | bool hasIcon() const; 72 | 73 | void setText(const QString &text); 74 | void setIcon(const QIcon &iconset); 75 | void setIconName(const QString &iconName); 76 | void setToolTip(const QString &tooltip); 77 | void setWhatsThis(const QString &whatsThis); 78 | void setEnabled(bool enable); 79 | 80 | static void assign(QPushButton *button, const KGuiItem &item); 81 | private: 82 | class KGuiItemPrivate; 83 | KGuiItemPrivate *d; //krazy:exclude=dpointer (implicitly shared) 84 | }; 85 | 86 | #endif 87 | 88 | -------------------------------------------------------------------------------- /src/kui/kmessagebox_p.h: -------------------------------------------------------------------------------- 1 | /* This file is part of the KDE libraries 2 | * Copyright 2013 Aurélien Gâteau 3 | * 4 | * This library is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License or ( at 7 | * your option ) version 3 or, at the discretion of KDE e.V. ( which shall 8 | * act as a proxy as in section 14 of the GPLv3 ), any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Library General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this library; see the file COPYING.LIB. If not, write to 17 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | */ 20 | #ifndef KMESSAGEBOX_P_H 21 | #define KMESSAGEBOX_P_H 22 | 23 | #include 24 | #include 25 | 26 | namespace KMessageBox 27 | { 28 | 29 | KMessageBoxDontAskAgainInterface *dontAskAgainInterface(); 30 | 31 | KMessageBoxNotifyInterface *notifyInterface(); 32 | 33 | } // KMessageBox 34 | 35 | #endif /* KMESSAGEBOX_P_H */ 36 | -------------------------------------------------------------------------------- /src/kui/kmessageboxdontaskagaininterface.h: -------------------------------------------------------------------------------- 1 | /* This file is part of the KDE libraries 2 | * Copyright 2012 David Faure 3 | * 4 | * This library is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License or ( at 7 | * your option ) version 3 or, at the discretion of KDE e.V. ( which shall 8 | * act as a proxy as in section 14 of the GPLv3 ), any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Library General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this library; see the file COPYING.LIB. If not, write to 17 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifndef KMESSAGEBOXDONTASKAGAININTERFACE_H 22 | #define KMESSAGEBOXDONTASKAGAININTERFACE_H 23 | 24 | #include "kmessagebox.h" 25 | #include 26 | 27 | /** 28 | * @internal 29 | * Used internally by KMessageBox, implemented by plugin, for dynamic dependency on KConfig. 30 | */ 31 | class KMessageBoxDontAskAgainInterface 32 | { 33 | public: 34 | KMessageBoxDontAskAgainInterface() {} 35 | virtual ~KMessageBoxDontAskAgainInterface() {} 36 | 37 | virtual bool shouldBeShownYesNo(const QString &dontShowAgainName, KMessageBox::ButtonCode &result) = 0; 38 | virtual bool shouldBeShownContinue(const QString &dontShowAgainName) = 0; 39 | virtual void saveDontShowAgainYesNo(const QString &dontShowAgainName, KMessageBox::ButtonCode result) = 0; 40 | virtual void saveDontShowAgainContinue(const QString &dontShowAgainName) = 0; 41 | virtual void enableAllMessages() = 0; 42 | virtual void enableMessage(const QString &dontShowAgainName) = 0; 43 | virtual void setConfig(KConfig *) = 0; 44 | }; 45 | 46 | Q_DECLARE_METATYPE(KMessageBoxDontAskAgainInterface *) 47 | 48 | #define KMESSAGEBOXDONTASKAGAIN_PROPERTY "KMessageBoxDontAskAgain" 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /src/kui/kmessageboxnotifyinterface.h: -------------------------------------------------------------------------------- 1 | /* This file is part of the KDE libraries 2 | * Copyright 2013 Aurélien Gâteau 3 | * 4 | * This library is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License or ( at 7 | * your option ) version 3 or, at the discretion of KDE e.V. ( which shall 8 | * act as a proxy as in section 14 of the GPLv3 ), any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Library General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public License 16 | * along with this library; see the file COPYING.LIB. If not, write to 17 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifndef KMESSAGEBOXNOTIFYINTERFACE_H 22 | #define KMESSAGEBOXNOTIFYINTERFACE_H 23 | 24 | #include "kmessagebox.h" 25 | #include 26 | 27 | /** 28 | * @internal 29 | * Used internally by KMessageBox, implemented by plugin, for dynamic dependency on KNotification. 30 | */ 31 | class KMessageBoxNotifyInterface 32 | { 33 | public: 34 | KMessageBoxNotifyInterface() {} 35 | virtual ~KMessageBoxNotifyInterface() {} 36 | 37 | virtual void sendNotification(QMessageBox::Icon notificationType, const QString &message, QWidget *parent) = 0; 38 | }; 39 | 40 | Q_DECLARE_METATYPE(KMessageBoxNotifyInterface *) 41 | 42 | #define KMESSAGEBOXNOTIFY_PROPERTY "KMessageBoxNotify" 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /src/kui/kpagedialog_p.h: -------------------------------------------------------------------------------- 1 | /* This file is part of the KDE project 2 | Copyright (C) 2007 Matthias Kretz 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Library General Public 6 | License version 2 as published by the Free Software Foundation. 7 | 8 | This library is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | Library General Public License for more details. 12 | 13 | You should have received a copy of the GNU Library General Public License 14 | along with this library; see the file COPYING.LIB. If not, write to 15 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 16 | Boston, MA 02110-1301, USA. 17 | 18 | */ 19 | 20 | #ifndef PAGED_KPAGEDIALOG_P_H 21 | #define PAGED_KPAGEDIALOG_P_H 22 | 23 | #include "kpagedialog.h" 24 | #include 25 | #include 26 | #include 27 | 28 | class KPageDialogPrivate 29 | { 30 | Q_DECLARE_PUBLIC(KPageDialog) 31 | protected: 32 | KPageDialogPrivate(KPageDialog *parent) 33 | : q_ptr(parent), 34 | mPageWidget(nullptr), 35 | mButtonBox(nullptr) 36 | { 37 | } 38 | 39 | virtual ~KPageDialogPrivate() 40 | { 41 | } 42 | 43 | KPageDialog *const q_ptr; 44 | KPageWidget *mPageWidget; 45 | QDialogButtonBox *mButtonBox; 46 | 47 | void init() 48 | { 49 | Q_Q(KPageDialog); 50 | delete q->layout(); 51 | 52 | QVBoxLayout *layout = new QVBoxLayout; 53 | q->setLayout(layout); 54 | layout->setContentsMargins(0, 0, 0, 0); 55 | 56 | if (mPageWidget) { 57 | q->connect(mPageWidget, &KPageWidget::currentPageChanged, 58 | q, &KPageDialog::currentPageChanged); 59 | q->connect(mPageWidget, &KPageWidget::pageRemoved, 60 | q, &KPageDialog::pageRemoved); 61 | layout->addWidget(mPageWidget); 62 | } else { 63 | layout->addStretch(); 64 | } 65 | 66 | if (mButtonBox) { 67 | q->connect(mButtonBox, &QDialogButtonBox::accepted, q, &QDialog::accept); 68 | q->connect(mButtonBox, &QDialogButtonBox::rejected, q, &QDialog::reject); 69 | if (mPageWidget) { 70 | mPageWidget->setPageFooter(mButtonBox); 71 | } else { 72 | layout->addWidget(mButtonBox); 73 | } 74 | } 75 | } 76 | }; 77 | 78 | #endif // PAGED_KPAGEDIALOG_P_H 79 | -------------------------------------------------------------------------------- /src/kui/kpagemodel.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of the KDE Libraries 3 | 4 | Copyright (C) 2006 Tobias Koenig (tokoe@kde.org) 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Library General Public 8 | License as published by the Free Software Foundation; either 9 | version 2 of the License, or (at your option) any later version. 10 | 11 | This library 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 GNU 14 | Library General Public License for more details. 15 | 16 | You should have received a copy of the GNU Library General Public License 17 | along with this library; see the file COPYING.LIB. If not, write to 18 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 | Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | #include "kpagemodel.h" 23 | #include "kpagemodel_p.h" 24 | 25 | KPageModelPrivate::~KPageModelPrivate() 26 | { 27 | } 28 | 29 | KPageModel::KPageModel(QObject *parent) 30 | : QAbstractItemModel(parent), d_ptr(nullptr) 31 | { 32 | } 33 | 34 | KPageModel::KPageModel(KPageModelPrivate &dd, QObject *parent) 35 | : QAbstractItemModel(parent), d_ptr(&dd) 36 | { 37 | d_ptr->q_ptr = this; 38 | } 39 | 40 | KPageModel::~KPageModel() 41 | { 42 | delete d_ptr; 43 | } 44 | 45 | -------------------------------------------------------------------------------- /src/kui/kpagemodel_p.h: -------------------------------------------------------------------------------- 1 | /* This file is part of the KDE project 2 | Copyright (C) 2007 Matthias Kretz 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Library General Public 6 | License version 2 as published by the Free Software Foundation. 7 | 8 | This library is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | Library General Public License for more details. 12 | 13 | You should have received a copy of the GNU Library General Public License 14 | along with this library; see the file COPYING.LIB. If not, write to 15 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 16 | Boston, MA 02110-1301, USA. 17 | 18 | */ 19 | 20 | #ifndef KPAGEMODEL_P_H 21 | #define KPAGEMODEL_P_H 22 | 23 | #include "kpagemodel.h" 24 | 25 | class KPageModelPrivate 26 | { 27 | Q_DECLARE_PUBLIC(KPageModel) 28 | public: 29 | virtual ~KPageModelPrivate(); 30 | 31 | protected: 32 | KPageModel *q_ptr; 33 | }; 34 | 35 | #endif // KPAGEMODEL_P_H 36 | -------------------------------------------------------------------------------- /src/kui/kpagewidget_p.h: -------------------------------------------------------------------------------- 1 | /* This file is part of the KDE project 2 | Copyright (C) 2007 Matthias Kretz 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Library General Public 6 | License version 2 as published by the Free Software Foundation. 7 | 8 | This library is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | Library General Public License for more details. 12 | 13 | You should have received a copy of the GNU Library General Public License 14 | along with this library; see the file COPYING.LIB. If not, write to 15 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 16 | Boston, MA 02110-1301, USA. 17 | 18 | */ 19 | 20 | #ifndef KPAGEWIDGET_P_H 21 | #define KPAGEWIDGET_P_H 22 | 23 | #include "kpagewidget.h" 24 | #include "kpageview_p.h" 25 | 26 | class KPageWidgetModel; 27 | class KPageWidgetPrivate : public KPageViewPrivate 28 | { 29 | Q_DECLARE_PUBLIC(KPageWidget) 30 | protected: 31 | KPageWidgetPrivate(KPageWidget *q); 32 | 33 | KPageWidgetModel *model() const 34 | { 35 | return static_cast(KPageViewPrivate::model); 36 | } 37 | 38 | void _k_slotCurrentPageChanged(const QModelIndex &, const QModelIndex &); 39 | }; 40 | 41 | #endif // KPAGEWIDGET_P_H 42 | -------------------------------------------------------------------------------- /src/kui/kpagewidgetmodel_p.h: -------------------------------------------------------------------------------- 1 | /* This file is part of the KDE project 2 | Copyright (C) 2007 Matthias Kretz 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Library General Public 6 | License version 2 as published by the Free Software Foundation. 7 | 8 | This library is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | Library General Public License for more details. 12 | 13 | You should have received a copy of the GNU Library General Public License 14 | along with this library; see the file COPYING.LIB. If not, write to 15 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 16 | Boston, MA 02110-1301, USA. 17 | 18 | */ 19 | 20 | #ifndef KPAGEWIDGETMODEL_P_H 21 | #define KPAGEWIDGETMODEL_P_H 22 | 23 | #include "kpagemodel_p.h" 24 | #include "kpagewidgetmodel.h" 25 | 26 | class PageItem 27 | { 28 | public: 29 | explicit PageItem(KPageWidgetItem *pageItem, PageItem *parent = nullptr); 30 | ~PageItem(); 31 | 32 | PageItem(const PageItem &) = delete; 33 | PageItem &operator=(const PageItem &) = delete; 34 | 35 | void appendChild(PageItem *child); 36 | void insertChild(int row, PageItem *child); 37 | void removeChild(int row); 38 | 39 | PageItem *child(int row); 40 | int childCount() const; 41 | int columnCount() const; 42 | int row() const; 43 | PageItem *parent(); 44 | 45 | KPageWidgetItem *pageWidgetItem() const; 46 | 47 | PageItem *findChild(const KPageWidgetItem *item); 48 | 49 | void dump(int indent = 0); 50 | 51 | private: 52 | KPageWidgetItem *mPageWidgetItem; 53 | 54 | QList mChildItems; 55 | PageItem *mParentItem; 56 | }; 57 | 58 | class KPageWidgetModelPrivate : public KPageModelPrivate 59 | { 60 | Q_DECLARE_PUBLIC(KPageWidgetModel) 61 | protected: 62 | KPageWidgetModelPrivate() 63 | : rootItem(new PageItem(nullptr, nullptr)) 64 | { 65 | } 66 | 67 | ~KPageWidgetModelPrivate() 68 | { 69 | delete rootItem; 70 | rootItem = nullptr; 71 | } 72 | 73 | PageItem *rootItem; 74 | 75 | void _k_itemChanged() 76 | { 77 | Q_Q(KPageWidgetModel); 78 | KPageWidgetItem *item = qobject_cast(q->sender()); 79 | if (!item) { 80 | return; 81 | } 82 | 83 | const QModelIndex index = q->index(item); 84 | if (!index.isValid()) { 85 | return; 86 | } 87 | 88 | emit q->dataChanged(index, index); 89 | } 90 | 91 | void _k_itemToggled(bool checked) 92 | { 93 | Q_Q(KPageWidgetModel); 94 | KPageWidgetItem *item = qobject_cast(q->sender()); 95 | if (!item) { 96 | return; 97 | } 98 | 99 | emit q->toggled(item, checked); 100 | } 101 | }; 102 | 103 | #endif // KPAGEWIDGETMODEL_P_H 104 | -------------------------------------------------------------------------------- /src/kui/kpluralhandlingspinbox.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2014 Laurent Montel 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * This library 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 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with this library; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 17 | * 02110-1301 USA 18 | */ 19 | 20 | #include "kpluralhandlingspinbox.h" 21 | 22 | class Q_DECL_HIDDEN KPluralHandlingSpinBox::KPluralHandlingSpinBoxPrivate 23 | { 24 | public: 25 | KPluralHandlingSpinBoxPrivate(QSpinBox *q) 26 | : q(q) 27 | { 28 | connect(q, SIGNAL(valueChanged(int)), q, SLOT(updateSuffix(int))); 29 | } 30 | 31 | void updateSuffix(int value) 32 | { 33 | if (!pluralSuffix.isEmpty()) { 34 | KLocalizedString s = pluralSuffix; 35 | q->setSuffix(s.subs(value).toString()); 36 | } 37 | } 38 | 39 | QSpinBox *q; 40 | KLocalizedString pluralSuffix; 41 | }; 42 | 43 | 44 | KPluralHandlingSpinBox::KPluralHandlingSpinBox(QWidget *parent) 45 | : QSpinBox(parent), 46 | d(new KPluralHandlingSpinBoxPrivate(this)) 47 | { 48 | } 49 | 50 | KPluralHandlingSpinBox::~KPluralHandlingSpinBox() 51 | { 52 | delete d; 53 | } 54 | 55 | void KPluralHandlingSpinBox::setSuffix(const KLocalizedString &suffix) 56 | { 57 | d->pluralSuffix = suffix; 58 | if (suffix.isEmpty()) { 59 | QSpinBox::setSuffix(QString()); 60 | } else { 61 | d->updateSuffix(value()); 62 | } 63 | } 64 | #include "moc_kpluralhandlingspinbox.cpp" 65 | -------------------------------------------------------------------------------- /src/kui/kpluralhandlingspinbox.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 Laurent Montel 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * This library 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 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with this library; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 17 | * 02110-1301 USA 18 | */ 19 | 20 | #ifndef KPLURALHANDLINGSPINBOX_H 21 | #define KPLURALHANDLINGSPINBOX_H 22 | 23 | #include 24 | #include 25 | 26 | 27 | /** 28 | * @class KPluralHandlingSpinBox kpluralhandlingspinbox.h 29 | * 30 | * @brief A QSpinBox with plural handling for the suffix. 31 | * 32 | * @author Laurent Montel 33 | * 34 | * @since 5.0 35 | */ 36 | class KPluralHandlingSpinBox : public QSpinBox 37 | { 38 | Q_OBJECT 39 | public: 40 | /** 41 | * Default constructor 42 | */ 43 | 44 | explicit KPluralHandlingSpinBox(QWidget *parent = nullptr); 45 | ~KPluralHandlingSpinBox(); 46 | 47 | /** 48 | * Sets the suffix to @p suffix. 49 | * Use this to add a plural-aware suffix, e.g. by using ki18np("singular", "plural"). 50 | */ 51 | void setSuffix(const KLocalizedString &suffix); 52 | private: 53 | class KPluralHandlingSpinBoxPrivate; 54 | friend class KPluralHandlingSpinBoxPrivate; 55 | KPluralHandlingSpinBoxPrivate *const d; 56 | 57 | Q_DISABLE_COPY(KPluralHandlingSpinBox) 58 | Q_PRIVATE_SLOT(d, void updateSuffix(int)) 59 | }; 60 | 61 | #endif // KPLURALHANDLINGSPINBOX_H 62 | -------------------------------------------------------------------------------- /src/kui/loggingcategory.cpp: -------------------------------------------------------------------------------- 1 | // This file was generated by ecm_qt_declare_logging_category(): DO NOT EDIT! 2 | 3 | #include "loggingcategory.h" 4 | 5 | 6 | #if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) 7 | Q_LOGGING_CATEGORY(KWidgetsAddonsLog, "kf5.kwidgetsaddons", QtWarningMsg) 8 | #else 9 | Q_LOGGING_CATEGORY(KWidgetsAddonsLog, "kf5.kwidgetsaddons") 10 | #endif 11 | 12 | -------------------------------------------------------------------------------- /src/kui/loggingcategory.h: -------------------------------------------------------------------------------- 1 | // This file was generated by ecm_qt_declare_logging_category(): DO NOT EDIT! 2 | 3 | #ifndef ECM_QLOGGINGCATEGORY_KWIDGETSADDONSLOG_LOGGINGCATEGORY_H 4 | #define ECM_QLOGGINGCATEGORY_KWIDGETSADDONSLOG_LOGGINGCATEGORY_H 5 | 6 | #include 7 | 8 | Q_DECLARE_LOGGING_CATEGORY(KWidgetsAddonsLog) 9 | 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /src/profile/ColorSchemeEditor.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2007-2008 by Robert Knight 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 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 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 17 | 02110-1301 USA. 18 | */ 19 | 20 | #ifndef COLORSCHEMEEDITOR_H 21 | #define COLORSCHEMEEDITOR_H 22 | 23 | // Qt 24 | #include 25 | 26 | // KDE 27 | #include 28 | 29 | // Konsole 30 | #include "Profile.h" 31 | 32 | class QTableWidgetItem; 33 | 34 | namespace Ui { 35 | class ColorSchemeEditor; 36 | } 37 | 38 | namespace terminal { 39 | class ColorScheme; 40 | 41 | /** 42 | * A dialog for editing color schemes. 43 | * 44 | * After creation, the dialog can be initialized with the settings 45 | * of a color scheme using the setup() method. 46 | * 47 | * The dialog creates a copy of the supplied color scheme to which 48 | * any changes made are applied. The modified color scheme 49 | * can be retrieved using the colorScheme() method. 50 | * 51 | * When changes are made the colorsChanged() signal is emitted. 52 | */ 53 | class ColorSchemeEditor : public QDialog 54 | { 55 | Q_OBJECT 56 | 57 | public: 58 | /** Constructs a new color scheme editor with the specified parent. */ 59 | explicit ColorSchemeEditor(QWidget *parent = nullptr); 60 | ~ColorSchemeEditor() Q_DECL_OVERRIDE; 61 | 62 | /** Initializes the dialog with the properties of the specified color scheme. */ 63 | void setup(const ColorScheme *scheme, bool isNewScheme); 64 | /** Returns the modified color scheme. */ 65 | ColorScheme &colorScheme() const; 66 | bool isNewScheme() const; 67 | 68 | Q_SIGNALS: 69 | /** Emitted when the colors in the color scheme change. */ 70 | void colorsChanged(ColorScheme *scheme); 71 | /** Used to send back colorscheme changes into the profile edited */ 72 | void colorSchemeSaveRequested(const ColorScheme &scheme, bool isNewScheme); 73 | 74 | public Q_SLOTS: 75 | /** Sets the text displayed in the description edit field. */ 76 | void setDescription(const QString &description); 77 | 78 | private Q_SLOTS: 79 | void setRandomizedBackgroundColor(bool randomized); 80 | void editColorItem(QTableWidgetItem *item); 81 | /** Triggered by apply/ok buttons */ 82 | void saveColorScheme(); 83 | 84 | private: 85 | Q_DISABLE_COPY(ColorSchemeEditor) 86 | 87 | void setupColorTable(const ColorScheme *table); 88 | 89 | bool _isNewScheme; 90 | Ui::ColorSchemeEditor *_ui; 91 | ColorScheme *_colors; 92 | }; 93 | } 94 | 95 | #endif // COLORSCHEMEEDITOR_H 96 | -------------------------------------------------------------------------------- /src/profile/ColorSchemeEditor.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | ColorSchemeEditor 4 | 5 | 6 | 7 | 0 8 | 0 9 | 364 10 | 376 11 | 12 | 13 | 14 | 15 | 0 16 | 17 | 18 | 0 19 | 20 | 21 | 0 22 | 23 | 24 | 0 25 | 26 | 27 | 28 | 29 | 30 | 31 | Description: 32 | 33 | 34 | Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | Hue and saturation values of default foreground and background colors are randomized by default. Some color schemes might use different randomization settings. 50 | To see any effect, set colors with saturation value greater than 0. 51 | 52 | 53 | Randomly adjust colors for each session 54 | 55 | 56 | 57 | 58 | 59 | 60 | Qt::Vertical 61 | 62 | 63 | QSizePolicy::Fixed 64 | 65 | 66 | 67 | 364 68 | 5 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /src/profile/FontDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018 by Mariusz Glebocki 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 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 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 17 | 02110-1301 USA. 18 | */ 19 | 20 | #ifndef FONTDIALOG_H 21 | #define FONTDIALOG_H 22 | 23 | // Qt 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | 30 | namespace terminal { 31 | class FontDialog: public QDialog 32 | { 33 | Q_OBJECT 34 | 35 | public: 36 | explicit FontDialog(QWidget *parent = nullptr); 37 | 38 | QFont font() const { return _fontChooser->font(); } 39 | void setFont(const QFont &font); 40 | 41 | Q_SIGNALS: 42 | void fontChanged(const QFont &font); 43 | 44 | private: 45 | KFontChooser *_fontChooser; 46 | QCheckBox *_showAllFonts; 47 | QToolButton *_showAllFontsWarningButton; 48 | QDialogButtonBox *_buttonBox; 49 | }; 50 | } 51 | 52 | #endif // FONTDIALOG_H 53 | -------------------------------------------------------------------------------- /src/settings/GeneralSettings.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2011 Kurt Hindenburg 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License as 6 | published by the Free Software Foundation; either version 2 of 7 | the License or (at your option) version 3 or any later version 8 | accepted by the membership of KDE e.V. (or its successor appro- 9 | ved by the membership of KDE e.V.), which shall act as a proxy 10 | defined in Section 14 of version 3 of the license. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program. If not, see http://www.gnu.org/licenses/. 19 | */ 20 | 21 | // Own 22 | #include "GeneralSettings.h" 23 | 24 | #include 25 | 26 | using namespace Konsole; 27 | 28 | GeneralSettings::GeneralSettings(QWidget* aParent) : QWidget(aParent) 29 | { 30 | setupUi(this); 31 | 32 | connect(enableAllMessagesButton, &QPushButton::clicked, this, &Konsole::GeneralSettings::slotEnableAllMessages); 33 | 34 | kcfg_ShowTerminalSizeHint->setVisible(false); 35 | } 36 | 37 | GeneralSettings::~GeneralSettings() = default; 38 | 39 | void GeneralSettings::slotEnableAllMessages() 40 | { 41 | KMessageBox::enableAllMessages(); 42 | } 43 | 44 | -------------------------------------------------------------------------------- /src/settings/GeneralSettings.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2011 Kurt Hindenburg 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License as 6 | published by the Free Software Foundation; either version 2 of 7 | the License or (at your option) version 3 or any later version 8 | accepted by the membership of KDE e.V. (or its successor appro- 9 | ved by the membership of KDE e.V.), which shall act as a proxy 10 | defined in Section 14 of version 3 of the license. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program. If not, see http://www.gnu.org/licenses/. 19 | */ 20 | 21 | #ifndef GENERALSETTINGS_H 22 | #define GENERALSETTINGS_H 23 | 24 | #include "ui_GeneralSettings.h" 25 | 26 | namespace Konsole { 27 | class GeneralSettings : public QWidget, private Ui::GeneralSettings 28 | { 29 | Q_OBJECT 30 | 31 | public: 32 | explicit GeneralSettings(QWidget *aParent = nullptr); 33 | ~GeneralSettings() Q_DECL_OVERRIDE; 34 | 35 | public Q_SLOTS: 36 | void slotEnableAllMessages(); 37 | }; 38 | } 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/settings/HistorySizeWidget.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2007-2008 by Robert Knight 3 | Copyright 2012 by Jekyll Wu 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 18 | 02110-1301 USA. 19 | */ 20 | 21 | #ifndef HISTORYSIZEWIDGET_H 22 | #define HISTORYSIZEWIDGET_H 23 | 24 | // Qt 25 | #include 26 | 27 | // Konsole 28 | #include "Enumeration.h" 29 | 30 | class QAbstractButton; 31 | 32 | namespace Ui { 33 | class HistorySizeWidget; 34 | } 35 | 36 | namespace terminal { 37 | /** 38 | * A widget for controlling history related options 39 | */ 40 | class HistorySizeWidget : public QWidget 41 | { 42 | Q_OBJECT 43 | 44 | public: 45 | explicit HistorySizeWidget(QWidget *parent); 46 | ~HistorySizeWidget() Q_DECL_OVERRIDE; 47 | 48 | /** Specifies the history mode. */ 49 | void setMode(Enum::HistoryModeEnum aMode); 50 | 51 | /** Returns the history mode chosen by the user. */ 52 | Enum::HistoryModeEnum mode() const; 53 | 54 | /** Sets the number of lines for the fixed size history mode. */ 55 | void setLineCount(int lines); 56 | 57 | /** 58 | * Returns the number of lines of history to remember. 59 | * This is only valid when mode() == FixedSizeHistory, 60 | * and returns 0 otherwise. 61 | */ 62 | int lineCount() const; 63 | 64 | /** 65 | * Return height which should be set on the widget's label 66 | * to align with the first widget's item 67 | */ 68 | int preferredLabelHeight(); 69 | 70 | Q_SIGNALS: 71 | /** Emitted when the history mode is changed. */ 72 | void historyModeChanged(Enum::HistoryModeEnum); 73 | 74 | /** Emitted when the history size is changed. */ 75 | void historySizeChanged(int); 76 | 77 | private Q_SLOTS: 78 | void buttonClicked(QAbstractButton *); 79 | 80 | private: 81 | Ui::HistorySizeWidget *_ui; 82 | 83 | // 1000 lines was the default in the KDE3 series 84 | static const int DefaultLineCount = 1000; 85 | }; 86 | } 87 | 88 | #endif // HISTORYSIZEWIDGET_H 89 | -------------------------------------------------------------------------------- /src/settings/KonsoleSettings.kcfgc: -------------------------------------------------------------------------------- 1 | File=konsole.kcfg 2 | NameSpace=Konsole 3 | ClassName=KonsoleSettings 4 | Singleton=true 5 | MemberVariables=private 6 | ItemAccessors=true 7 | Mutators=true 8 | GlobalEnums=true 9 | SetUserTexts=true 10 | Visibility=Q_DECL_EXPORT 11 | -------------------------------------------------------------------------------- /src/settings/TemporaryFilesSettings.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2015 Kurt Hindenburg 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License as 6 | published by the Free Software Foundation; either version 2 of 7 | the License or (at your option) version 3 or any later version 8 | accepted by the membership of KDE e.V. (or its successor appro- 9 | ved by the membership of KDE e.V.), which shall act as a proxy 10 | defined in Section 14 of version 3 of the license. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program. If not, see http://www.gnu.org/licenses/. 19 | */ 20 | 21 | // Own 22 | #include "TemporaryFilesSettings.h" 23 | 24 | // Qt 25 | #include 26 | 27 | using namespace Konsole; 28 | 29 | 30 | 31 | TemporaryFilesSettings::TemporaryFilesSettings(QWidget* aParent) : QWidget(aParent) 32 | { 33 | setupUi(this); 34 | 35 | const QString tempPath = QStandardPaths::writableLocation(QStandardPaths::TempLocation); 36 | QString cachePath = QStandardPaths::writableLocation(QStandardPaths::CacheLocation); 37 | #ifdef Q_OS_UNIX 38 | // Use "~" instead of full path. It looks nice and helps 39 | // in cases when home path is really long. 40 | const QString homePath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation); 41 | if(cachePath.startsWith(homePath)) { 42 | cachePath.replace(0, homePath.length(), QStringLiteral("~")); 43 | } 44 | #endif 45 | 46 | // There's no way of doing this with strings placed in .ui file 47 | kcfg_scrollbackUseSystemLocation->setText( 48 | i18nc("@option:radio File location; %1: path to directory placeholder", 49 | "System temporary directory (%1)", tempPath)); 50 | kcfg_scrollbackUseCacheLocation->setText( 51 | i18nc("@option:radio File location; %1: path to directory placeholder", 52 | "User cache directory (%1)", cachePath)); 53 | 54 | kcfg_scrollbackUseSpecifiedLocationDirectory->setMode(KFile::Directory); 55 | } 56 | -------------------------------------------------------------------------------- /src/settings/TemporaryFilesSettings.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2015 Kurt Hindenburg 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License as 6 | published by the Free Software Foundation; either version 2 of 7 | the License or (at your option) version 3 or any later version 8 | accepted by the membership of KDE e.V. (or its successor appro- 9 | ved by the membership of KDE e.V.), which shall act as a proxy 10 | defined in Section 14 of version 3 of the license. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program. If not, see http://www.gnu.org/licenses/. 19 | */ 20 | 21 | #ifndef TEMPORARYFILESSETTINGS_H 22 | #define TEMPORARYFILESSETTINGS_H 23 | 24 | #include "ui_TemporaryFilesSettings.h" 25 | 26 | namespace Konsole { 27 | class TemporaryFilesSettings : public QWidget, private Ui::TemporaryFilesSettings 28 | { 29 | Q_OBJECT 30 | 31 | public: 32 | explicit TemporaryFilesSettings(QWidget *aParent = nullptr); 33 | ~TemporaryFilesSettings() override = default; 34 | }; 35 | } 36 | 37 | #endif 38 | --------------------------------------------------------------------------------