Changeset View
Changeset View
Standalone View
Standalone View
src/mode/katemodeconfigpage.cpp
Show All 35 Lines | |||||
36 | #include <QRegularExpression> | 36 | #include <QRegularExpression> | ||
37 | #include <QCheckBox> | 37 | #include <QCheckBox> | ||
38 | #include <QComboBox> | 38 | #include <QComboBox> | ||
39 | #include <QGroupBox> | 39 | #include <QGroupBox> | ||
40 | #include <QLabel> | 40 | #include <QLabel> | ||
41 | #include <QLayout> | 41 | #include <QLayout> | ||
42 | #include <QPushButton> | 42 | #include <QPushButton> | ||
43 | #include <QToolButton> | 43 | #include <QToolButton> | ||
44 | #include <QSpinBox> | ||||
44 | //END Includes | 45 | //END Includes | ||
45 | 46 | | |||
46 | ModeConfigPage::ModeConfigPage(QWidget *parent) | 47 | ModeConfigPage::ModeConfigPage(QWidget *parent) | ||
47 | : KateConfigPage(parent) | 48 | : KateConfigPage(parent) | ||
48 | { | 49 | { | ||
49 | m_lastType = -1; | 50 | m_lastType = -1; | ||
50 | 51 | | |||
51 | // This will let us have more separation between this page and | 52 | // This will let us have more separation between this page and | ||
Show All 30 Lines | 61 | for (const auto &hl : KateHlManager::self()->modeList()) { | |||
82 | connect(ui->edtSection, SIGNAL(textChanged(QString)), this, SLOT(slotChanged())); | 83 | connect(ui->edtSection, SIGNAL(textChanged(QString)), this, SLOT(slotChanged())); | ||
83 | connect(ui->edtVariables, SIGNAL(textChanged(QString)), this, SLOT(slotChanged())); | 84 | connect(ui->edtVariables, SIGNAL(textChanged(QString)), this, SLOT(slotChanged())); | ||
84 | connect(ui->edtFileExtensions, SIGNAL(textChanged(QString)), this, SLOT(slotChanged())); | 85 | connect(ui->edtFileExtensions, SIGNAL(textChanged(QString)), this, SLOT(slotChanged())); | ||
85 | connect(ui->edtMimeTypes, SIGNAL(textChanged(QString)), this, SLOT(slotChanged())); | 86 | connect(ui->edtMimeTypes, SIGNAL(textChanged(QString)), this, SLOT(slotChanged())); | ||
86 | connect(ui->sbPriority, SIGNAL(valueChanged(int)), this, SLOT(slotChanged())); | 87 | connect(ui->sbPriority, SIGNAL(valueChanged(int)), this, SLOT(slotChanged())); | ||
87 | connect(ui->cmbHl, SIGNAL(activated(int)), this, SLOT(slotChanged())); | 88 | connect(ui->cmbHl, SIGNAL(activated(int)), this, SLOT(slotChanged())); | ||
88 | connect(ui->cmbIndenter, SIGNAL(activated(int)), this, SLOT(slotChanged())); | 89 | connect(ui->cmbIndenter, SIGNAL(activated(int)), this, SLOT(slotChanged())); | ||
89 | 90 | | |||
91 | // make the context help a bit easier to access | ||||
92 | ui->sbPriority->setToolTip(ui->sbPriority->whatsThis()); | ||||
93 | | ||||
90 | layout->addWidget(newWidget); | 94 | layout->addWidget(newWidget); | ||
91 | setLayout(layout); | 95 | setLayout(layout); | ||
dhaumann: I would prefer to set this in the ui file: The maximum is already set to 99. I think it makes… | |||||
Actually, 99 must be the default maximum because I couldn't find where it's set in the ui file... rjvbb: Actually, 99 must be the default maximum because I couldn't find where it's set in the ui file.. | |||||
92 | } | 96 | } | ||
93 | 97 | | |||
I agree with Christoph, we have no tooltip anywhere so far, so this would be inconsistent. @ngraham Do you have any comment on this from a usability perspective? I have the feeling that how to show whats-this infos should be maybe solved in a more general way, and not for just one specific spin box. dhaumann: I agree with Christoph, we have no tooltip anywhere so far, so this would be inconsistent. | |||||
I'm removing the tooltip then. There's very little place to add an explicative label; the only thing I can imagine is adding one somewhere that says something like "select a control and hit Shift-F1 for instructions" rjvbb: I'm removing the tooltip then. There's very little place to add an explicative label; the only… | |||||
94 | ModeConfigPage::~ModeConfigPage() | 98 | ModeConfigPage::~ModeConfigPage() | ||
95 | { | 99 | { | ||
96 | qDeleteAll(m_types); | 100 | qDeleteAll(m_types); | ||
97 | delete ui; | 101 | delete ui; | ||
98 | } | 102 | } | ||
99 | 103 | | |||
100 | void ModeConfigPage::apply() | 104 | void ModeConfigPage::apply() | ||
101 | { | 105 | { | ||
▲ Show 20 Lines • Show All 198 Lines • Show Last 20 Lines |
I would prefer to set this in the ui file: The maximum is already set to 99. I think it makes sense to set the minimum to -99 there. Can you provide an updated patch?