00001
#include <kdialog.h>
00002
#include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
#include "subclassesdlgbase.h"
00013
00014
#include <qvariant.h>
00015
#include <kdialog.h>
00016
#include <qpushbutton.h>
00017
#include <qlistbox.h>
00018
#include <kurlrequester.h>
00019
#include <qlabel.h>
00020
#include <qlayout.h>
00021
#include <qtooltip.h>
00022
#include <qwhatsthis.h>
00023
00024
00025
00026
00027
00028
00029
00030
00031 SubclassesDlgBase::SubclassesDlgBase(
QWidget* parent,
const char* name,
bool modal, WFlags fl )
00032 :
QDialog( parent, name, modal, fl )
00033 {
00034
if ( !name )
00035 setName(
"SubclassesDlgBase" );
00036 setSizeGripEnabled( TRUE );
00037
SubclassesDlgBaseLayout =
new QGridLayout(
this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(),
"SubclassesDlgBaseLayout");
00038
00039
add_button =
new QPushButton(
this,
"add_button" );
00040
add_button->setAutoDefault( FALSE );
00041
00042
SubclassesDlgBaseLayout->addWidget(
add_button, 1, 0 );
00043
00044
remove_button =
new QPushButton(
this,
"remove_button" );
00045
remove_button->setAutoDefault( FALSE );
00046
00047
SubclassesDlgBaseLayout->addWidget(
remove_button, 2, 0 );
00048
00049
subclasses_box =
new QListBox(
this,
"subclasses_box" );
00050
00051
SubclassesDlgBaseLayout->addMultiCellWidget(
subclasses_box, 1, 3, 1, 1 );
00052
00053
subclass_url =
new KURLRequester(
this,
"subclass_url" );
00054
subclass_url->setMinimumSize(
QSize( 0, 24 ) );
00055
subclass_url->setFocusPolicy( KURLRequester::WheelFocus );
00056
00057
SubclassesDlgBaseLayout->addWidget(
subclass_url, 0, 1 );
00058
spacer2 =
new QSpacerItem( 20, 90, QSizePolicy::Minimum, QSizePolicy::Expanding );
00059
SubclassesDlgBaseLayout->addItem(
spacer2, 3, 0 );
00060
00061
textLabel2 =
new QLabel(
this,
"textLabel2" );
00062
textLabel2->setSizePolicy(
QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0,
textLabel2->sizePolicy().hasHeightForWidth() ) );
00063
textLabel2->setAlignment(
int( QLabel::WordBreak | QLabel::AlignVCenter ) );
00064
00065
SubclassesDlgBaseLayout->addWidget(
textLabel2, 0, 0 );
00066
00067
layout3 =
new QHBoxLayout( 0, 0, KDialog::spacingHint(),
"layout3");
00068
Horizontal_Spacing2 =
new QSpacerItem( 310, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00069
layout3->addItem(
Horizontal_Spacing2 );
00070
00071
buttonOk =
new QPushButton(
this,
"buttonOk" );
00072
buttonOk->setAutoDefault( TRUE );
00073
buttonOk->setDefault( TRUE );
00074
layout3->addWidget(
buttonOk );
00075
00076
buttonCancel =
new QPushButton(
this,
"buttonCancel" );
00077
buttonCancel->setAutoDefault( TRUE );
00078
buttonCancel->setDefault( FALSE );
00079
layout3->addWidget(
buttonCancel );
00080
00081
SubclassesDlgBaseLayout->addMultiCellLayout(
layout3, 4, 4, 0, 1 );
00082
languageChange();
00083 resize(
QSize(514, 278).expandedTo(minimumSizeHint()) );
00084 clearWState( WState_Polished );
00085
00086
00087 connect(
buttonOk, SIGNAL( clicked() ),
this, SLOT( accept() ) );
00088 connect(
subclass_url, SIGNAL( textChanged(
const QString&) ),
this, SLOT(
changeCurrentURL(
const QString&) ) );
00089 connect(
remove_button, SIGNAL( clicked() ),
this, SLOT(
removeRelation() ) );
00090 connect(
buttonCancel, SIGNAL( clicked() ),
this, SLOT( reject() ) );
00091 connect(
add_button, SIGNAL( clicked() ),
this, SLOT(
newRelation() ) );
00092 connect(
subclasses_box, SIGNAL( clicked(
QListBoxItem*) ),
this, SLOT(
currentRelationChanged(
QListBoxItem*) ) );
00093
00094
00095 setTabOrder(
subclasses_box,
add_button );
00096 setTabOrder(
add_button,
subclass_url );
00097 setTabOrder(
subclass_url,
remove_button );
00098 setTabOrder(
remove_button,
buttonOk );
00099 setTabOrder(
buttonOk,
buttonCancel );
00100
00101
00102
textLabel2->setBuddy(
subclass_url );
00103 }
00104
00105
00106
00107
00108 SubclassesDlgBase::~SubclassesDlgBase()
00109 {
00110
00111 }
00112
00113
00114
00115
00116
00117 void SubclassesDlgBase::languageChange()
00118 {
00119 setCaption( tr2i18n(
"Related Subclasses" ) );
00120
add_button->setText( tr2i18n(
"&Add Relation" ) );
00121
remove_button->setText( tr2i18n(
"&Remove Relation" ) );
00122
textLabel2->setText( tr2i18n(
"Related subclass &location:" ) );
00123
buttonOk->setText( tr2i18n(
"&OK" ) );
00124
buttonCancel->setText( tr2i18n(
"&Cancel" ) );
00125 }
00126
00127 void SubclassesDlgBase::changeCurrentURL(
const QString&)
00128 {
00129 qWarning(
"SubclassesDlgBase::changeCurrentURL(const QString&): Not implemented yet" );
00130 }
00131
00132 void SubclassesDlgBase::removeRelation()
00133 {
00134 qWarning(
"SubclassesDlgBase::removeRelation(): Not implemented yet" );
00135 }
00136
00137 void SubclassesDlgBase::newRelation()
00138 {
00139 qWarning(
"SubclassesDlgBase::newRelation(): Not implemented yet" );
00140 }
00141
00142 void SubclassesDlgBase::currentRelationChanged(
QListBoxItem*)
00143 {
00144 qWarning(
"SubclassesDlgBase::currentRelationChanged(QListBoxItem*): Not implemented yet" );
00145 }
00146
00147
#include "subclassesdlgbase.moc"