GNU Octave 7.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
settings-dialog.h
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////
2//
3// Copyright (C) 2011-2022 The Octave Project Developers
4//
5// See the file COPYRIGHT.md in the top-level directory of this
6// distribution or <https://octave.org/copyright/>.
7//
8// This file is part of Octave.
9//
10// Octave is free software: you can redistribute it and/or modify it
11// under the terms of the GNU General Public License as published by
12// the Free Software Foundation, either version 3 of the License, or
13// (at your option) any later version.
14//
15// Octave is distributed in the hope that it will be useful, but
16// WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18// GNU General Public License for more details.
19//
20// You should have received a copy of the GNU General Public License
21// along with Octave; see the file COPYING. If not, see
22// <https://www.gnu.org/licenses/>.
23//
24////////////////////////////////////////////////////////////////////////
25
26#if ! defined (octave_settings_dialog_h)
27#define octave_settings_dialog_h 1
28
29#include <QCheckBox>
30#include <QDialog>
31#include <QLineEdit>
32#include <QRadioButton>
33
34#include "color-picker.h"
35#include "gui-preferences-ed.h"
36#include "gui-settings.h"
37#include "ui-settings-dialog.h"
38
39class QsciLexer;
40
41namespace octave
42{
43 class base_qobject;
44
45 // Ui::settings_dialog is a generated class.
46
47 class settings_dialog : public QDialog, private Ui::settings_dialog
48 {
49 Q_OBJECT public:
50
51 explicit settings_dialog (QWidget *parent, base_qobject& octave_qobj,
52 const QString& desired_tab = QString ());
53
54 ~settings_dialog (void) = default;
55
56 void show_tab (const QString&);
57
58 signals:
59
60 void apply_new_settings (void);
61
62 private slots:
63
64 void get_octave_dir (void);
65 void get_file_browser_dir (void);
66 void get_dir (QLineEdit *, const QString&);
67 void set_disabled_pref_file_browser_dir (bool disable);
68 void proxy_items_update (void);
69
70 // slots updating colors depending on theme
71 void update_terminal_colors (int def = 0);
72 void update_workspace_colors (int def = 0);
73 void update_varedit_colors (int def = 0);
74 void update_editor_lexers (int def = 0);
75
76 // slots for dialog's buttons
77 void button_clicked (QAbstractButton *button);
78
79 // slots for import/export-buttons of shortcut sets
80 void import_shortcut_set (void);
81 void export_shortcut_set (void);
82 void default_shortcut_set (void);
83
84 private:
85
86#if defined (HAVE_QSCINTILLA)
87 void update_lexer (QsciLexer *lexer, gui_settings *settings, int mode, int def = 0);
90#endif
91
92 void write_changed_settings (bool closing);
93
96
99
102
104
109
112
115 };
116}
117
118#endif
Base class for Octave interfaces that use Qt.
void write_terminal_colors(gui_settings *settings)
QCheckBox * m_rb_uncomment_strings[ed_comment_strings_count]
void button_clicked(QAbstractButton *button)
void write_lexer_settings(QsciLexer *lexer, gui_settings *settings)
QRadioButton * m_rb_comment_strings[ed_comment_strings_count]
color_picker * m_widget_title_fg_color
void update_editor_lexers(int def=0)
void update_varedit_colors(int def=0)
void get_dir(QLineEdit *, const QString &)
void update_terminal_colors(int def=0)
void write_varedit_colors(gui_settings *settings)
color_picker * m_widget_title_fg_color_active
void update_workspace_colors(int def=0)
color_picker * m_widget_title_bg_color
void read_workspace_colors(gui_settings *settings)
void set_disabled_pref_file_browser_dir(bool disable)
base_qobject & m_octave_qobj
void apply_new_settings(void)
void read_varedit_colors(gui_settings *settings)
color_picker * m_widget_title_bg_color_active
void write_changed_settings(bool closing)
void update_lexer(QsciLexer *lexer, gui_settings *settings, int mode, int def=0)
void read_terminal_colors(gui_settings *settings)
settings_dialog(QWidget *parent, base_qobject &octave_qobj, const QString &desired_tab=QString())
void show_tab(const QString &)
void get_lexer_settings(QsciLexer *lexer, gui_settings *settings)
~settings_dialog(void)=default
void write_workspace_colors(gui_settings *settings)
const int ed_comment_strings_count