You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
85 lines
2.8 KiB
85 lines
2.8 KiB
15 years ago
|
/* 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.
|
||
|
*/
|
||
|
|
||
14 years ago
|
#include <tqcheckbox.h>
|
||
|
#include <tqlabel.h>
|
||
13 years ago
|
#include <tqlayout.h>
|
||
14 years ago
|
#include <tqstring.h>
|
||
12 years ago
|
#include <tdelocale.h>
|
||
15 years ago
|
#include <knuminput.h>
|
||
|
#include <kstdguiitem.h>
|
||
|
#include <kpushbutton.h>
|
||
|
|
||
|
#include "vtranslate.h"
|
||
|
|
||
13 years ago
|
VTranslate::VTranslate( TQWidget* parent, const char* name )
|
||
|
: TQWidget( parent, name )
|
||
15 years ago
|
{
|
||
|
setCaption( i18n( "Translate" ) );
|
||
|
|
||
13 years ago
|
TQVBoxLayout *mainlayout = new TQVBoxLayout(this, 7);
|
||
|
mainlayout->addSpacing(5);
|
||
15 years ago
|
|
||
13 years ago
|
TQGridLayout *inputlayout = new TQGridLayout(this, 5, 3);
|
||
|
mainlayout->addLayout(inputlayout);
|
||
14 years ago
|
m_labelX = new TQLabel(i18n("X:"), this);
|
||
13 years ago
|
inputlayout->addWidget(m_labelX, 0, 0);
|
||
14 years ago
|
labely = new TQLabel(i18n("Y:"), this);
|
||
13 years ago
|
inputlayout->addWidget(labely, 1, 0);
|
||
|
inputlayout->addColSpacing(1, 1);
|
||
|
inputlayout->addColSpacing(3, 5);
|
||
15 years ago
|
m_inputX = new KDoubleNumInput( this );
|
||
|
m_inputX->setRange(-10000.00, 10000.00, 1.00, false); //range is just for example - for now :-)
|
||
13 years ago
|
inputlayout->addWidget(m_inputX, 0, 2);
|
||
15 years ago
|
m_inputY = new KDoubleNumInput( this );
|
||
|
m_inputY->setRange(-10000.00, 10000.00, 1.00, false);
|
||
13 years ago
|
inputlayout->addWidget(m_inputY, 1, 2);
|
||
14 years ago
|
m_labelUnit1 = new TQLabel("", this);
|
||
13 years ago
|
inputlayout->addWidget(m_labelUnit1, 0, 4);
|
||
14 years ago
|
m_labelUnit2 = new TQLabel("", this);
|
||
13 years ago
|
inputlayout->addWidget(m_labelUnit2, 1, 4);
|
||
|
mainlayout->addSpacing(5);
|
||
14 years ago
|
m_checkBoxPosition = new TQCheckBox(i18n("Relative &position"), this);
|
||
13 years ago
|
mainlayout->addWidget(m_checkBoxPosition);
|
||
|
mainlayout->addSpacing(5);
|
||
14 years ago
|
m_buttonDuplicate = new TQPushButton(i18n("&Duplicate"), this);
|
||
13 years ago
|
mainlayout->addWidget(m_buttonDuplicate);
|
||
|
mainlayout->addSpacing(1);
|
||
15 years ago
|
m_buttonApply = new KPushButton(KStdGuiItem::apply(), this);
|
||
13 years ago
|
mainlayout->addWidget(m_buttonApply);
|
||
15 years ago
|
|
||
13 years ago
|
mainlayout->activate();
|
||
15 years ago
|
|
||
|
setFixedSize(baseSize()); //Set the size tp fixed values
|
||
|
}
|
||
|
|
||
|
VTranslate::~VTranslate()
|
||
|
{
|
||
|
}
|
||
|
|
||
14 years ago
|
void VTranslate::setUnits( const TQString& units )
|
||
15 years ago
|
{
|
||
|
m_labelUnit1->setText( units );
|
||
|
m_labelUnit2->setText( units );
|
||
|
}
|
||
|
|
||
|
#include "vtranslate.moc"
|
||
|
|