Differential D241 Diff 691 krita/plugins/tools/selectiontools/kis_tool_select_magnetic_option_widget.cpp
Changeset View
Changeset View
Standalone View
Standalone View
krita/plugins/tools/selectiontools/kis_tool_select_magnetic_option_widget.cpp
- This file was added.
1 | /* This file is part of the KDE project | ||||
---|---|---|---|---|---|
2 | * Copyright (C) 2009 Boudewijn Rempt <boud@valdyas.org> | ||||
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 "kis_tool_select_magnetic_option_widget.h" | ||||
21 | #include "ui_kis_tool_select_magnetic_option_widget.h" | ||||
22 | | ||||
23 | KisToolSelectMagneticOptionWidget::KisToolSelectMagneticOptionWidget(QWidget *parent) : | ||||
24 | QWidget(parent), | ||||
25 | ui(new Ui::KisToolSelectMagneticOptionWidget) | ||||
26 | { | ||||
27 | ui->setupUi(this); | ||||
28 | | ||||
29 | ui->m_colorLimitation->hide(); //hide color limitation, as it doesn't work yet | ||||
30 | ui->label_4->hide();//color limitation label | ||||
31 | | ||||
32 | //default values | ||||
33 | ui->m_radius->setValue(25); | ||||
34 | ui->m_searchFromLeft->setChecked(true); | ||||
35 | ui->m_threshold->setValue(15); | ||||
36 | } | ||||
37 | | ||||
38 | KisToolSelectMagneticOptionWidget::~KisToolSelectMagneticOptionWidget() | ||||
39 | { | ||||
40 | delete ui; | ||||
41 | } | ||||
42 | | ||||
43 | void KisToolSelectMagneticOptionWidget::changeEvent(QEvent *e) | ||||
44 | { | ||||
45 | QWidget::changeEvent(e); | ||||
46 | switch (e->type()) { | ||||
47 | case QEvent::LanguageChange: | ||||
48 | ui->retranslateUi(this); | ||||
49 | break; | ||||
50 | default: | ||||
51 | break; | ||||
52 | } | ||||
53 | } | ||||
54 | | ||||
55 | #include "kis_tool_select_magnetic_option_widget.moc" |