#include #include /**************************************************************************** ** Form implementation generated from reading ui file '/home/lvanek/Projects/Own/kxmleditor/part/kxetreeviewsettingspage.ui' ** ** Created: Ne pro 12 11:48:59 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 "kxetreeviewsettingspage.h" #include #include #include #include #include #include #include #include #include #include #include /* * Constructs a KXETreeViewSettingsPage as a child of 'parent', with the * name 'name' and widget flags set to 'f'. */ KXETreeViewSettingsPage::KXETreeViewSettingsPage( QWidget* parent, const char* name, WFlags fl ) : QWidget( parent, name, fl ) { if ( !name ) setName( "KXETreeViewSettingsPage" ); KXETreeViewSettingsPageLayout = new QVBoxLayout( this, 11, 6, "KXETreeViewSettingsPageLayout"); m_pCreateItemsOnDemand = new QCheckBox( this, "m_pCreateItemsOnDemand" ); KXETreeViewSettingsPageLayout->addWidget( m_pCreateItemsOnDemand ); m_pDecorateRoot = new QCheckBox( this, "m_pDecorateRoot" ); KXETreeViewSettingsPageLayout->addWidget( m_pDecorateRoot ); layout1 = new QHBoxLayout( 0, 0, 6, "layout1"); m_pLblDfltExpLevel = new QLabel( this, "m_pLblDfltExpLevel" ); layout1->addWidget( m_pLblDfltExpLevel ); m_pDfltExpLevel = new QSpinBox( this, "m_pDfltExpLevel" ); m_pDfltExpLevel->setValue( 5 ); layout1->addWidget( m_pDfltExpLevel ); KXETreeViewSettingsPageLayout->addLayout( layout1 ); m_pBoxDnD = new QGroupBox( this, "m_pBoxDnD" ); m_pBoxDnD->setColumnLayout(0, Qt::Vertical ); m_pBoxDnD->layout()->setSpacing( 6 ); m_pBoxDnD->layout()->setMargin( 11 ); m_pBoxDnDLayout = new QVBoxLayout( m_pBoxDnD->layout() ); m_pBoxDnDLayout->setAlignment( Qt::AlignTop ); m_pEnableDrag = new QCheckBox( m_pBoxDnD, "m_pEnableDrag" ); m_pEnableDrag->setChecked( TRUE ); m_pBoxDnDLayout->addWidget( m_pEnableDrag ); m_pEnableDrop = new QCheckBox( m_pBoxDnD, "m_pEnableDrop" ); m_pEnableDrop->setChecked( TRUE ); m_pEnableDrop->setTristate( FALSE ); m_pBoxDnDLayout->addWidget( m_pEnableDrop ); KXETreeViewSettingsPageLayout->addWidget( m_pBoxDnD ); m_pElemDisplMode = new QButtonGroup( this, "m_pElemDisplMode" ); m_pElemDisplMode->setColumnLayout(0, Qt::Vertical ); m_pElemDisplMode->layout()->setSpacing( 6 ); m_pElemDisplMode->layout()->setMargin( 11 ); m_pElemDisplModeLayout = new QVBoxLayout( m_pElemDisplMode->layout() ); m_pElemDisplModeLayout->setAlignment( Qt::AlignTop ); m_pElemDisplMode1 = new QRadioButton( m_pElemDisplMode, "m_pElemDisplMode1" ); m_pElemDisplMode1->setChecked( TRUE ); m_pElemDisplModeLayout->addWidget( m_pElemDisplMode1 ); m_pElemDisplMode2 = new QRadioButton( m_pElemDisplMode, "m_pElemDisplMode2" ); m_pElemDisplModeLayout->addWidget( m_pElemDisplMode2 ); m_pElemDisplMode3 = new QRadioButton( m_pElemDisplMode, "m_pElemDisplMode3" ); m_pElemDisplModeLayout->addWidget( m_pElemDisplMode3 ); KXETreeViewSettingsPageLayout->addWidget( m_pElemDisplMode ); spacer7 = new QSpacerItem( 20, 16, QSizePolicy::Minimum, QSizePolicy::Expanding ); KXETreeViewSettingsPageLayout->addItem( spacer7 ); languageChange(); resize( QSize(218, 325).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); // buddies m_pLblDfltExpLevel->setBuddy( m_pDfltExpLevel ); } /* * Destroys the object and frees any allocated resources */ KXETreeViewSettingsPage::~KXETreeViewSettingsPage() { // no need to delete child widgets, Qt does it all for us } /* * Sets the strings of the subwidgets using the current * language. */ void KXETreeViewSettingsPage::languageChange() { setCaption( tr2i18n( "Tree View Settings Page" ) ); m_pCreateItemsOnDemand->setText( tr2i18n( "Create items &on demand" ) ); m_pCreateItemsOnDemand->setAccel( QKeySequence( tr2i18n( "Alt+O" ) ) ); QWhatsThis::add( m_pCreateItemsOnDemand, tr2i18n( "Create items on demand\n" "
\n" "You can determine when to create the tree view items.\n" "Wether they are created on demand, which means their creation is postponed until\n" "their grandparent item is opened, or all items are created while opening the XML \n" "file.\n" "
\n" "Creating items on demand saves time and memory while opening very big, deep nested XML documents." ) ); m_pDecorateRoot->setText( tr2i18n( "Set &root element decorated" ) ); m_pDecorateRoot->setAccel( QKeySequence( tr2i18n( "Alt+R" ) ) ); QWhatsThis::add( m_pDecorateRoot, tr2i18n( "Set root element decorated\n" "
\n" "You can determine wether the tree view item corresponding to the XML document's root element should have a decoration or not.\n" "
\n" "A decoration is a + or - icon, with which the item can be opened or closed to show or hide its childitems." ) ); m_pLblDfltExpLevel->setText( tr2i18n( "Default &expand level:" ) ); QWhatsThis::add( m_pLblDfltExpLevel, tr2i18n( "Default expand level\n" "
\n" "You can determine up to which level the tree view items should be opened (showing their childitems) when opening a document." ) ); QWhatsThis::add( m_pDfltExpLevel, tr2i18n( "Default expand level\n" "
\n" "You can determine up to which level the tree view items should be opened (showing their childitems) when opening a document." ) ); m_pBoxDnD->setTitle( tr2i18n( "Drag and drop" ) ); m_pEnableDrag->setText( tr2i18n( "Enable dra&gging" ) ); m_pEnableDrag->setAccel( QKeySequence( tr2i18n( "Alt+G" ) ) ); QWhatsThis::add( m_pEnableDrag, tr2i18n( "Enable dragging\n" "
\n" "You can determine wether dragging items (and their corresponding XML nodes) from the tree view is enabled or disabled." ) ); m_pEnableDrop->setText( tr2i18n( "Enable dro&pping" ) ); m_pEnableDrop->setAccel( QKeySequence( tr2i18n( "Alt+P" ) ) ); QWhatsThis::add( m_pEnableDrop, tr2i18n( "Enable dropping\n" "
\n" "You can determine wether dropping XML nodes to the tree view is enabled or disabled." ) ); m_pElemDisplMode->setTitle( tr2i18n( "&Show ..." ) ); QWhatsThis::add( m_pElemDisplMode, tr2i18n( "You can determine which information about XML element's attributes you want to see in the tree view. Choose between:
\n" "
\n" "no attributes
\n" "no information about attributes at all
\n" "
\n" "attribute names only
\n" "the attributes' names are shown
\n" "
\n" "attribute names & values
\n" "the attributes' names and the corresponding values are shown" ) ); m_pElemDisplMode1->setText( tr2i18n( "No attributes" ) ); m_pElemDisplMode2->setText( tr2i18n( "Attribute names only" ) ); m_pElemDisplMode3->setText( tr2i18n( "Attribute names && values" ) ); } #include "kxetreeviewsettingspage.moc"