/**********************************************************************

	--- Qt Architect generated file ---

	File: MenuNameDialogData.cpp
	Last generated: Fri Nov 28 14:52:53 1997

	DO NOT EDIT!!!  This file will be automatically
	regenerated by qtarch.  All changes will be lost.

 *********************************************************************/

#include "MenuNameDialogData.h"

#define Inherited QDialog

#define SEPARATION 10

#include <qlabel.h>
#include <kapp.h>

MenuNameDialogData::MenuNameDialogData
(
	QWidget* parent,
	const char* name
)
	:
	Inherited( parent, name, TRUE, 0 )
{
	QLabel* dlgedit_Label_1;
	dlgedit_Label_1 = new QLabel(klocale->translate("Change the name of the menus as displayed in kpanel"), 
				     this, "Label_1" );
	dlgedit_Label_1->setFixedSize(dlgedit_Label_1->sizeHint());

	QLabel* dlgedit_Label_2;
	dlgedit_Label_2 = new QLabel(klocale->translate("Personal:"),
				     this, "Label_2" );
	dlgedit_Label_2->setFixedSize(dlgedit_Label_2->sizeHint());

	QLabel* dlgedit_Label_3;
	dlgedit_Label_3 = new QLabel(klocale->translate("Default:"),
				     this, "Label_3" );
	dlgedit_Label_3->setFixedSize(dlgedit_Label_3->sizeHint());

	int h = 2*fontMetrics().height();

	i_personal = new QLineEdit( this, "LineEdit_1" );
	i_personal->setMinimumSize(fontMetrics().width("----------"), h);
	i_personal->setMaximumSize(QLayout::unlimited, h);

	i_default = new QLineEdit( this, "LineEdit_2" );
	i_default->setMinimumSize(fontMetrics().width("----------"), h);
	i_default->setMaximumSize(QLayout::unlimited, h);

	int w = (int)(1.8 * QMAX(fontMetrics().width(klocale->translate("OK")),
			   fontMetrics().width(klocale->translate("Cancel"))));
	
	b_ok = new QPushButton( this, "PushButton_1" );
	b_ok->setFixedSize(w,h);
	connect( b_ok, SIGNAL(pressed()), SLOT(accept()) );
	b_ok->setText( klocale->translate("OK") );
	b_ok->setAutoRepeat( FALSE );
	b_ok->setAutoResize( FALSE );

	b_cancel = new QPushButton( this, "PushButton_2" );
	b_cancel->setFixedSize(w,h);
	connect( b_cancel, SIGNAL(pressed()), SLOT(reject()) );
	b_cancel->setText( klocale->translate("Cancel") );
	b_cancel->setAutoRepeat( FALSE );
	b_cancel->setAutoResize( FALSE );

	layoutTB = new QBoxLayout(this, QBoxLayout::TopToBottom, SEPARATION);

	layoutTB->addWidget(dlgedit_Label_1, 0);
	layoutTB->addSpacing(h/2);
	layoutTB->addStretch(2);

	layoutLE = new QGridLayout(2, 2);
	layoutTB->addLayout(layoutLE);
	layoutLE->addWidget(dlgedit_Label_2, 0, 0, AlignRight|AlignVCenter);
	layoutLE->addWidget(dlgedit_Label_3, 1, 0, AlignRight|AlignVCenter);
	layoutLE->addWidget(i_personal, 0, 1);
	layoutLE->addWidget(i_default, 1, 1);
	layoutLE->setColStretch(1, 10);

	layoutTB->addSpacing(h/2);
	layoutTB->addStretch(5);
	
	layoutLR = new QBoxLayout(QBoxLayout::LeftToRight);
	layoutTB->addLayout(layoutLR);
	layoutLR->addStretch(10);
	layoutLR->addWidget(b_ok, 0);
	layoutLR->addStretch(10);
	layoutLR->addWidget(b_cancel, 0);
	layoutLR->addStretch(10);
	

	layoutTB->addStretch(5);
	layoutTB->activate();

	resize(0,0);		// resize to minimum size...
}


MenuNameDialogData::~MenuNameDialogData()
{
}
