GNU Octave  4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
settings-dialog.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2011-2015 Jacob Dawid
4 
5 This file is part of Octave.
6 
7 Octave is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the
9 Free Software Foundation; either version 3 of the License, or (at your
10 option) any later version.
11 
12 Octave is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with Octave; see the file COPYING. If not, see
19 <http://www.gnu.org/licenses/>.
20 
21 */
22 
23 #ifndef SETTINGSDIALOG_H
24 #define SETTINGSDIALOG_H
25 
26 #include <QDialog>
27 #include <QSettings>
28 #include <QLineEdit>
29 
30 #include "color-picker.h"
31 
32 #ifdef HAVE_QSCINTILLA
33 class QsciLexer;
34 #endif
35 
36 namespace Ui
37 {
38  class settings_dialog;
39 }
40 
42 {
43  Q_OBJECT public:
44  explicit settings_dialog (QWidget * parent,
45  const QString& desired_tab = QString ());
47  void show_tab (const QString&);
48 
49 signals:
50  void apply_new_settings ();
51 
52 private slots:
53  void get_octave_dir ();
54  void get_file_browser_dir ();
55  void get_dir (QLineEdit*, const QString&);
56  void set_disabled_pref_file_browser_dir (bool disable);
57 
58  // slots for dialog's buttons
59  void button_clicked (QAbstractButton *button);
60 
61  // slots for import/export-buttons of shortcut sets
62  void import_shortcut_set1 ();
63  void export_shortcut_set1 ();
64  void import_shortcut_set2 ();
65  void export_shortcut_set2 ();
66 
67 private:
69 #ifdef HAVE_QSCINTILLA
70  void read_lexer_settings (QsciLexer *lexer, QSettings *settings);
71  void write_lexer_settings (QsciLexer *lexer, QSettings *settings);
72  int get_valid_lexer_styles (QsciLexer *lexer, int styles[]);
73  enum { MaxLexerStyles = 64,
74  MaxStyleNumber = 128 };
75 #endif
76 
77  void write_changed_settings (bool closing);
78 
79  void read_workspace_colors (QSettings *settings);
80  void write_workspace_colors (QSettings *settings);
81 
82  void read_terminal_colors (QSettings *settings);
83  void write_terminal_colors (QSettings *settings);
84 
90 };
91 
92 #endif // SETTINGSDIALOG_H
settings_dialog(QWidget *parent, const QString &desired_tab=QString())
void set_disabled_pref_file_browser_dir(bool disable)
Ui::settings_dialog * ui
void read_terminal_colors(QSettings *settings)
color_picker * _widget_title_fg_color
color_picker * _widget_title_bg_color
color_picker * _widget_title_fg_color_active
#define lexer
Definition: oct-parse.cc:170
void write_workspace_colors(QSettings *settings)
void write_changed_settings(bool closing)
void show_tab(const QString &)
color_picker * _widget_title_bg_color_active
color_picker * _editor_current_line_color
void write_terminal_colors(QSettings *settings)
void get_dir(QLineEdit *, const QString &)
void button_clicked(QAbstractButton *button)
void read_workspace_colors(QSettings *settings)