Pages
API Documentation
On this page

KTextEditor::ConfigPage Class

Config page interface for the Editor and Plugin%s. More...

  • Header: #include <KTextEditor/ConfigPage>
  • CMake: find_package(KF6 REQUIRED COMPONENTS TextEditor)
    target_link_libraries(mytarget PRIVATE KF6::TextEditor)
  • Inherits: QWidget

List of all members, including inherited members

Public Functions

Public Slots

Signals

Detailed Description

Introduction

The class ConfigPage represents a config page. The config pages are usually embedded into a dialog that shows buttons like Defaults, Reset and Apply. If one of the buttons is clicked and the config page sent the signal changed() beforehand the Editor will call the corresponding slot, either defaults(), reset() or apply().

To obtain a useful navigation information for displaying to a user see name(), fullName() and icon() functions.

Saving and Loading Config Data

Saving and loading the configuration data can either be achieved by using the host application's KSharedConfig::openConfig() object, or by using an own configuration file.

See also KTextEditor::Editor, KTextEditor::Plugin

Member Function Documentation

ConfigPage::ConfigPage(QWidget *parent)

Constructor.

Create a new config page with the specified parent.

parent is the parent widget

[pure virtual slot] void ConfigPage::apply()

This slot is called whenever the button Apply or OK was clicked. Apply the changed settings made in the config page now.

[signal] void ConfigPage::changed()

Emit this signal whenever a config option changed.

[pure virtual slot] void ConfigPage::defaults()

Sets default options This slot is called whenever the button Defaults was clicked. Set the config page settings to the default values.

[virtual] QString ConfigPage::fullName() const

Get a readable full name for the config page. The name should be translated.

Example: If the name is "Filetypes", the full name could be "Filetype Specific Settings". For "Shortcuts" the full name would be something like "Shortcut Configuration". Returns full name of given page index, default implementation returns name()

See also name(), icon()

[virtual] QIcon ConfigPage::icon() const

Get an icon for the config page. Returns icon for the given page index

See also name(), fullName()

[pure virtual] QString ConfigPage::name() const

Get a readable name for the config page. The name should be translated. Returns name of given page index

See also fullName(), icon()

[pure virtual slot] void ConfigPage::reset()

This slot is called whenever the button Reset was clicked. Reset the config page settings to the initial state.

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.