当前位置: 首页>>代码示例>>C++>>正文


C++ clearWState函数代码示例

本文整理汇总了C++中clearWState函数的典型用法代码示例。如果您正苦于以下问题:C++ clearWState函数的具体用法?C++ clearWState怎么用?C++ clearWState使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了clearWState函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: winId

/*!
  For internal use only.
*/
void QNPWidget::setWindow(bool delold)
{
    saveWId = winId(); // ### Don't need this anymore

    create((WId)pi->window, FALSE, delold);

   if ( delold ) {
      // Make sure they get a show()
      clearWState( WState_Visible );
   }

#ifdef _WS_X11_
    Widget w = XtWindowToWidget (qt_xdisplay(), pi->window);
    XtAddEventHandler(w, EnterWindowMask, FALSE, enter_event_handler, pi);
    XtAddEventHandler(w, LeaveWindowMask, FALSE, leave_event_handler, pi);
    Pixmap bgpm=0;
    XColor col;
    XtVaGetValues(w,
	XtNbackground, &col.pixel,
	XtNbackgroundPixmap, &bgpm,
	0, 0);
    XQueryColor(qt_xdisplay(), x11Colormap(), &col);
    setBackgroundColor(QColor(col.red >> 8, col.green >> 8, col.blue >> 8));
    if (bgpm) {
	// ### Need an under-the-hood function here, or we have to
	// ### rewrite lots of code from QPixmap::convertToImage().
	// ### Doesn't matter yet, because Netscape doesn't ever set
	// ### the background image of the window it gives us.
    }
#endif

    createNewWindowsForAllChildren(this);

    setGeometry( pi->x, pi->y, pi->width, pi->height );
}
开发者ID:opieproject,项目名称:qte-opie,代码行数:38,代码来源:qnp.cpp

示例2: policy

/*!
  Change the alignment

  \param alignment New alignment
  \sa QwtScaleWidget::alignment
*/
void QwtScaleWidget::setAlignment(QwtScaleDraw::Alignment alignment)
{
#if QT_VERSION >= 0x040000
    if ( !testAttribute(Qt::WA_WState_OwnSizePolicy) )
#else
    if ( !testWState( WState_OwnSizePolicy ) )
#endif
    {
        QSizePolicy policy(QSizePolicy::MinimumExpanding,
            QSizePolicy::Fixed);
        if ( d_data->scaleDraw->orientation() == Qt::Vertical )
            policy.transpose();
        setSizePolicy(policy);

#if QT_VERSION >= 0x040000
        setAttribute(Qt::WA_WState_OwnSizePolicy, false);
#else
        clearWState( WState_OwnSizePolicy );
#endif
    }

    if (d_data->scaleDraw)
        d_data->scaleDraw->setAlignment(alignment);
    layoutScale();
}
开发者ID:BackupTheBerlios,项目名称:qtiplot-svn,代码行数:31,代码来源:qwt_scale_widget.cpp

示例3: sizePolicy

/*!
  \brief Set the wheel's orientation.
  \param o Orientation. Allowed values are
           Qt::Horizontal and Qt::Vertical.
   Defaults to Qt::Horizontal.
  \sa QwtAbstractSlider::orientation()
*/
void QwtWheel::setOrientation(Qt::Orientation o)
{
    if ( orientation() == o )
        return;

#if QT_VERSION >= 0x040000
    if ( !testAttribute(Qt::WA_WState_OwnSizePolicy) )
#else
    if ( !testWState( WState_OwnSizePolicy ) ) 
#endif
    {
        QSizePolicy sp = sizePolicy();
        sp.transpose();
        setSizePolicy(sp);

#if QT_VERSION >= 0x040000
        setAttribute(Qt::WA_WState_OwnSizePolicy, false);
#else
        clearWState( WState_OwnSizePolicy );
#endif
    }

    QwtAbstractSlider::setOrientation(o);
    layoutWheel();
}
开发者ID:AlexKraemer,项目名称:RFID_ME_HW_GUI,代码行数:32,代码来源:qwt_wheel.cpp

示例4: QDialog

/*
 *  Constructs a dlgOptions 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.
 */
dlgOptions::dlgOptions( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "dlgOptions" );
    setSizeGripEnabled( TRUE );
    dlgOptionsLayout = new QGridLayout( this, 1, 1, 5, 5, "dlgOptionsLayout"); 

    Layout5 = new QVBoxLayout( 0, 0, 6, "Layout5"); 

    buttonOk = new QPushButton( this, "buttonOk" );
    buttonOk->setAutoDefault( TRUE );
    buttonOk->setDefault( TRUE );
    Layout5->addWidget( buttonOk );

    buttonCancel = new QPushButton( this, "buttonCancel" );
    buttonCancel->setAutoDefault( TRUE );
    Layout5->addWidget( buttonCancel );

    buttonHelp = new QPushButton( this, "buttonHelp" );
    buttonHelp->setAutoDefault( TRUE );
    Layout5->addWidget( buttonHelp );
    Spacer1 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    Layout5->addItem( Spacer1 );

    dlgOptionsLayout->addMultiCellLayout( Layout5, 0, 1, 1, 1 );

    LineEdit1 = new QLineEdit( this, "LineEdit1" );
    LineEdit1->setMinimumSize( QSize( 0, 70 ) );
    LineEdit1->setPaletteBackgroundColor( QColor( 220, 220, 220 ) );
    LineEdit1->setFocusPolicy( QLineEdit::NoFocus );
    LineEdit1->setAlignment( int( QLineEdit::AlignAuto ) );
    LineEdit1->setReadOnly( TRUE );

    dlgOptionsLayout->addWidget( LineEdit1, 1, 0 );

    taProps = new QTable( this, "taProps" );
    taProps->setNumCols( taProps->numCols() + 1 );
    taProps->horizontalHeader()->setLabel( taProps->numCols() - 1, tr( "Property" ) );
    taProps->setNumCols( taProps->numCols() + 1 );
    taProps->horizontalHeader()->setLabel( taProps->numCols() - 1, tr( "Value" ) );
    taProps->setNumRows( 0 );
    taProps->setNumCols( 2 );
    taProps->setSorting( FALSE );
    taProps->setSelectionMode( QTable::SingleRow );

    dlgOptionsLayout->addWidget( taProps, 0, 0 );
    languageChange();
    resize( QSize(322, 384).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
    connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );

    // tab order
    setTabOrder( buttonOk, buttonCancel );
    setTabOrder( buttonCancel, buttonHelp );
    setTabOrder( buttonHelp, LineEdit1 );
}
开发者ID:Miguel-J,项目名称:eneboo-core,代码行数:67,代码来源:dlgoptions.cpp

示例5: QFitNamedWidget

QFitModelWidget::QFitModelWidget( QWidget* parent,  const char* name )
    : QFitNamedWidget( parent, name )
{
    if (name==0) setName( "QFitModelWidget" );
    setCaption("QFitModelWidget");

    AmplChk = new QCheckBox( this, "AmplChk" );
    AmplChk->setGeometry( QRect( 10, 110, 80, 25 ) );
    AmplChk->setText("amplitude");

    textLabel1 = new QLabel( "group", this, "textLabel1" );
    textLabel1->setGeometry( QRect( 200, 110, 40, 20 ) );

    BuffersChk = new QCheckBox( this, "BuffersChk" );
    BuffersChk->setGeometry( QRect( 100, 110, 90, 25 ) );
    BuffersChk->setText("use buffers");

    GroupSpin = new QSpinBox( this, "GroupSpin" );
    GroupSpin->setGeometry( QRect( 240, 110, 55, 22 ) );
    GroupSpin->setMinValue( -1 );
    resize( QSize(600, 480).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( AmplChk, SIGNAL( toggled(bool) ), this, SLOT( AmplChk_toggled(bool) ) );
    connect( BuffersChk, SIGNAL( toggled(bool) ), this, SLOT( BuffersChk_toggled(bool) ) );
    connect( GroupSpin, SIGNAL( valueChanged(int) ), this, SLOT( GroupSpin_valueChanged(int) ) );
}
开发者ID:svn2github,项目名称:Go4,代码行数:28,代码来源:QFitModelWidget.cpp

示例6: QWidget

/*
 *  Constructs a SQDFrame as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
SQDFrame::SQDFrame( QWidget* parent, const char* name, WFlags fl )
  : QWidget( parent, name, fl ), HFSolver(NULL)
{
  if ( !name )
    setName( "SQDFrame" );
  potLabel = new QLabel( this, "poteLabel" );
  potLabel->setGeometry( QRect( 240, 20, 260, 24 ) );
  potFrame = new NxyCurvePlot(this,"potPlot");
  potFrame->setGeometry( QRect( 20, 60, 540, 200 ) );
  potFrame->setFrameShape( QFrame::StyledPanel );
  potFrame->setFrameShadow( QFrame::Raised );
  wfsLabel = new QLabel( this, "wfsLabel" );
  wfsLabel->setGeometry( QRect( 160, 280, 400, 24 ) );
  wfsFrame = new NxyCurvePlot(this,"wfsPlot");
  wfsFrame->setGeometry( QRect( 20, 320, 540, 270 ) );
  d_log = new QTextEdit(this);
  d_log->setGeometry( QRect( 40, 600, 510, 200 ));
  d_log->setTextFormat(Qt::LogText);
  QFrame *hb = new QFrame(this,"buttonbox");
  hb->setGeometry(QRect(40,805,540,60));
  QHBoxLayout *layout = new QHBoxLayout(hb);
  quitButton = new QPushButton(hb, "quitButton" );
  layout->addItem(new QSpacerItem( 50, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ));
  layout->addWidget(quitButton);
  layout->addItem(new QSpacerItem( 50, 20, QSizePolicy::Fixed, QSizePolicy::Minimum ));
  saveButton = new QPushButton( hb, "saveButton" );
  layout->addWidget(saveButton);
  layout->addItem(new QSpacerItem( 50, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ));
  connect( quitButton, SIGNAL(clicked()), qApp, SLOT(quit()) );
  connect( saveButton, SIGNAL(clicked()), this, SLOT(slotSave()) );
  resize( QSize(600, 860).expandedTo(minimumSizeHint()) );
  languageChange();
  clearWState( WState_Polished );
}
开发者ID:digideskio,项目名称:qmcpack,代码行数:38,代码来源:SQDFrame.cpp

示例7: QDialog

/*
 *  Constructs a TextEditDialog 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.
 */
TextEditDialog::TextEditDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "TextEditDialog" );
    setMinimumSize( QSize( 190, 100 ) );
    setMaximumSize( QSize( 190, 100 ) );

    TextLabel1 = new QLabel( this, "TextLabel1" );
    TextLabel1->setGeometry( QRect( 10, 10, 148, 15 ) );

    textLineEdit = new QLineEdit( this, "textLineEdit" );
    textLineEdit->setGeometry( QRect( 10, 30, 170, 23 ) );
    textLineEdit->setMaxLength( 20 );

    buttonOk = new QPushButton( this, "buttonOk" );
    buttonOk->setGeometry( QRect( 10, 60, 80, 32 ) );
    buttonOk->setAutoDefault( TRUE );
    buttonOk->setDefault( TRUE );

    buttonCancel = new QPushButton( this, "buttonCancel" );
    buttonCancel->setGeometry( QRect( 100, 60, 80, 32 ) );
    buttonCancel->setAutoDefault( TRUE );
    languageChange();
    resize( QSize(190, 100).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
    connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );

    // tab order
    setTabOrder( textLineEdit, buttonOk );
    setTabOrder( buttonOk, buttonCancel );
}
开发者ID:rd8,项目名称:qGo,代码行数:42,代码来源:textedit_gui.cpp

示例8: QDialog

/* 
 *  Constructs a Superconductor_Messages 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.
 */
Superconductor_Messages::Superconductor_Messages( SCMessageList* sl, QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
	if ( sl )
	strings = sl;
	
    if ( !name )
	setName( "Superconductor_Messages" );

	layout = new QGridLayout( this, 2, 2 );
//	layout->setAutoAdd( TRUE );
	layout->setResizeMode( QLayout::FreeResize );

    listBox = new QListBox( this, "listBox" );
    listBox->setGeometry( QRect( 10, 10, 291, 461 ) );
    listBox->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, listBox->sizePolicy().hasHeightForWidth() ) );
    listBox->setSelectionMode( QListBox::NoSelection );
    listBox->setVariableWidth( TRUE );	
    languageChange();
    resize( QSize(314, 480).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
	
	save = new QPushButton( "Save", this );
	closeButton = new QPushButton( "Close", this );
	
	layout->addMultiCellWidget( listBox, 0, 0, 0, 1 );
	layout->addWidget( save, 1, 0 );
	layout->addWidget( closeButton, 1, 1 );

	connect( save, SIGNAL( clicked() ), this, SLOT( saveOutput() ) );
	connect( closeButton, SIGNAL( clicked() ), this, SLOT( closeDialog() ) );
}
开发者ID:AlphaPixel,项目名称:3DNature,代码行数:39,代码来源:message_dialog.cpp

示例9: setWState

void QWidget::setMouseTracking( bool enable )
{
    if ( enable )
	setWState( WState_MouseTracking );
    else
	clearWState( WState_MouseTracking );
}
开发者ID:Miguel-J,项目名称:eneboo-core,代码行数:7,代码来源:qwidget_qws.cpp

示例10: QDialog

/*
 *  Constructs a aboutForm 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.
 */
aboutForm::aboutForm( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "aboutForm" );
    aboutFormLayout = new QVBoxLayout( this, 11, 6, "aboutFormLayout"); 

    textLabel1 = new QLabel( this, "textLabel1" );
    textLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );
    textLabel1->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) );
    aboutFormLayout->addWidget( textLabel1 );

    layout55 = new QHBoxLayout( 0, 0, 6, "layout55"); 
    QSpacerItem* spacer = new QSpacerItem( 141, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout55->addItem( spacer );

    okButton = new QPushButton( this, "okButton" );
    okButton->setDefault( TRUE );
    layout55->addWidget( okButton );
    aboutFormLayout->addLayout( layout55 );
    languageChange();
    resize( QSize(514, 191).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( okButton, SIGNAL( clicked() ), this, SLOT( close() ) );
    init();
}
开发者ID:jiajw0426,项目名称:easyscada,代码行数:35,代码来源:aboutform.cpp

示例11: QWidget

/*
 *  Constructs a FileViewLayout as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
FileViewLayout::FileViewLayout( QWidget* parent, const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    if ( !name )
	setName( "FileViewLayout" );
    FileViewLayoutLayout = new QVBoxLayout( this, 0, 0, "FileViewLayoutLayout"); 

    m_pTabWidget = new QTabWidget( this, "m_pTabWidget" );

    tab = new QWidget( m_pTabWidget, "tab" );
    tabLayout = new QVBoxLayout( tab, 0, 0, "tabLayout"); 

    m_pFileList = new FileList( tab, "m_pFileList" );
    tabLayout->addWidget( m_pFileList );
    m_pTabWidget->insertTab( tab, QString::fromLatin1("") );

    tab_2 = new QWidget( m_pTabWidget, "tab_2" );
    tabLayout_2 = new QVBoxLayout( tab_2, 0, 0, "tabLayout_2"); 

    m_pFileTree = new KFileTreeView( tab_2, "m_pFileTree" );
    tabLayout_2->addWidget( m_pFileTree );
    m_pTabWidget->insertTab( tab_2, QString::fromLatin1("") );
    FileViewLayoutLayout->addWidget( m_pTabWidget );
    languageChange();
    resize( QSize(364, 639).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}
开发者ID:fredollinger,项目名称:kscope,代码行数:31,代码来源:fileviewlayout.cpp

示例12: QDialog

/*
 *  Constructs a dlgReleaseNotes 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.
 */
dlgReleaseNotes::dlgReleaseNotes( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "dlgReleaseNotes" );
    dlgReleaseNotesLayout = new QVBoxLayout( this, 5, 10, "dlgReleaseNotesLayout"); 

    qtxtReleaseNotes = new QTextBrowser( this, "qtxtReleaseNotes" );
    qtxtReleaseNotes->setEnabled( TRUE );
    QFont qtxtReleaseNotes_font(  qtxtReleaseNotes->font() );
    qtxtReleaseNotes->setFont( qtxtReleaseNotes_font ); 
    qtxtReleaseNotes->setLineWidth( 0 );
    qtxtReleaseNotes->setTextFormat( QTextBrowser::AutoText );
    dlgReleaseNotesLayout->addWidget( qtxtReleaseNotes );

    layout3 = new QHBoxLayout( 0, 0, 10, "layout3"); 
    spacer1_2 = new QSpacerItem( 140, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout3->addItem( spacer1_2 );

    pbtnClose = new QPushButton( this, "pbtnClose" );
    pbtnClose->setDefault( TRUE );
    layout3->addWidget( pbtnClose );
    spacer1 = new QSpacerItem( 140, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout3->addItem( spacer1 );
    dlgReleaseNotesLayout->addLayout( layout3 );
    languageChange();
    resize( QSize(576, 419).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( pbtnClose, SIGNAL( clicked() ), this, SLOT( close() ) );
    init();
}
开发者ID:jeez,项目名称:iqr,代码行数:40,代码来源:iqrReleaseNotes.cpp

示例13: QWidget

/*
 *  Constructs a frm_procesos as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
frm_procesos::frm_procesos( QWidget* parent, const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    if ( !name )
	setName( "frm_procesos" );
    frm_procesosLayout = new QVBoxLayout( this, 11, 6, "frm_procesosLayout"); 

    groupBox1 = new QGroupBox( this, "groupBox1" );
    groupBox1->setColumnLayout(0, Qt::Vertical );
    groupBox1->layout()->setSpacing( 6 );
    groupBox1->layout()->setMargin( 11 );
    groupBox1Layout = new QVBoxLayout( groupBox1->layout() );
    groupBox1Layout->setAlignment( Qt::AlignTop );

    table1 = new QTable( groupBox1, "table1" );
    table1->setNumRows( 3 );
    table1->setNumCols( 3 );
    groupBox1Layout->addWidget( table1 );

    pushButton1 = new QPushButton( groupBox1, "pushButton1" );
    groupBox1Layout->addWidget( pushButton1 );
    frm_procesosLayout->addWidget( groupBox1 );
    languageChange();
    resize( QSize(512, 445).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}
开发者ID:Jona0712,项目名称:proyectos-kreig-usac,代码行数:30,代码来源:wdg_procesos.cpp

示例14: QDialog

/*
 *  Constructs a NthMoveDialog 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.
 */
NthMoveDialog::NthMoveDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "NthMoveDialog" );
    setMinimumSize( QSize( 210, 90 ) );
    setMaximumSize( QSize( 210, 90 ) );

    buttonCancel = new QPushButton( this, "buttonCancel" );
    buttonCancel->setGeometry( QRect( 110, 50, 80, 32 ) );
    buttonCancel->setAutoDefault( TRUE );

    TextLabel1 = new QLabel( this, "TextLabel1" );
    TextLabel1->setGeometry( QRect( 10, 10, 120, 20 ) );

    buttonOk = new QPushButton( this, "buttonOk" );
    buttonOk->setGeometry( QRect( 20, 50, 80, 32 ) );
    buttonOk->setAutoDefault( TRUE );
    buttonOk->setDefault( TRUE );

    moveSpinBox = new QSpinBox( this, "moveSpinBox" );
    moveSpinBox->setGeometry( QRect( 140, 10, 50, 20 ) );
    moveSpinBox->setMaxValue( 999 );
    languageChange();
    resize( QSize(210, 90).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
    connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );

    // tab order
    setTabOrder( moveSpinBox, buttonOk );
    setTabOrder( buttonOk, buttonCancel );
}
开发者ID:rd8,项目名称:qGo,代码行数:42,代码来源:nthmove_gui.cpp

示例15: QWidget

EnhancedTagAttributeTree::EnhancedTagAttributeTree(QWidget *parent, const char *name)
: QWidget(parent, name)
{

  widgetLayout = new QGridLayout( this, 1, 1, 11, 6, "MainLayout");

  attrTree = new TagAttributeTree(this, "TagAttributeTree");
  attrTree->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::MinimumExpanding);
  widgetLayout->addMultiCellWidget( attrTree, 1, 1, 0, 3 );

  nodeName = new QLabel(this, i18n( "Node Name" ));
  nodeName->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed, 0, 0, nodeName->sizePolicy().hasHeightForWidth() ) );

  widgetLayout->addWidget( nodeName, 0, 0 );
  deleteTag = new KPushButton(this, i18n( "Delete Tag" ));
  deleteTag->setPixmap(SmallIcon("editdelete"));
  deleteTag->setMaximumHeight(32);
  deleteTag->setMaximumWidth(32);
  QToolTip::add(deleteTag, i18n("Delete the current tag only."));

  deleteAll = new KPushButton(this, i18n( "Delete All" ));
  deleteAll->setPixmap(SmallIcon("editdelete"));
  deleteAll->setMaximumHeight(32);
  deleteAll->setMaximumWidth(32);
  QToolTip::add(deleteAll, i18n("Delete the current tag and all its children."));

  widgetLayout->addWidget( deleteTag, 0, 2 );
  widgetLayout->addWidget( deleteAll, 0, 3 );
  clearWState( WState_Polished );

  connect(attrTree, SIGNAL(newNodeSelected(Node *)), this, SLOT(NodeSelected(Node *)));
  connect(deleteTag, SIGNAL(clicked()), this, SLOT(deleteNode()));
  connect(deleteAll, SIGNAL(clicked()), this, SLOT(deleteSubTree()));
}
开发者ID:serghei,项目名称:kde3-kdewebdev,代码行数:34,代码来源:tagattributetree.cpp


注:本文中的clearWState函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。