void KDockSplitter::activate(TQWidget *c0, TQWidget *c1) { if ( c0 ) child0 = c0; if ( c1 ) child1 = c1; setupMinMaxSize(); if (divider) delete divider; divider = new TQFrame(this, "pannerdivider"); divider->setFrameStyle(TQFrame::Panel | TQFrame::Raised); divider->setLineWidth(1); divider->raise(); if (m_orientation == Qt::Horizontal) divider->setCursor(TQCursor(tqsizeVerCursor)); else divider->setCursor(TQCursor(tqsizeHorCursor)); divider->installEventFilter(this); initialised= true; updateName(); divider->show(); // without this resize event, things will not work. why exactly? :( resizeEvent(0); KDockWidget* dw0 = (KDockWidget*) child0; KDockWidget* dw1 = (KDockWidget*) child1; // if fixed size is set, restore first, to restore xpos correctly if( fixedWidth0 != -1 || fixedHeight0 != -1 ) restoreFromForcedFixedSize( dw0 ); if( fixedWidth1 != -1 || fixedHeight1 != -1 ) restoreFromForcedFixedSize( dw1 ); // now force fixed sizes, if they are set. if( dw0->forcedFixedWidth() != -1 ) { setForcedFixedWidth( dw0, dw0->forcedFixedWidth() ); } else if( dw1->forcedFixedWidth() != -1 ) { setForcedFixedWidth( dw1, dw1->forcedFixedWidth() ); } if( dw0->forcedFixedHeight() != -1 ) { setForcedFixedHeight (dw0, dw0->forcedFixedHeight() ); } else if( dw1->forcedFixedHeight() != -1 ) { setForcedFixedHeight( dw1, dw1->forcedFixedHeight() ); } }
SidebarExtension::SidebarExtension( const TQString& configFile, Type type, int actions, TQWidget *parent, const char *name ) : KPanelExtension( configFile, type, actions, parent, name ),m_resizing(false),m_expandedSize(200) { kdDebug() << "SidebarExtension: Created '" << name << "', '" << configFile << "'" << endl; new KonqHistoryManager(0,"SidebarExtensionHistoryManager"); m_layout=new TQHBoxLayout(this); m_layout->activate(); m_sbWrapper=new TQVBox(this); KParts::ReadOnlyPart *p=KParts::ComponentFactory::createPartInstanceFromLibrary<KParts::ReadOnlyPart>( "konq_sidebar", m_sbWrapper, "SideBar_View", TQT_TQOBJECT(this), "Sidebar","universal"); KParts::BrowserExtension *be=KParts::BrowserExtension::childObject(p); if (be) { connect(be,TQT_SIGNAL(openURLRequest( const KURL &, const KParts::URLArgs &)), this,TQT_SLOT(openURLRequest( const KURL &, const KParts::URLArgs &))); connect(be,TQT_SIGNAL(createNewWindow( const KURL &, const KParts::URLArgs &)), this,TQT_SLOT(openURLRequest( const KURL &, const KParts::URLArgs &))); } m_resizeHandle=new TQFrame(this); m_resizeHandle->setFrameShape(TQFrame::Panel); m_resizeHandle->setFrameShadow(TQFrame::Raised); m_resizeHandle->setFixedWidth(6); m_resizeHandle->setCursor(TQCursor(Qt::SizeHorCursor)); connect(p->widget(),TQT_SIGNAL(panelHasBeenExpanded(bool)),this,TQT_SLOT(needLayoutUpdate(bool))); needLayoutUpdate(false); m_resizeHandle->installEventFilter(this); m_resizeHandle->setMouseTracking(true); // l->add(p->widget()); // p->widget()->show(); // l->activate(); }
/* * Constructs a EvaUserUIBase 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. */ EvaUserUIBase::EvaUserUIBase( TQWidget* parent, const char* name, bool modal, WFlags fl ) : TQDialog( parent, name, modal, fl ) { if ( !name ) setName( "EvaUserUIBase" ); setMinimumSize( TQSize( 512, 360 ) ); setMaximumSize( TQSize( 512, 360 ) ); pbUpdate = new TQPushButton( this, "pbUpdate" ); pbUpdate->setGeometry( TQRect( 330, 330, 69, 24 ) ); pbClose = new TQPushButton( this, "pbClose" ); pbClose->setGeometry( TQRect( 430, 330, 69, 24 ) ); lblText = new TQLabel( this, "lblText" ); lblText->setGeometry( TQRect( 10, 330, 200, 19 ) ); twTabMain = new TQTabWidget( this, "twTabMain" ); twTabMain->setGeometry( TQRect( 5, 5, 501, 320 ) ); twTabMain->setMargin( 10 ); svMain = new TQScrollView( twTabMain, "svMain" ); svMain->setStaticBackground ( TRUE ); svMain->setHScrollBarMode(TQScrollView::AlwaysOff); svMain->setFrameShape(TQFrame::NoFrame); qwUserInfo = new EvaUserInfoWidget( svMain, "qwUserInfo"); svMain->addChild( qwUserInfo ); twTabMain->insertTab( svMain, TQString("") ); //TQQShow Widget For TabWidget tabTQQShow = new TQWidget( twTabMain, "tabTQQShow" ); /////////////////////////////////////////////////////////////////////// //lblTQQShowBar = new TQLabel( tabTQQShow, "lblTQQShowBar" ); //lblTQQShowBar->setGeometry( TQRect( 0, 10, 480, 16 ) ); TQWidget* privateLayoutWidget = new TQWidget( tabTQQShow, "layout13" ); privateLayoutWidget->setGeometry( TQRect( 10, -15, 350, 290 ) ); layout13 = new TQGridLayout( privateLayoutWidget, 1, 1, 11, 6, "layout13"); lblTQQShow = new TQLabel( privateLayoutWidget, "lblTQQShow" ); lblTQQShow->setMinimumSize( TQSize( 147, 233 ) ); lblTQQShow->setMaximumSize( TQSize( 147, 233 ) ); lblTQQShow->setFrameShape( TQLabel::Box ); lblTQQShow->setPaletteBackgroundColor( TQColor( 255, 255, 255 ) ); lblTQQShow->setScaledContents( FALSE ); lblTQQShow->setAlignment( int( TQLabel::AlignCenter ) ); layout13->addWidget( lblTQQShow, 0, 0 ); spacer6 = new TQSpacerItem( 23, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); layout13->addItem( spacer6, 0, 1 ); layout12 = new TQGridLayout( 0, 1, 1, 0, 6, "layout12"); spacer5 = new TQSpacerItem( 20, 80, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); layout12->addItem( spacer5, 4, 0 ); spacer7 = new TQSpacerItem( 20, 42, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); layout12->addItem( spacer7, 6, 0 ); spacer8 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); layout12->addItem( spacer8, 0, 0 ); tbtnAlbum = new TQToolButton( privateLayoutWidget, "tbtnAlbum" ); tbtnAlbum->setPaletteForegroundColor( TQColor( 0, 0, 255 ) ); tbtnAlbum->setCursor( TQCursor( 13 ) ); tbtnAlbum->setAutoRaise( TRUE ); tbtnAlbum->setUsesTextLabel( TRUE ); tbtnAlbum->setTextPosition( TQToolButton::BesideIcon ); layout12->addWidget( tbtnAlbum, 2, 0 ); kpbUpdateShow = new KPushButton( privateLayoutWidget, "kpbUpdateShow" ); layout12->addWidget( kpbUpdateShow, 5, 0 ); tbtnShop = new TQToolButton( privateLayoutWidget, "tbtnShop" ); tbtnShop->setPaletteForegroundColor( TQColor( 0, 0, 255 ) ); tbtnShop->setCursor( TQCursor( 13 ) ); tbtnShop->setAutoRaise( TRUE ); tbtnShop->setUsesTextLabel( TRUE ); tbtnShop->setTextPosition( TQToolButton::BesideIcon ); layout12->addWidget( tbtnShop, 1, 0 ); layout13->addLayout( layout12, 0, 2 ); twTabMain->insertTab( tabTQQShow, TQString("") ); /////////////////////////////////////////////////////////////////////// //Memo Widget TabMemo = new TQWidget( twTabMain, "TabMemo" ); TabMemoLayout = new TQGridLayout( TabMemo, 1, 1, 11, 6, "TabMemoLayout"); spacer30 = new TQSpacerItem( 20, 21, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); TabMemoLayout->addItem( spacer30, 1, 0 ); spacer29 = new TQSpacerItem( 91, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); TabMemoLayout->addItem( spacer29, 0, 1 ); layout117 = new TQVBoxLayout( 0, 0, 6, "layout117"); layout100 = new TQHBoxLayout( 0, 0, 6, "layout100"); layout97 = new TQVBoxLayout( 0, 0, 6, "layout97"); lblMemoName = new TQLabel( TabMemo, "lblMemoName" ); layout97->addWidget( lblMemoName ); lblMemoMobile = new TQLabel( TabMemo, "lblMemoMobile" ); layout97->addWidget( lblMemoMobile ); lblMemoAddress = new TQLabel( TabMemo, "lblMemoAddress" ); layout97->addWidget( lblMemoAddress ); lblMemoEmail = new TQLabel( TabMemo, "lblMemoEmail" ); layout97->addWidget( lblMemoEmail ); layout100->addLayout( layout97 ); layout99 = new TQVBoxLayout( 0, 0, 6, "layout99"); layout98 = new TQHBoxLayout( 0, 0, 6, "layout98"); layout80 = new TQVBoxLayout( 0, 0, 6, "layout80"); leMemoName = new TQLineEdit( TabMemo, "leMemoName" ); leMemoName->setFrameShape( TQLineEdit::Box ); leMemoName->setFrameShadow( TQLineEdit::Plain ); leMemoName->setLineWidth( 1 ); layout80->addWidget( leMemoName ); leMemoMobile = new TQLineEdit( TabMemo, "leMemoMobile" ); leMemoMobile->setFrameShape( TQLineEdit::Box ); leMemoMobile->setFrameShadow( TQLineEdit::Plain ); leMemoMobile->setLineWidth( 1 ); layout80->addWidget( leMemoMobile ); layout98->addLayout( layout80 ); layout81 = new TQVBoxLayout( 0, 0, 6, "layout81"); lblMemoTelephone = new TQLabel( TabMemo, "lblMemoTelephone" ); layout81->addWidget( lblMemoTelephone ); lblMemoZipCode = new TQLabel( TabMemo, "lblMemoZipCode" ); layout81->addWidget( lblMemoZipCode ); layout98->addLayout( layout81 ); layout82 = new TQVBoxLayout( 0, 0, 6, "layout82"); leMemoTelephone = new TQLineEdit( TabMemo, "leMemoTelephone" ); leMemoTelephone->setFrameShape( TQLineEdit::Box ); leMemoTelephone->setFrameShadow( TQLineEdit::Plain ); leMemoTelephone->setLineWidth( 1 ); layout82->addWidget( leMemoTelephone ); leMemoZipCode = new TQLineEdit( TabMemo, "leMemoZipCode" ); leMemoZipCode->setFrameShape( TQLineEdit::Box ); leMemoZipCode->setFrameShadow( TQLineEdit::Plain ); leMemoZipCode->setLineWidth( 1 ); layout82->addWidget( leMemoZipCode ); layout98->addLayout( layout82 ); layout99->addLayout( layout98 ); layout86 = new TQVBoxLayout( 0, 0, 6, "layout86"); leMemoAddress = new TQLineEdit( TabMemo, "leMemoAddress" ); leMemoAddress->setFrameShape( TQLineEdit::Box ); leMemoAddress->setFrameShadow( TQLineEdit::Plain ); leMemoAddress->setLineWidth( 1 ); layout86->addWidget( leMemoAddress ); leMemoEmail = new TQLineEdit( TabMemo, "leMemoEmail" ); leMemoEmail->setFrameShape( TQLineEdit::Box ); leMemoEmail->setFrameShadow( TQLineEdit::Plain ); leMemoEmail->setLineWidth( 1 ); layout86->addWidget( leMemoEmail ); layout99->addLayout( layout86 ); layout100->addLayout( layout99 ); layout117->addLayout( layout100 ); layout112 = new TQHBoxLayout( 0, 0, 6, "layout112"); layout111 = new TQVBoxLayout( 0, 0, 6, "layout111"); lblMemoNote = new TQLabel( TabMemo, "lblMemoNote" ); layout111->addWidget( lblMemoNote ); spacer32 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); layout111->addItem( spacer32 ); layout112->addLayout( layout111 ); teMemoNote = new TQTextEdit( TabMemo, "teMemoNote" ); teMemoNote->setMinimumSize( TQSize( 0, 50 ) ); teMemoNote->setMaximumSize( TQSize( 32767, 50 ) ); teMemoNote->setFrameShape( TQTextEdit::Box ); teMemoNote->setFrameShadow( TQTextEdit::Plain ); teMemoNote->setLineWidth( 1 ); layout112->addWidget( teMemoNote ); layout117->addLayout( layout112 ); spacer38 = new TQSpacerItem( 20, 21, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); layout117->addItem( spacer38 ); layout116 = new TQHBoxLayout( 0, 0, 6, "layout116"); spacer34 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); layout116->addItem( spacer34 ); chbAutoUploadMemo = new TQCheckBox( TabMemo, "chbAutoUploadMemo" ); layout116->addWidget( chbAutoUploadMemo ); spacer33 = new TQSpacerItem( 61, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); layout116->addItem( spacer33 ); pbDownloadMemo = new TQPushButton( TabMemo, "pbDownloadMemo" ); layout116->addWidget( pbDownloadMemo ); layout117->addLayout( layout116 ); TabMemoLayout->addLayout( layout117, 0, 0 ); twTabMain->insertTab( TabMemo, TQString("") ); ////////////////////////////////////////////////////////////////////// languageChange(); resize( TQSize(512, 345).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); }
void WindowSelector::select() { kapp->desktop()->grabMouse( TQCursor( tqcrossCursor )); kapp->installX11EventFilter( TQT_TQWIDGET(this) ); }