/*! 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 ); }
/*! 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(); }
/*! \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(); }
/* * 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 ); }
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) ) ); }
/* * 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 ); }
/* * 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 ); }
/* * 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() ) ); }
void QWidget::setMouseTracking( bool enable ) { if ( enable ) setWState( WState_MouseTracking ); else clearWState( WState_MouseTracking ); }
/* * 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(); }
/* * 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 ); }
/* * 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(); }
/* * 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 ); }
/* * 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 ); }
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())); }
/* * Constructs a AddHostDialogBase 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. */ AddHostDialogBase::AddHostDialogBase( QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ) { if ( !name ) setName( "AddHostDialogBase" ); AddHostDialogBaseLayout = new QGridLayout( this, 1, 1, 11, 6, "AddHostDialogBaseLayout"); spacer1 = new QSpacerItem( 217, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); AddHostDialogBaseLayout->addMultiCell( spacer1, 3, 3, 0, 1 ); okButton = new QPushButton( this, "okButton" ); okButton->setEnabled( FALSE ); AddHostDialogBaseLayout->addWidget( okButton, 3, 2 ); cancelButton = new QPushButton( this, "cancelButton" ); AddHostDialogBaseLayout->addWidget( cancelButton, 3, 3 ); addressEdit = new QLineEdit( this, "addressEdit" ); AddHostDialogBaseLayout->addMultiCellWidget( addressEdit, 0, 0, 1, 3 ); hostEdit = new QLineEdit( this, "hostEdit" ); AddHostDialogBaseLayout->addMultiCellWidget( hostEdit, 1, 1, 1, 3 ); macEdit = new QLineEdit( this, "macEdit" ); AddHostDialogBaseLayout->addMultiCellWidget( macEdit, 2, 2, 1, 3 ); macLabel = new QLabel( this, "macLabel" ); AddHostDialogBaseLayout->addWidget( macLabel, 2, 0 ); addressLabel = new QLabel( this, "addressLabel" ); AddHostDialogBaseLayout->addWidget( addressLabel, 0, 0 ); nameLabel = new QLabel( this, "nameLabel" ); AddHostDialogBaseLayout->addWidget( nameLabel, 1, 0 ); languageChange(); resize( QSize(360, 133).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); // signals and slots connections connect( okButton, SIGNAL( clicked() ), this, SLOT( accept() ) ); connect( cancelButton, SIGNAL( clicked() ), this, SLOT( reject() ) ); connect( addressEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( enableOkButton() ) ); // tab order setTabOrder( addressEdit, hostEdit ); setTabOrder( hostEdit, macEdit ); setTabOrder( macEdit, okButton ); setTabOrder( okButton, cancelButton ); // buddies addressLabel->setBuddy( hostEdit ); nameLabel->setBuddy( hostEdit ); }
MainWindow::MainWindow(QWidget* parent, const char* name, WFlags fl) // : KMainWindow(parent, name, fl), m_debuggerSettings(0), m_browserSettings(0) : KParts::MainWindow(parent, name, fl), m_debuggerSettings(0), m_browserSettings(0) { if(!name) { setName("MainWindow"); } setupStatusBar(); m_debugger_manager = new DebuggerManager(this); createWidgets(); setupActions(); createGUI(0); resize( QSize(633, 533).expandedTo(minimumSizeHint()) ); clearWState(WState_Polished); m_debugger_manager->init(); connect(kapp, SIGNAL(aboutToQuit()), this, SLOT(slotClose())); connect(ProtoeditorSettings::self(), SIGNAL(sigSettingsChanged()), this, SLOT(slotSettingsChanged())); loadSites(); stateChanged("init"); }
/* * Constructs a page1layout as a child of 'parent', with the * name 'name' and widget flags set to 'f'. */ page1layout::page1layout( QWidget* parent, const char* name, WFlags fl ) : QWidget( parent, name, fl ) { if ( !name ) setName( "page1layout" ); page1layoutLayout = new QVBoxLayout( this, 11, 6, "page1layoutLayout"); textLabel1 = new QLabel( this, "textLabel1" ); page1layoutLayout->addWidget( textLabel1 ); spacer2 = new QSpacerItem( 20, 16, QSizePolicy::Minimum, QSizePolicy::Expanding ); page1layoutLayout->addItem( spacer2 ); textLabel2 = new QLabel( this, "textLabel2" ); textLabel2->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) ); page1layoutLayout->addWidget( textLabel2 ); spacer3 = new QSpacerItem( 20, 50, QSizePolicy::Minimum, QSizePolicy::Expanding ); page1layoutLayout->addItem( spacer3 ); layout3 = new QHBoxLayout( 0, 0, 6, "layout3"); textLabel3 = new QLabel( this, "textLabel3" ); layout3->addWidget( textLabel3 ); page1layoutLayout->addLayout( layout3 ); spacer1 = new QSpacerItem( 21, 130, QSizePolicy::Minimum, QSizePolicy::Expanding ); page1layoutLayout->addItem( spacer1 ); languageChange(); resize( QSize(528, 321).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); }
/* * Constructs a KMsgModemWidgetBase as a child of 'parent', with the * name 'name' and widget flags set to 'f'. */ KMsgModemWidgetBase::KMsgModemWidgetBase( QWidget* parent, const char* name, WFlags fl ) : QWidget( parent, name, fl ) { if ( !name ) setName( "kmsgmodemwidgetbase" ); setMinimumSize( QSize( 100, 50 ) ); kmsgmodemwidgetbaseLayout = new QGridLayout( this, 1, 1, 11, 6, "kmsgmodemwidgetbaseLayout"); MessageView = new KListView( this, "MessageView" ); MessageView->addColumn( tr2i18n( "#" ) ); MessageView->addColumn( tr2i18n( "Type" ) ); MessageView->addColumn( tr2i18n( "Date" ) ); MessageView->addColumn( tr2i18n( "Size" ) ); MessageView->addColumn( tr2i18n( "Sender" ) ); MessageView->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, MessageView->sizePolicy().hasHeightForWidth() ) ); MessageView->setMinimumSize( QSize( 500, 240 ) ); MessageView->setCursor( QCursor( 13 ) ); MessageView->setMidLineWidth( 0 ); MessageView->setResizePolicy( KListView::Default ); MessageView->setProperty( "selectionMode", "Single" ); MessageView->setAllColumnsShowFocus( TRUE ); MessageView->setRootIsDecorated( FALSE ); MessageView->setFullWidth( TRUE ); kmsgmodemwidgetbaseLayout->addWidget( MessageView, 0, 0 ); languageChange(); resize( QSize(521, 272).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); // signals and slots connections connect( MessageView, SIGNAL( clicked(QListViewItem*) ), this, SLOT( MessageClicked(QListViewItem*) ) ); }
/* * Constructs a PluginDialog 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. */ PluginDialog::PluginDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ) { if ( !name ) setName( "PluginDialog" ); textLabel2 = new QLabel( this, "textLabel2" ); textLabel2->setGeometry( QRect( 80, 30, 400, 60 ) ); textLabel1 = new QLabel( this, "textLabel1" ); textLabel1->setGeometry( QRect( 20, 120, 100, 20 ) ); browserButton = new QPushButton( this, "browserButton" ); browserButton->setGeometry( QRect( 360, 170, 140, 27 ) ); lineEdit1 = new QLineEdit( this, "lineEdit1" ); lineEdit1->setGeometry( QRect( 150, 120, 400, 25 ) ); okButton = new QPushButton( this, "okButton" ); okButton->setGeometry( QRect( 210, 220, 117, 27 ) ); languageChange(); resize( QSize(613, 289).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); // signals and slots connections connect( browserButton, SIGNAL( clicked() ), this, SLOT( browserButton_clicked() ) ); connect( okButton, SIGNAL( clicked() ), this, SLOT( accept() ) ); init(); }
void fix() { QRect g = geometry(); QColor bg = backgroundColor(); bool mt = hasMouseTracking(); bool hascurs = testWFlags( WState_OwnCursor ); QCursor curs = cursor(); clearWState( WState_Created ); clearWState( WState_Visible ); create( 0, TRUE, FALSE ); setGeometry(g); setBackgroundColor( bg ); setMouseTracking( mt ); if ( hascurs ) { setCursor( curs ); } }
/* * Constructs a BorneReservation 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. */ BorneReservation::BorneReservation(QWidget * parent, const char *name, bool modal, WFlags fl) :QDialog(parent, name, modal, fl) { if (!name) setName("BorneReservation"); setMinimumSize(QSize(0, 0)); setMaximumSize(QSize(1200, 600)); textPub = new QTextEdit(this, "textPub"); textPub->setGeometry(QRect(20, 20, 760, 90)); textPub->setReadOnly(TRUE); textMenu = new QTextEdit(this, "textMenu"); textMenu->setGeometry(QRect(20, 150, 480, 100)); textMenu->setReadOnly(TRUE); textChoix = new QLabel(this, "textChoix"); textChoix->setGeometry(QRect(520, 150, 180, 20)); lineChoix = new QLineEdit(this, "lineChoix"); lineChoix->setGeometry(QRect(660, 150, 120, 21)); ButtonSelectionner = new QPushButton(this, "ButtonSelectionner"); ButtonSelectionner->setGeometry(QRect(520, 210, 120, 29)); ButtonSelectionner->setAutoDefault(FALSE); ButtonAnnuler = new QPushButton(this, "ButtonAnnuler"); ButtonAnnuler->setGeometry(QRect(260, 330, 100, 29)); ButtonAnnuler->setAutoRepeat(FALSE); ButtonAnnuler->setAutoDefault(FALSE); ButtonConfirmer = new QPushButton(this, "ButtonConfirmer"); ButtonConfirmer->setGeometry(QRect(100, 330, 100, 29)); ButtonConfirmer->setAutoDefault(FALSE); textNbPlaces = new QLabel(this, "textNbPlaces"); textNbPlaces->setGeometry(QRect(520, 180, 180, 20)); lineNbPlaces = new QLineEdit(this, "lineNbPlaces"); lineNbPlaces->setGeometry(QRect(720, 180, 60, 20)); languageChange(); resize(QSize(800, 400).expandedTo(minimumSizeHint())); clearWState(WState_Polished); // signals and slots connections connect(ButtonAnnuler, SIGNAL(pressed()), this, SLOT(Annuler())); connect(ButtonConfirmer, SIGNAL(pressed()), this, SLOT(Confirmer())); connect(ButtonSelectionner, SIGNAL(pressed()), this, SLOT(Selectionner())); connect(lineChoix, SIGNAL(returnPressed()), this, SLOT(Selectionner())); connect(lineNbPlaces, SIGNAL(returnPressed()), this, SLOT(Selectionner())); AffichagePublicite("Chargement en cours ..."); AffichageMenu("Chargement en cours ..."); }
/* * Constructs a EvaSysBroadcastUIBase as a child of 'parent', with the * name 'name' and widget flags set to 'f'. */ EvaSysBroadcastUIBase::EvaSysBroadcastUIBase( TQWidget* parent, const char* name, WFlags fl ) : TQWidget( parent, name, fl ) { if ( !name ) setName( "EvaSysBroadcastUIBase" ); EvaSysBroadcastUIBaseLayout = new TQGridLayout( this, 1, 1, 11, 6, "EvaSysBroadcastUIBaseLayout"); layout7 = new TQVBoxLayout( 0, 0, 6, "layout7"); fraContents = new TQFrame( this, "fraContents" ); fraContents->setPaletteBackgroundColor( TQColor( 234, 247, 225 ) ); fraContents->setFrameShape( TQFrame::StyledPanel ); fraContents->setFrameShadow( TQFrame::Raised ); fraContentsLayout = new TQGridLayout( fraContents, 1, 1, 11, 6, "fraContentsLayout"); layout6 = new TQVBoxLayout( 0, 0, 6, "layout6"); layout5 = new TQHBoxLayout( 0, 0, 6, "layout5"); lblTitle = new TQLabel( fraContents, "lblTitle" ); layout5->addWidget( lblTitle ); spacer2 = new TQSpacerItem( 111, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); layout5->addItem( spacer2 ); layout6->addLayout( layout5 ); lblContents = new TQLabel( fraContents, "lblContents" ); lblContents->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, lblContents->sizePolicy().hasHeightForWidth() ) ); TQFont lblContents_font = TDEGlobalSettings::fixedFont(); lblContents->setFont( lblContents_font ); lblContents->setFrameShape( TQLabel::NoFrame ); lblContents->setTextFormat( TQLabel::PlainText ); lblContents->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignTop | TQLabel::AlignLeft ) ); layout6->addWidget( lblContents ); kurllblUrl = new KURLLabel( fraContents, "kurllblUrl" ); kurllblUrl->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)1, 0, 0, kurllblUrl->sizePolicy().hasHeightForWidth() ) ); kurllblUrl->setFrameShape( KURLLabel::NoFrame ); layout6->addWidget( kurllblUrl ); fraContentsLayout->addLayout( layout6, 0, 0 ); layout7->addWidget( fraContents ); layout3 = new TQHBoxLayout( 0, 0, 6, "layout3"); spacer1 = new TQSpacerItem( 101, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); layout3->addItem( spacer1 ); btnDetails = new TQPushButton( this, "btnDetails" ); layout3->addWidget( btnDetails ); btnClose = new TQPushButton( this, "btnClose" ); layout3->addWidget( btnClose ); layout7->addLayout( layout3 ); EvaSysBroadcastUIBaseLayout->addLayout( layout7, 0, 0 ); languageChange(); resize( TQSize(400, 248).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); }
/* * Constructs a Iec61850driverConfigurationData 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. */ Iec61850driverConfigurationData::Iec61850driverConfigurationData( QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ) { if ( !name ) setName( "Form1" ); Name = new QLineEdit( this, "Name" ); Name->setEnabled( FALSE ); Name->setGeometry( QRect( 170, 30, 200, 20 ) ); Name->setFrameShape( QLineEdit::LineEditPanel ); Name->setFrameShadow( QLineEdit::Sunken ); textLabel1 = new QLabel( this, "textLabel1" ); textLabel1->setGeometry( QRect( 40, 30, 49, 20 ) ); textLabel4 = new QLabel( this, "textLabel4" ); textLabel4->setGeometry( QRect( 40, 110, 90, 20 ) ); textLabel5 = new QLabel( this, "textLabel5" ); textLabel5->setGeometry( QRect( 40, 150, 49, 20 ) ); textLabel3 = new QLabel( this, "textLabel3" ); textLabel3->setGeometry( QRect( 40, 70, 100, 20 ) ); CancelButton = new QPushButton( this, "CancelButton" ); CancelButton->setGeometry( QRect( 290, 230, 82, 26 ) ); OkButton = new QPushButton( this, "OkButton" ); OkButton->setGeometry( QRect( 50, 230, 82, 26 ) ); HelpButton = new QPushButton( this, "HelpButton" ); HelpButton->setGeometry( QRect( 170, 230, 82, 26 ) ); IEC61850ServerIPAddressText = new QLineEdit( this, "IEC61850ServerIPAddressText" ); IEC61850ServerIPAddressText->setGeometry( QRect( 170, 70, 200, 20 ) ); IEC61850ServerIPPortText = new QLineEdit( this, "IEC61850ServerIPPortText" ); IEC61850ServerIPPortText->setGeometry( QRect( 170, 110, 200, 20 ) ); NItems = new QSpinBox( this, "NItems" ); NItems->setGeometry( QRect( 170, 150, 100, 20 ) ); NItems->setMaxValue( 1000 ); PollInterval = new QSpinBox( this, "PollInterval" ); PollInterval->setGeometry( QRect( 170, 180, 100, 20 ) ); PollInterval->setMaxValue( 10000 ); textLabel6 = new QLabel( this, "textLabel6" ); textLabel6->setGeometry( QRect( 40, 180, 80, 20 ) ); languageChange(); resize( QSize(429, 299).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); // signals and slots connections connect( OkButton, SIGNAL( clicked() ), this, SLOT( OkClicked() ) ); connect( CancelButton, SIGNAL( clicked() ), this, SLOT( reject() ) ); connect( HelpButton, SIGNAL( clicked() ), this, SLOT( Help() ) ); }
/* * Constructs a Form1 as a child of 'parent', with the * name 'name' and widget flags set to 'f'. */ Form1::Form1( QWidget* parent, const char* name, WFlags fl ) : QWidget( parent, name, fl ) { if ( !name ) setName( "Form1" ); languageChange(); resize( QSize(600, 480).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); }
DateDialog::DateDialog( QString &date, QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ) { if ( !name ) setName( "DateDialog" ); DateDialogLayout = new QVBoxLayout( this, 11, 6, "DateDialogLayout"); dateTextLabel = new QLabel( this, "dateTextLabel" ); DateDialogLayout->addWidget( dateTextLabel ); layout2 = new QHBoxLayout( 0, 0, 6, "layout2"); dayTextLabel = new QLabel( this, "dayTextLabel" ); layout2->addWidget( dayTextLabel ); daySpinBox = new QSpinBox( this, "daySpinBox" ); layout2->addWidget( daySpinBox ); monthTextLabel = new QLabel( this, "monthTextLabel" ); layout2->addWidget( monthTextLabel ); monthSpinBox = new QSpinBox( this, "monthSpinBox" ); layout2->addWidget( monthSpinBox ); yearTextLabel = new QLabel( this, "yearTextLabel" ); layout2->addWidget( yearTextLabel ); yearSpinBox = new QSpinBox( this, "yearSpinBox" ); yearSpinBox->setMaxValue(3000); layout2->addWidget( yearSpinBox ); DateDialogLayout->addLayout( layout2 ); layout1 = new QHBoxLayout( 0, 0, 6, "layout1"); spacer1 = new QSpacerItem( 40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); layout1->addItem( spacer1 ); okButton = new QPushButton( this, "okButton" ); layout1->addWidget( okButton ); cancelButton = new QPushButton( this, "cancelButton" ); layout1->addWidget( cancelButton ); DateDialogLayout->addLayout( layout1 ); languageChange(); resize( QSize(315, 129).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); connect(cancelButton, SIGNAL( clicked() ), this, SLOT( cancel() )); connect(okButton, SIGNAL( clicked() ), this, SLOT( ok() )); QDate tDate = QDate::currentDate(); daySpinBox->setValue( tDate.day() ); monthSpinBox->setValue( tDate.month() ); yearSpinBox->setValue( tDate.year() ); gDate = &date; }
/* * Constructs a KFTPFilterEditorLayout as a child of 'parent', with the * name 'name' and widget flags set to 'f'. */ KFTPFilterEditorLayout::KFTPFilterEditorLayout( QWidget* parent, const char* name, Qt::WFlags fl ) : QWidget( parent, name, fl ) { if ( !name ) setName( "KFTPFilterEditorLayout" ); KFTPFilterEditorLayoutLayout = new Q3GridLayout( this, 1, 1, 11, 6, "KFTPFilterEditorLayoutLayout"); tabWidget2 = new QTabWidget( this, "tabWidget2" ); tab = new QWidget( tabWidget2, "tab" ); tabLayout = new Q3GridLayout( tab, 1, 1, 11, 6, "tabLayout"); layout1 = new Q3VBoxLayout( 0, 0, 6, "layout1"); addPatternButton = new KPushButton( tab, "addPatternButton" ); layout1->addWidget( addPatternButton ); editPatternButton = new KPushButton( tab, "editPatternButton" ); layout1->addWidget( editPatternButton ); removePatternButton = new KPushButton( tab, "removePatternButton" ); layout1->addWidget( removePatternButton ); tabLayout->addLayout( layout1, 0, 1 ); QSpacerItem* spacer = new QSpacerItem( 31, 111, QSizePolicy::Minimum, QSizePolicy::Expanding ); tabLayout->addItem( spacer, 1, 1 ); layout2 = new Q3VBoxLayout( 0, 0, 6, "layout2"); patternList = new K3ListView( tab, "patternList" ); patternList->addColumn( tr2i18n( "Pattern" ) ); patternList->addColumn( tr2i18n( "Color" ) ); layout2->addWidget( patternList ); enabledCheck = new QCheckBox( tab, "enabledCheck" ); layout2->addWidget( enabledCheck ); tabLayout->addMultiCellLayout( layout2, 0, 1, 0, 0 ); tabWidget2->insertTab( tab, QString("") ); tab_2 = new QWidget( tabWidget2, "tab_2" ); textLabel1 = new QLabel( tab_2, "textLabel1" ); textLabel1->setGeometry( QRect( 10, 10, 130, 20 ) ); tabWidget2->insertTab( tab_2, QString("") ); tab_3 = new QWidget( tabWidget2, "tab_3" ); textLabel1_2 = new QLabel( tab_3, "textLabel1_2" ); textLabel1_2->setGeometry( QRect( 10, 10, 130, 20 ) ); tabWidget2->insertTab( tab_3, QString("") ); KFTPFilterEditorLayoutLayout->addWidget( tabWidget2, 0, 0 ); languageChange(); resize( QSize(456, 299).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); }
void QWidget::unsetCursor() { if ( extra ) { delete extra->curs; extra->curs = 0; } clearWState( WState_OwnCursor ); if ( isVisible() ) updateCursor( paintableRegion() ); }
/* * Constructs a ConfigDialog as a child of 'parent', with the * name 'name' and widget flags set to 'f'. */ ConfigDialog::ConfigDialog( QWidget* parent, const char* name, WFlags fl ) : QWidget( parent, name, fl ) { if ( !name ) setName( "ConfigDialog" ); ConfigDialogLayout = new QHBoxLayout( this, 11, 6, "ConfigDialogLayout"); layout1 = new QGridLayout( 0, 1, 1, 0, 6, "layout1"); titleAlign = new QButtonGroup( this, "titleAlign" ); titleAlign->setColumnLayout(0, Qt::Vertical ); titleAlign->layout()->setSpacing( 6 ); titleAlign->layout()->setMargin( 11 ); titleAlignLayout = new QHBoxLayout( titleAlign->layout() ); titleAlignLayout->setAlignment( Qt::AlignTop ); AlignLeft = new QRadioButton( titleAlign, "AlignLeft" ); titleAlignLayout->addWidget( AlignLeft ); AlignHCenter = new QRadioButton( titleAlign, "AlignHCenter" ); titleAlignLayout->addWidget( AlignHCenter ); AlignRight = new QRadioButton( titleAlign, "AlignRight" ); titleAlignLayout->addWidget( AlignRight ); layout1->addMultiCellWidget( titleAlign, 0, 0, 0, 4 ); highContrastButtons = new QCheckBox( this, "highContrastButtons" ); layout1->addMultiCellWidget( highContrastButtons, 3, 3, 0, 2 ); designatedTitlebarColor = new QCheckBox( this, "designatedTitlebarColor" ); layout1->addMultiCellWidget( designatedTitlebarColor, 1, 1, 0, 4 ); bordersBlendColor = new QCheckBox( this, "bordersBlendColor" ); layout1->addMultiCellWidget( bordersBlendColor, 2, 2, 0, 3 ); titleShadow = new QCheckBox( this, "titleShadow" ); layout1->addMultiCellWidget( titleShadow, 4, 4, 0, 4 ); ConfigDialogLayout->addLayout( layout1 ); languageChange(); resize( QSize(541, 194).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); // tab order setTabOrder( AlignLeft, AlignHCenter ); setTabOrder( AlignHCenter, AlignRight ); setTabOrder( AlignRight, designatedTitlebarColor ); setTabOrder( designatedTitlebarColor, bordersBlendColor ); setTabOrder( bordersBlendColor, highContrastButtons ); setTabOrder( highContrastButtons, titleShadow ); }
void QWidget::setAcceptDrops( bool on ) { if ( testWState(WState_DND) != on ) { if ( 1/*XXX qt_xdnd_enable( this, on )*/ ) { if ( on ) setWState(WState_DND); else clearWState(WState_DND); } } }