From 2785103a6bd4de55bd26d79e34d0fdd4b329a73a Mon Sep 17 00:00:00 2001 From: tpearson Date: Sun, 26 Jun 2011 00:29:37 +0000 Subject: Remove krita* in preparation for name switch from Krita to Chalk git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238361 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- krita/ui/kis_brush_chooser.cc | 102 ------------------------------------------ 1 file changed, 102 deletions(-) delete mode 100644 krita/ui/kis_brush_chooser.cc (limited to 'krita/ui/kis_brush_chooser.cc') diff --git a/krita/ui/kis_brush_chooser.cc b/krita/ui/kis_brush_chooser.cc deleted file mode 100644 index 69aeafdf..00000000 --- a/krita/ui/kis_brush_chooser.cc +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 2004 Adrian Page - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -#include -#include -#include -#include -#include - -#include "kis_double_widget.h" -#include "kis_brush_chooser.h" -#include "kis_global.h" -#include "kis_icon_item.h" -#include "kis_brush.h" - -KisBrushChooser::KisBrushChooser(TQWidget *tqparent, const char *name) - : super(tqparent, name) -{ - m_lbSpacing = new TQLabel(i18n("Spacing:"), this); - m_slSpacing = new KisDoubleWidget(0.0, 10, this, "double_widget"); - m_slSpacing->setTickmarks(TQSlider::Below); - m_slSpacing->setTickInterval(1); - TQObject::connect(m_slSpacing, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(slotSetItemSpacing(double))); - - m_chkColorMask = new TQCheckBox(i18n("Use color as tqmask"), this); - TQObject::connect(m_chkColorMask, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetItemUseColorAsMask(bool))); - - m_lbName = new TQLabel(this); - - TQVBoxLayout *mainLayout = new TQVBoxLayout(this, 2, -1, "main tqlayout"); - - mainLayout->addWidget(m_lbName); - mainLayout->addWidget(chooserWidget(), 10); - - TQGridLayout *spacingLayout = new TQGridLayout( 2, 2); - - mainLayout->addLayout(spacingLayout, 1); - - spacingLayout->addWidget(m_lbSpacing, 0, 0); - spacingLayout->addWidget(m_slSpacing, 0, 1); - - spacingLayout->addMultiCellWidget(m_chkColorMask, 1, 1, 0, 1); -} - -KisBrushChooser::~KisBrushChooser() -{ -} - -void KisBrushChooser::slotSetItemSpacing(double spacingValue) -{ - KisIconItem *item = static_cast(currentItem()); - - if (item) { - KisBrush *brush = static_cast(item->resource()); - brush->setSpacing(spacingValue); - } -} - -void KisBrushChooser::slotSetItemUseColorAsMask(bool useColorAsMask) -{ - KisIconItem *item = static_cast(currentItem()); - - if (item) { - KisBrush *brush = static_cast(item->resource()); - brush->setUseColorAsMask(useColorAsMask); - item->updatePixmaps(); - emit selected(currentItem()); - } -} - -void KisBrushChooser::update(KoIconItem *item) -{ - KisIconItem *kisItem = static_cast(item); - - if (kisItem) { - KisBrush *brush = static_cast(kisItem->resource()); - - TQString text = TQString("%1 (%2 x %3)").tqarg(brush->name()).tqarg(brush->width()).tqarg(brush->height()); - - m_lbName->setText(text); - m_slSpacing->setValue(brush->spacing()); - m_chkColorMask->setChecked(brush->useColorAsMask()); - m_chkColorMask->setEnabled(brush->hasColor()); - } -} - -#include "kis_brush_chooser.moc" - -- cgit v1.2.1