|
|
|
/* This file is part of the KDE project
|
|
|
|
Made by Tomislav Lukman (tomislav.lukman@ck.tel.hr)
|
|
|
|
Copyright (C) 2002, The Karbon Developers
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Library General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This library 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
|
|
|
|
Library General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Library General Public License
|
|
|
|
along with this library; see the file COPYING.LIB. If not, write to
|
|
|
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <tqcheckbox.h>
|
|
|
|
#include <tqlabel.h>
|
|
|
|
#include <tqlayout.h>
|
|
|
|
#include <tqstring.h>
|
|
|
|
#include <klocale.h>
|
|
|
|
#include <knuminput.h>
|
|
|
|
#include <kstdguiitem.h>
|
|
|
|
#include <kpushbutton.h>
|
|
|
|
|
|
|
|
#include "vtranslate.h"
|
|
|
|
|
|
|
|
VTranslate::VTranslate( TQWidget* parent, const char* name )
|
|
|
|
: TQWidget( parent, name )
|
|
|
|
{
|
|
|
|
setCaption( i18n( "Translate" ) );
|
|
|
|
|
|
|
|
TQVBoxLayout *maintqlayout = new TQVBoxLayout(this, 7);
|
|
|
|
maintqlayout->addSpacing(5);
|
|
|
|
|
|
|
|
TQGridLayout *inputtqlayout = new TQGridLayout(this, 5, 3);
|
|
|
|
maintqlayout->addLayout(inputtqlayout);
|
|
|
|
m_labelX = new TQLabel(i18n("X:"), this);
|
|
|
|
inputtqlayout->addWidget(m_labelX, 0, 0);
|
|
|
|
labely = new TQLabel(i18n("Y:"), this);
|
|
|
|
inputtqlayout->addWidget(labely, 1, 0);
|
|
|
|
inputtqlayout->addColSpacing(1, 1);
|
|
|
|
inputtqlayout->addColSpacing(3, 5);
|
|
|
|
m_inputX = new KDoubleNumInput( this );
|
|
|
|
m_inputX->setRange(-10000.00, 10000.00, 1.00, false); //range is just for example - for now :-)
|
|
|
|
inputtqlayout->addWidget(m_inputX, 0, 2);
|
|
|
|
m_inputY = new KDoubleNumInput( this );
|
|
|
|
m_inputY->setRange(-10000.00, 10000.00, 1.00, false);
|
|
|
|
inputtqlayout->addWidget(m_inputY, 1, 2);
|
|
|
|
m_labelUnit1 = new TQLabel("", this);
|
|
|
|
inputtqlayout->addWidget(m_labelUnit1, 0, 4);
|
|
|
|
m_labelUnit2 = new TQLabel("", this);
|
|
|
|
inputtqlayout->addWidget(m_labelUnit2, 1, 4);
|
|
|
|
maintqlayout->addSpacing(5);
|
|
|
|
m_checkBoxPosition = new TQCheckBox(i18n("Relative &position"), this);
|
|
|
|
maintqlayout->addWidget(m_checkBoxPosition);
|
|
|
|
maintqlayout->addSpacing(5);
|
|
|
|
m_buttonDuplicate = new TQPushButton(i18n("&Duplicate"), this);
|
|
|
|
maintqlayout->addWidget(m_buttonDuplicate);
|
|
|
|
maintqlayout->addSpacing(1);
|
|
|
|
m_buttonApply = new KPushButton(KStdGuiItem::apply(), this);
|
|
|
|
maintqlayout->addWidget(m_buttonApply);
|
|
|
|
|
|
|
|
maintqlayout->activate();
|
|
|
|
|
|
|
|
setFixedSize(baseSize()); //Set the size tp fixed values
|
|
|
|
}
|
|
|
|
|
|
|
|
VTranslate::~VTranslate()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void VTranslate::setUnits( const TQString& units )
|
|
|
|
{
|
|
|
|
m_labelUnit1->setText( units );
|
|
|
|
m_labelUnit2->setText( units );
|
|
|
|
}
|
|
|
|
|
|
|
|
#include "vtranslate.moc"
|
|
|
|
|