#include #include /**************************************************************************** ** Form implementation generated from reading ui file '/home/lvanek/Projects/Own/kxmleditor/part/kxeelementdialogbase.ui' ** ** Created: Ne pro 12 11:48:58 2004 ** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.3 edited Nov 24 2003 $) ** ** WARNING! All changes made in this file will be lost! ****************************************************************************/ #include "kxeelementdialogbase.h" #include #include #include #include #include #include #include #include /* * Constructs a KXEElementDialogBase as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */ KXEElementDialogBase::KXEElementDialogBase( QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ) { if ( !name ) setName( "KXEElementDialogBase" ); setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) ); setSizeGripEnabled( TRUE ); KXEElementDialogBaseLayout = new QGridLayout( this, 1, 1, 11, 6, "KXEElementDialogBaseLayout"); Spacer3 = new QSpacerItem( 16, 37, QSizePolicy::Minimum, QSizePolicy::Expanding ); KXEElementDialogBaseLayout->addItem( Spacer3, 1, 1 ); m_pLblPrefix = new QLabel( this, "m_pLblPrefix" ); KXEElementDialogBaseLayout->addMultiCellWidget( m_pLblPrefix, 2, 2, 0, 1 ); Spacer4 = new QSpacerItem( 16, 37, QSizePolicy::Minimum, QSizePolicy::Expanding ); KXEElementDialogBaseLayout->addItem( Spacer4, 3, 1 ); Spacer5 = new QSpacerItem( 16, 37, QSizePolicy::Minimum, QSizePolicy::Expanding ); KXEElementDialogBaseLayout->addItem( Spacer5, 5, 1 ); m_pEditNsURI = new QLineEdit( this, "m_pEditNsURI" ); KXEElementDialogBaseLayout->addWidget( m_pEditNsURI, 1, 0 ); m_pEditName = new QLineEdit( this, "m_pEditName" ); KXEElementDialogBaseLayout->addWidget( m_pEditName, 5, 0 ); m_pEditPrefix = new QLineEdit( this, "m_pEditPrefix" ); KXEElementDialogBaseLayout->addWidget( m_pEditPrefix, 3, 0 ); m_pLblTagName = new QLabel( this, "m_pLblTagName" ); KXEElementDialogBaseLayout->addMultiCellWidget( m_pLblTagName, 4, 4, 0, 1 ); m_pLblNsURI = new QLabel( this, "m_pLblNsURI" ); KXEElementDialogBaseLayout->addMultiCellWidget( m_pLblNsURI, 0, 0, 0, 1 ); Layout1 = new QHBoxLayout( 0, 0, 6, "Layout1"); Horizontal_Spacing2 = new QSpacerItem( 20, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ); Layout1->addItem( Horizontal_Spacing2 ); m_pBtnOK = new QPushButton( this, "m_pBtnOK" ); m_pBtnOK->setAutoDefault( TRUE ); m_pBtnOK->setDefault( TRUE ); Layout1->addWidget( m_pBtnOK ); m_pBtnCancel = new QPushButton( this, "m_pBtnCancel" ); m_pBtnCancel->setAutoDefault( TRUE ); Layout1->addWidget( m_pBtnCancel ); KXEElementDialogBaseLayout->addMultiCellLayout( Layout1, 8, 8, 0, 1 ); Layout4 = new QHBoxLayout( 0, 0, 6, "Layout4"); m_pLblInsert = new QLabel( this, "m_pLblInsert" ); Layout4->addWidget( m_pLblInsert ); m_pComboInsert = new QComboBox( FALSE, this, "m_pComboInsert" ); Layout4->addWidget( m_pComboInsert ); Spacer2 = new QSpacerItem( 181, 16, QSizePolicy::Expanding, QSizePolicy::Minimum ); Layout4->addItem( Spacer2 ); KXEElementDialogBaseLayout->addMultiCellLayout( Layout4, 7, 7, 0, 1 ); m_pTextLabelMessage = new QLabel( this, "m_pTextLabelMessage" ); m_pTextLabelMessage->setPaletteForegroundColor( QColor( 255, 0, 0 ) ); m_pTextLabelMessage->setTextFormat( QLabel::PlainText ); KXEElementDialogBaseLayout->addMultiCellWidget( m_pTextLabelMessage, 6, 6, 0, 1 ); languageChange(); resize( QSize(344, 321).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); // signals and slots connections connect( m_pBtnOK, SIGNAL( clicked() ), this, SLOT( accept() ) ); connect( m_pBtnCancel, SIGNAL( clicked() ), this, SLOT( reject() ) ); // tab order setTabOrder( m_pEditName, m_pComboInsert ); setTabOrder( m_pComboInsert, m_pBtnOK ); setTabOrder( m_pBtnOK, m_pBtnCancel ); setTabOrder( m_pBtnCancel, m_pEditNsURI ); setTabOrder( m_pEditNsURI, m_pEditPrefix ); // buddies m_pLblPrefix->setBuddy( m_pEditPrefix ); m_pLblTagName->setBuddy( m_pEditName ); m_pLblNsURI->setBuddy( m_pEditNsURI ); m_pLblInsert->setBuddy( m_pComboInsert ); } /* * Destroys the object and frees any allocated resources */ KXEElementDialogBase::~KXEElementDialogBase() { // no need to delete child widgets, Qt does it all for us } /* * Sets the strings of the subwidgets using the current * language. */ void KXEElementDialogBase::languageChange() { setCaption( tr2i18n( "XML Element" ) ); m_pLblPrefix->setText( tr2i18n( "&Prefix:" ) ); QWhatsThis::add( m_pLblPrefix, tr2i18n( "Prefix\n" "
\n" "You can enter the namespace prefix for this XML element here." ) ); QWhatsThis::add( m_pEditNsURI, tr2i18n( "Namespace URI
\n" "You can enter the namespace URI of this XML element here." ) ); QWhatsThis::add( m_pEditName, tr2i18n( "Local Name\n" "
\n" "You have to enter this XML elements name here." ) ); QWhatsThis::add( m_pEditPrefix, tr2i18n( "Prefix\n" "
\n" "You can enter the namespace prefix for this XML element here." ) ); m_pLblTagName->setText( tr2i18n( "Local &Name:" ) ); QWhatsThis::add( m_pLblTagName, tr2i18n( "Local Name\n" "
\n" "You have to enter this XML elements name here." ) ); m_pLblNsURI->setText( tr2i18n( "Namespace &URI:" ) ); QWhatsThis::add( m_pLblNsURI, tr2i18n( "Namespace URI
\n" "You can enter the namespace URI of this XML element here." ) ); m_pBtnOK->setText( tr2i18n( "&OK" ) ); m_pBtnOK->setAccel( QKeySequence( tr2i18n( "Alt+O" ) ) ); m_pBtnCancel->setText( tr2i18n( "&Cancel" ) ); m_pBtnCancel->setAccel( QKeySequence( tr2i18n( "Alt+C" ) ) ); m_pLblInsert->setText( tr2i18n( "&Insert:" ) ); QWhatsThis::add( m_pLblInsert, tr2i18n( "Insert\n" "
\n" "Choose, where to place this XML element in the parent elements list of childelements." ) ); m_pComboInsert->clear(); m_pComboInsert->insertItem( tr2i18n( "at bottom" ) ); m_pComboInsert->insertItem( tr2i18n( "at top" ) ); QWhatsThis::add( m_pComboInsert, tr2i18n( "Insert\n" "
\n" "Choose, where to place this XML element in the parent elements list of childelements." ) ); } #include "kxeelementdialogbase.moc"