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.
75 lines
2.4 KiB
75 lines
2.4 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.
|
||
|
*/
|
||
|
|
||
4 years ago
|
/* vreference.cpp */
|
||
15 years ago
|
|
||
14 years ago
|
#include <tqbuttongroup.h>
|
||
13 years ago
|
#include <tqlayout.h>
|
||
14 years ago
|
#include <tqradiobutton.h>
|
||
15 years ago
|
|
||
|
#include "vreference.h"
|
||
|
|
||
13 years ago
|
VReference::VReference( TQWidget *parent, const char *name ) : TQFrame ( parent, name )
|
||
15 years ago
|
{
|
||
13 years ago
|
TQVBoxLayout* layout = new TQVBoxLayout( this );
|
||
14 years ago
|
mButtonGroup = new TQButtonGroup (3,Qt::Vertical, this );
|
||
|
TQRadioButton* radio = new TQRadioButton ( mButtonGroup );
|
||
15 years ago
|
mButtonGroup->insert( radio, TopLeft );
|
||
14 years ago
|
radio = new TQRadioButton ( mButtonGroup );
|
||
15 years ago
|
mButtonGroup->insert( radio, Left );
|
||
14 years ago
|
radio = new TQRadioButton ( mButtonGroup );
|
||
15 years ago
|
mButtonGroup->insert( radio, BottomLeft );
|
||
14 years ago
|
radio = new TQRadioButton ( mButtonGroup );
|
||
15 years ago
|
mButtonGroup->insert( radio, Top );
|
||
14 years ago
|
radio = new TQRadioButton ( mButtonGroup );
|
||
15 years ago
|
mButtonGroup->insert( radio, Center );
|
||
14 years ago
|
radio = new TQRadioButton ( mButtonGroup );
|
||
15 years ago
|
mButtonGroup->insert( radio, Bottom );
|
||
14 years ago
|
radio = new TQRadioButton ( mButtonGroup );
|
||
15 years ago
|
mButtonGroup->insert( radio, TopRight );
|
||
14 years ago
|
radio = new TQRadioButton ( mButtonGroup );
|
||
15 years ago
|
mButtonGroup->insert( radio, Right );
|
||
14 years ago
|
radio = new TQRadioButton ( mButtonGroup );
|
||
15 years ago
|
mButtonGroup->insert( radio, BottomRight );
|
||
|
|
||
|
connect(
|
||
14 years ago
|
mButtonGroup, TQT_SIGNAL( clicked( int ) ),
|
||
|
this, TQT_SLOT( setReferencePoint( int ) ) );
|
||
15 years ago
|
|
||
|
mButtonGroup->setButton( Center );
|
||
13 years ago
|
layout->addWidget( mButtonGroup );
|
||
|
layout->activate();
|
||
15 years ago
|
setReferencePoint( Center );
|
||
|
}
|
||
|
|
||
|
void VReference::setReferencePoint ( int i )
|
||
|
{
|
||
|
m_referencePoint = i;
|
||
|
emit referencePointChanged( m_referencePoint );
|
||
|
}
|
||
|
|
||
|
int VReference::referencePoint()
|
||
|
{
|
||
|
return( m_referencePoint );
|
||
|
}
|
||
|
|
||
|
#include "vreference.moc"
|
||
|
|