void PageView::slotShowScrollbars(bool status) { if (status == true) { setVScrollBarMode(QScrollView::Auto); setHScrollBarMode(QScrollView::Auto); } else { setVScrollBarMode(QScrollView::AlwaysOff); setHScrollBarMode(QScrollView::AlwaysOff); } }
CXmlPropertyList::CXmlPropertyList( CXmlPropertyEditor *e ) : PropertyList( e ), editor( e ) { init_colors(); whatsThis = new PropertyWhatsThis( this ); showSorted = FALSE; header()->setMovingEnabled( FALSE ); header()->setStretchEnabled( TRUE ); setResizePolicy( QScrollView::Manual ); viewport()->setAcceptDrops( false ); viewport()->installEventFilter( this ); addColumn( tr( "Property" ) ); addColumn( tr( "Value" ) ); connect( header(), SIGNAL( sizeChange( int, int, int ) ), this, SLOT( updateEditorSize() ) ); connect( header(), SIGNAL( sectionClicked( int ) ), this, SLOT( toggleSort() ) ); connect( this, SIGNAL( pressed( QListViewItem *, const QPoint &, int ) ), this, SLOT( itemPressed( QListViewItem *, const QPoint &, int ) ) ); connect( this, SIGNAL( doubleClicked( QListViewItem * ) ), this, SLOT( toggleOpen( QListViewItem * ) ) ); disconnect( header(), SIGNAL( sectionClicked( int ) ), this, SLOT( changeSortColumn( int ) ) ); setSorting( -1 ); setHScrollBarMode( AlwaysOff ); setVScrollBarMode( AlwaysOn ); setColumnWidthMode( 1, Manual ); mousePressed = FALSE; pressItem = 0; theLastEvent = MouseEvent; header()->installEventFilter( this ); }
void kMyMoneyDateTbl::setType(calendarType type) { if (type == WEEKLY) { m_rowCount = 8; m_colCount = 1; m_type = WEEKLY; } else if (type == QUARTERLY) { m_rowCount = 7; m_colCount = 21; m_type = QUARTERLY; } else // default to monthly { m_rowCount = m_colCount = 7; m_type = MONTHLY; } setNumRows(m_rowCount); setNumCols(m_colCount); setHScrollBarMode(AlwaysOff); setVScrollBarMode(AlwaysOff); viewportResizeEvent(NULL); }
FingerList::FingerList(TabTrack *p, QWidget *parent, const char *name) : Q3GridView(parent, name) { parm = p; setVScrollBarMode(Auto); setHScrollBarMode(AlwaysOff); setFrameStyle(Panel | Sunken); setBackgroundMode(Qt::PaletteBase); setFocusPolicy(Qt::StrongFocus); num = 0; curSel = -1; oldCol = 0; oldRow = 0; setCellWidth(ICONCHORD); setCellHeight(ICONCHORD); setMinimumSize(ICONCHORD + 2, ICONCHORD + 2); resize(width(), 3 * ICONCHORD + 2); fretNumberFont = new QFont(font()); if (fretNumberFont->pointSize() == -1) { fretNumberFont->setPixelSize((int) ((double) fretNumberFont->pixelSize() * FRET_NUMBER_FONT_FACTOR)); } else { fretNumberFont->setPointSizeFloat(fretNumberFont->pointSizeFloat() * FRET_NUMBER_FONT_FACTOR); } repaint(); }
KMultiTabBarInternal::KMultiTabBarInternal(QWidget *parent, KMultiTabBar::KMultiTabBarMode bm) : QScrollView(parent) { m_expandedTabSize = -1; m_showActiveTabTexts = false; m_tabs.setAutoDelete(true); m_barMode = bm; setHScrollBarMode(AlwaysOff); setVScrollBarMode(AlwaysOff); if(bm == KMultiTabBar::Vertical) { box = new QWidget(viewport()); mainLayout = new QVBoxLayout(box); mainLayout->setAutoAdd(true); box->setFixedWidth(24); setFixedWidth(24); } else { box = new QWidget(viewport()); mainLayout = new QHBoxLayout(box); mainLayout->setAutoAdd(true); box->setFixedHeight(24); setFixedHeight(24); } addChild(box); setFrameStyle(NoFrame); viewport()->setBackgroundMode(Qt::PaletteBackground); /* box->setPaletteBackgroundColor(Qt::red); setPaletteBackgroundColor(Qt::green);*/ }
/********************************************************************** * * KivioIconView * **********************************************************************/ KivioIconView::KivioIconView( bool _readWrite,QWidget *parent, const char *name ) : QIconView( parent, name ) { m_pSpawnerSet = NULL; m_pCurDrag = NULL; isReadWrite=_readWrite; objList.append(this); setGridX( 64 ); setGridY( 64 ); setResizeMode( Adjust ); setWordWrapIconText(true); setHScrollBarMode( AlwaysOff ); setVScrollBarMode( Auto ); setAutoArrange(true); setSorting(true); setItemsMovable(false); setArrangement(LeftToRight); setAcceptDrops(false); viewport()->setAcceptDrops(false); if(isReadWrite) { connect(this, SIGNAL(doubleClicked(QIconViewItem*)), this, SLOT(slotDoubleClicked(QIconViewItem*))); connect(this, SIGNAL(clicked(QIconViewItem*)), this, SLOT(slotClicked(QIconViewItem*))); } }
Editor::Editor( const QString &fn, QWidget *parent, const char *name ) : QTextEdit( parent, name ), hasError( FALSE ) { document()->setFormatter( new QTextFormatterBreakInWords ); if ( !fn.isEmpty() ) load( fn ); setHScrollBarMode( QScrollView::AlwaysOff ); setVScrollBarMode( QScrollView::AlwaysOn ); document()->setUseFormatCollection( FALSE ); parenMatcher = new ParenMatcher; connect( this, SIGNAL( cursorPositionChanged( QTextCursor * ) ), this, SLOT( cursorPosChanged( QTextCursor * ) ) ); cfg = new Config; document()->addSelection( Error ); document()->addSelection( Step ); document()->setSelectionColor( Error, red ); document()->setSelectionColor( Step, yellow ); document()->setInvertSelectionText( Error, FALSE ); document()->setInvertSelectionText( Step, FALSE ); document()->addSelection( ParenMatcher::Match ); document()->addSelection( ParenMatcher::Mismatch ); document()->setSelectionColor( ParenMatcher::Match, QColor( 204, 232, 195 ) ); document()->setSelectionColor( ParenMatcher::Mismatch, Qt::magenta ); document()->setInvertSelectionText( ParenMatcher::Match, FALSE ); document()->setInvertSelectionText( ParenMatcher::Mismatch, FALSE ); accelComment = new QAccel( this ); accelComment->connectItem( accelComment->insertItem( ALT + Key_C ), this, SLOT( commentSelection() ) ); accelUncomment = new QAccel( this ); accelUncomment->connectItem( accelUncomment->insertItem( ALT + Key_U ), this, SLOT( uncommentSelection() ) ); editable = TRUE; }
HierarchyList::HierarchyList( QWidget *parent, FormWindow *fw, bool doConnects ) : QListView( parent ), formWindow( fw ) { init_colors(); setDefaultRenameAction( Accept ); header()->setMovingEnabled( false ); header()->setStretchEnabled( true ); normalMenu = 0; tabWidgetMenu = 0; addColumn( i18n("Name" ) ); addColumn( i18n("Class" ) ); QPalette p( palette() ); p.setColor( QColorGroup::Base, QColor( *backColor2 ) ); (void)*selectedBack; // hack setPalette( p ); disconnect( header(), SIGNAL( sectionClicked( int ) ), this, SLOT( changeSortColumn( int ) ) ); setSorting( -1 ); setHScrollBarMode( AlwaysOff ); setVScrollBarMode( AlwaysOn ); if ( doConnects ) { connect( this, SIGNAL( clicked( QListViewItem * ) ), this, SLOT( objectClicked( QListViewItem * ) ) ); connect( this, SIGNAL( returnPressed( QListViewItem * ) ), this, SLOT( objectClicked( QListViewItem * ) ) ); connect( this, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint&, int ) ), this, SLOT( showRMBMenu( QListViewItem *, const QPoint & ) ) ); } deselect = true; setColumnWidthMode( 1, Manual ); }
FingerList::FingerList(TabTrack *p, QWidget *parent, const char *name): #if QT_VERSION < 300 QTableView(parent, name) #else QGridView(parent, name) #endif { parm = p; #if QT_VERSION < 300 setTableFlags(Tbl_autoVScrollBar | Tbl_smoothScrolling); #else setVScrollBarMode(QScrollView::Auto); #endif setFrameStyle(Panel | Sunken); setBackgroundMode(PaletteBase); setFocusPolicy(StrongFocus); num = 0; curSel = -1; oldCol = 0; oldRow = 0; setCellWidth(ICONCHORD); setCellHeight(ICONCHORD); setMinimumSize(ICONCHORD + 2, ICONCHORD + 2); resize(width(), 3 * ICONCHORD + 2); repaint(); }
OCompletionBox::OCompletionBox( QWidget *parent, const char *name ) :OListBox( parent, name, WType_Popup ) { d = new OCompletionBoxPrivate; d->m_parent = parent; d->tabHandling = true; d->down_workaround = false; setColumnMode( 1 ); setLineWidth( 1 ); setFrameStyle( QFrame::Box | QFrame::Plain ); if ( parent ) setFocusProxy( parent ); else setFocusPolicy( NoFocus ); setVScrollBarMode( Auto ); setHScrollBarMode( AlwaysOff ); connect( this, SIGNAL( doubleClicked(QListBoxItem*)), SLOT( slotActivated(QListBoxItem*)) ); // grmbl, just QListBox workarounds :[ Thanks Volker. connect( this, SIGNAL( currentChanged(QListBoxItem*)), SLOT( slotCurrentChanged() )); connect( this, SIGNAL( clicked(QListBoxItem*)), SLOT( slotItemClicked(QListBoxItem*)) ); }
CardView::CardView( QWidget *parent, const char *name ) : Q3ScrollView( parent, name ), d( new CardViewPrivate() ) { d->mItemList.setAutoDelete( true ); d->mSeparatorList.setAutoDelete( true ); QFont f = font(); d->mFm = new QFontMetrics( f ); f.setBold( true ); d->mHeaderFont = f; d->mBFm = new QFontMetrics( f ); d->mTip = new CardViewTip( viewport() ); d->mTip->hide(); d->mTimer = new QTimer( this ); d->mTimer->setObjectName( "mouseTimer" ); viewport()->setMouseTracking( true ); viewport()->setFocusProxy( this ); viewport()->setFocusPolicy( Qt::WheelFocus ); viewport()->setBackgroundRole( QPalette::Base ); connect( d->mTimer, SIGNAL( timeout() ), this, SLOT( tryShowFullText() ) ); setBackgroundRole( QPalette::Background ); // no reason for a vertical scrollbar setVScrollBarMode( AlwaysOff ); }
void TextShow::resizeEvent(QResizeEvent *e) { #ifdef WIN32 if (inResize()){ if (!m_timer->isActive()){ setHScrollBarMode(AlwaysOff); setVScrollBarMode(AlwaysOff); m_timer->start(100); } return; } #endif QPoint p = QPoint(0, height()); p = mapToGlobal(p); p = viewport()->mapFromGlobal(p); int x, y; viewportToContents(p.x(), p.y(), x, y); int para; int pos = charAt(QPoint(x, y), ¶); QTextEdit::resizeEvent(e); if (pos == -1){ scrollToBottom(); }else{ setCursorPosition(para, pos); ensureCursorVisible(); } sync(); viewport()->repaint(); }
Workspace::Workspace( QWidget *parent, MainWindow *mw ) : QListView( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_Tool | WStyle_MinMax | WStyle_SysMenu ), mainWindow( mw ), project( 0 ), completionDirty( FALSE ) { init_colors(); setDefaultRenameAction( Accept ); blockNewForms = FALSE; bufferEdit = 0; header()->setStretchEnabled( TRUE ); header()->hide(); setSorting( 0 ); setResizePolicy( QScrollView::Manual ); #ifndef Q_WS_MAC QPalette p( palette() ); p.setColor( QColorGroup::Base, QColor( *backColor2 ) ); (void)*selectedBack; // hack setPalette( p ); #endif addColumn( tr( "Files" ) ); setAllColumnsShowFocus( TRUE ); connect( this, SIGNAL( mouseButtonClicked( int, QListViewItem *, const QPoint &, int ) ), this, SLOT( itemClicked( int, QListViewItem *, const QPoint& ) ) ), connect( this, SIGNAL( doubleClicked( QListViewItem * ) ), this, SLOT( itemDoubleClicked( QListViewItem * ) ) ), connect( this, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint &, int ) ), this, SLOT( rmbClicked( QListViewItem *, const QPoint& ) ) ), setHScrollBarMode( AlwaysOff ); setVScrollBarMode( AlwaysOn ); viewport()->setAcceptDrops( TRUE ); setAcceptDrops( TRUE ); setColumnWidthMode( 1, Manual ); }
KDateInternalMonthPicker::KDateInternalMonthPicker (int fontsize, QWidget* parent, const char* name) : QGridView(parent, name), result(0) // invalid { QRect rect; QFont font; // ----- activeCol = -1; activeRow = -1; font=KGlobalSettings::generalFont(); font.setPointSize(fontsize); setFont(font); setHScrollBarMode(AlwaysOff); setVScrollBarMode(AlwaysOff); setFrameStyle(QFrame::NoFrame); setNumRows(4); setNumCols(3); // enable to find drawing failures: // setTableFlags(Tbl_clipCellPainting); #if 0 viewport()->setEraseColor(lightGray); // for consistency with the datepicker #endif // ----- find the preferred size // (this is slow, possibly, but unfortunatly it is needed here): QFontMetrics metrics(font); for(int i=1; i <= 12; ++i) { rect=metrics.boundingRect(KGlobal::locale()->monthName(i, false)); if(max.width()<rect.width()) max.setWidth(rect.width()); if(max.height()<rect.height()) max.setHeight(rect.height()); } }
PageView::PageView( QWidget* parent, const char* name ) : QScrollView( parent, name, WStaticContents | WNoAutoErase) { moveTool = true; widgetList = 0; viewport()->setFocusPolicy(QWidget::StrongFocus); setResizePolicy(QScrollView::Manual); setVScrollBarMode(QScrollView::Auto); setHScrollBarMode(QScrollView::Auto); viewport()->setBackgroundMode(Qt::NoBackground); setResizePolicy(Manual); setDragAutoScroll(false); enableClipper(true); nrCols = 1; nrRows = 1; continuousViewmode = true; fullScreen = false; connect(this, SIGNAL(contentsMoving(int, int)), this, SLOT(calculateCurrentPageNumber(int, int))); }
void CGUIPanel::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) { IGUIElement::deserializeAttributes(in, options); setBorder(in->getAttributeAsBool("border")); setHScrollBarMode((E_SCROLL_BAR_MODE)in->getAttributeAsEnumeration("horizontalScrollBar", GUIScrollBarModeNames)); setVScrollBarMode((E_SCROLL_BAR_MODE)in->getAttributeAsEnumeration("verticalScrollBar", GUIScrollBarModeNames)); }
TopicEdit::TopicEdit(QWidget * parent, QString name):QTextEdit(parent, name) { setVScrollBarMode(QScrollView::AlwaysOff); setHScrollBarMode(QScrollView::AlwaysOff); setFocusPolicy(QWidget::WheelFocus); setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); setWordWrap(QTextEdit::NoWrap); }
ReportCanvasView::ReportCanvasView(ReportWindow * rw, QWidget * parent, const char * name) : Q3CanvasView(parent, name) { //qDebug("ReportCanvasView::ReportCanvasView(QWidget*,const char*)"); _rw = rw; viewport()->setMouseTracking(TRUE); setVScrollBarMode(AlwaysOff); setHScrollBarMode(AlwaysOff); }
void TextShow::slotResizeTimer() { #ifdef WIN32 if (inResize()) return; m_timer->stop(); setVScrollBarMode(Auto); setHScrollBarMode(Auto); QResizeEvent re(QSize(0, 0), size()); resizeEvent(&re); #endif }
int Q3ScrollView::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = Q3Frame::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 23) qt_static_metacall(this, _c, _id, _a); _id -= 23; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< ResizePolicy*>(_v) = resizePolicy(); break; case 1: *reinterpret_cast< ScrollBarMode*>(_v) = vScrollBarMode(); break; case 2: *reinterpret_cast< ScrollBarMode*>(_v) = hScrollBarMode(); break; case 3: *reinterpret_cast< int*>(_v) = visibleWidth(); break; case 4: *reinterpret_cast< int*>(_v) = visibleHeight(); break; case 5: *reinterpret_cast< int*>(_v) = contentsWidth(); break; case 6: *reinterpret_cast< int*>(_v) = contentsHeight(); break; case 7: *reinterpret_cast< int*>(_v) = contentsX(); break; case 8: *reinterpret_cast< int*>(_v) = contentsY(); break; case 9: *reinterpret_cast< bool*>(_v) = dragAutoScroll(); break; } _id -= 10; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setResizePolicy(*reinterpret_cast< ResizePolicy*>(_v)); break; case 1: setVScrollBarMode(*reinterpret_cast< ScrollBarMode*>(_v)); break; case 2: setHScrollBarMode(*reinterpret_cast< ScrollBarMode*>(_v)); break; case 9: setDragAutoScroll(*reinterpret_cast< bool*>(_v)); break; } _id -= 10; } else if (_c == QMetaObject::ResetProperty) { _id -= 10; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 10; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 10; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 10; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 10; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 10; } #endif // QT_NO_PROPERTIES return _id; }
QSAEditor::QSAEditor( const QString &fn, QWidget *parent, const char *name ) : Editor( fn, parent, name ), debugging( false ) { if ( !fn.isEmpty() ) load( fn ); document()->setPreProcessor( new QSASyntaxHighlighter ); document()->setIndent( (indent = new CIndent) ); setHScrollBarMode( Q3ScrollView::AlwaysOff ); setVScrollBarMode( Q3ScrollView::AlwaysOn ); completion = new QSACompletion( this ); browser = new QSAEditorBrowser( this ); configChanged(); }
QtFileIconView::QtFileIconView( const QString &dir, QWidget *parent, const char *name ) : QIconView( parent, name ), viewDir( dir ), newFolderNum( 0 ) { if ( !iconFolderLockedLarge ) { qAddPostRoutine( cleanup ); QWMatrix m; m.scale( 0.6, 0.6 ); QPixmap iconpix( folder_locked_icon ); iconFolderLockedLarge = new QPixmap( folder_locked_icon ); iconpix = iconpix.xForm( m ); iconFolderLockedSmall = new QPixmap( iconpix ); iconpix = QPixmap( folder_icon ); iconFolderLarge = new QPixmap( folder_icon ); iconpix = iconpix.xForm( m ); iconFolderSmall = new QPixmap( iconpix ); iconpix = QPixmap( file_icon ); iconFileLarge = new QPixmap( file_icon ); iconpix = iconpix.xForm( m ); iconFileSmall = new QPixmap( iconpix ); iconpix = QPixmap( link_icon ); iconLinkLarge = new QPixmap( link_icon ); iconpix = iconpix.xForm( m ); iconLinkSmall = new QPixmap( iconpix ); } vm = Large; setGridX( 75 ); setResizeMode( Adjust ); setWordWrapIconText( FALSE ); connect( this, SIGNAL( doubleClicked( QIconViewItem * ) ), this, SLOT( itemDoubleClicked( QIconViewItem * ) ) ); connect( this, SIGNAL( returnPressed( QIconViewItem * ) ), this, SLOT( itemDoubleClicked( QIconViewItem * ) ) ); connect( this, SIGNAL( dropped( QDropEvent *, const QValueList<QIconDragItem> & ) ), this, SLOT( slotDropped( QDropEvent *, const QValueList<QIconDragItem> & ) ) ); connect( this, SIGNAL( contextMenuRequested( QIconViewItem *, const QPoint & ) ), this, SLOT( slotRightPressed( QIconViewItem * ) ) ); setHScrollBarMode( AlwaysOff ); setVScrollBarMode( Auto ); setAutoArrange( TRUE ); setSorting( TRUE ); openItem = 0; }
KWidgetListbox::KWidgetListbox(QWidget *parent, const char *name) : QTable(parent, name) { setNumRows(0); setNumCols(1); setColumnStretchable(0, true); setLeftMargin(0); setTopMargin(0); horizontalHeader()->hide(); verticalHeader()->hide(); setSelectionMode(QTable::NoSelection); setFocusStyle(QTable::FollowStyle); connect(this, SIGNAL(currentChanged(int, int)), this, SLOT(selectionChanged(int, int))); setHScrollBarMode(QScrollView::AlwaysOff); setVScrollBarMode(QScrollView::Auto); }
Editor::Editor( QWidget* parent, const char* name ): QTextEdit( parent, name ) { d = new Private; d->eval = 0; d->index = 0; d->autoCompleteEnabled = true; d->completion = new EditorCompletion( this ); d->completionTimer = new QTimer( this ); d->autoCalcEnabled = true; d->syntaxHighlightEnabled = true; d->highlighter = new EditorHighlighter( this ); d->autoCalcTimer = new QTimer( this ); d->matchingTimer = new QTimer( this ); setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); setWordWrap( NoWrap ); setHScrollBarMode( AlwaysOff ); setVScrollBarMode( AlwaysOff ); setTextFormat( PlainText ); setAutoFormatting( AutoNone ); setTabChangesFocus( true ); setLinkUnderline( false ); connect( d->completion, SIGNAL( selectedCompletion( const QString& ) ), SLOT( autoComplete( const QString& ) ) ); connect( this, SIGNAL( textChanged() ), SLOT( checkAutoComplete() ) ); connect( d->completionTimer, SIGNAL( timeout() ), SLOT( triggerAutoComplete() ) ); connect( this, SIGNAL( textChanged() ), SLOT( checkMatching() ) ); connect( d->matchingTimer, SIGNAL( timeout() ), SLOT( doMatchingLeft() ) ); connect( d->matchingTimer, SIGNAL( timeout() ), SLOT( doMatchingRight() ) ); connect( this, SIGNAL( textChanged() ), SLOT( checkAutoCalc() ) ); connect( d->autoCalcTimer, SIGNAL( timeout() ), SLOT( autoCalc() ) ); d->autoCalcLabel = new CalcResultLabel( 0, "autocalc", WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM ); d->autoCalcLabel->setFrameStyle( QFrame::Plain | QFrame::Box ); d->autoCalcLabel->setPalette( QToolTip::palette() ); d->autoCalcLabel->hide(); setHighlightColor( Number, QColor(0,0,127) ); setHighlightColor( FunctionName, QColor(85,0,0) ); setHighlightColor( Variable, QColor(0,85,0) ); setHighlightColor( MatchedPar, QColor(255,255,183) ); }
KDateTable::KDateTable(QWidget *parent, QDate date_, const char* name, WFlags f) : QGridView(parent, name, f) { setFontSize(10); if(!date_.isValid()) { kdDebug() << "KDateTable ctor: WARNING: Given date is invalid, using current date." << endl; date_=QDate::currentDate(); } setFocusPolicy( QWidget::StrongFocus ); setNumRows(7); // 6 weeks max + headline setNumCols(7); // 7 days a week setHScrollBarMode(AlwaysOff); setVScrollBarMode(AlwaysOff); #if 0 viewport()->setEraseColor(lightGray); #endif setDate(date_); // this initializes firstday, numdays, numDaysPrevMonth }
UserListBase::UserListBase(QWidget *parent) : ListView(parent) { m_bInit = false; m_bDirty = false; m_groupMode = 1; m_bShowOnline = false; header()->hide(); addColumn("", -1); setHScrollBarMode(AlwaysOff); setVScrollBarMode(Auto); setSorting(0); updTimer = new QTimer(this); connect(updTimer, SIGNAL(timeout()), this, SLOT(drawUpdates())); setExpandingColumn(0); }
void PageView::setFullScreenMode(bool fullScreen) { this -> fullScreen = fullScreen; if (fullScreen == true) { setVScrollBarMode(QScrollView::AlwaysOff); setHScrollBarMode(QScrollView::AlwaysOff); oldFrameStyle = frameStyle(); setFrameStyle(QFrame::NoFrame); backgroundColor = viewport()->paletteBackgroundColor(); if (singlePageFullScreenMode()) { viewport()->setPaletteBackgroundColor( Qt::black ) ; } } else { viewport()->setPaletteBackgroundColor( backgroundColor ) ; setFrameStyle(oldFrameStyle); } }
KColorCells::KColorCells( TQWidget *parent, int rows, int cols ) : TQGridView( parent ) { shade = true; setNumRows( rows ); setNumCols( cols ); colors = new TQColor [ rows * cols ]; for ( int i = 0; i < rows * cols; i++ ) colors[i] = TQColor(); selected = 0; inMouse = false; // Drag'n'Drop setAcceptDrops( true); setHScrollBarMode( AlwaysOff ); setVScrollBarMode( AlwaysOff ); viewport()->setBackgroundMode( PaletteBackground ); setBackgroundMode( PaletteBackground ); }
xQGanttListView::xQGanttListView(KGanttItem* toplevelitem, QWidget* parent, const char * name, WFlags f) : QScrollView(parent,name,f) ///////////////////////////////////////////////////////// { _toplevelitem = toplevelitem; setFrameStyle(QFrame::Sunken); setLineWidth(1); _headerBackBrush = QBrush(QColor(230,230,230)); setMargins( 1, TOPMARGIN , 1, 1 ); setVScrollBarMode( AlwaysOff ); _viewport = new xQGanttListViewPort(toplevelitem,viewport()); addChild(_viewport); viewport()->setBackgroundColor(QColor(white)); }
UIListView::UIListView(QWidget *parent, const char *name ) :QListView(parent,name) { setTreeStepSize( 25 ); setRootIsDecorated( true ); setAllColumnsShowFocus( true ); setShowSortIndicator( true ); setVScrollBarMode( AlwaysOn ); setHScrollBarMode( AlwaysOff ); connect( this, SIGNAL(doubleClicked(QListViewItem *)), this, SIGNAL(executed(QListViewItem *)) ); connect( this, SIGNAL(returnPressed(QListViewItem *)), this, SIGNAL(executed(QListViewItem *)) ); connect( this, SIGNAL(rightButtonClicked(QListViewItem *, const QPoint &, int)), this, SIGNAL(contextMenu(QListViewItem *, const QPoint &)) ); // // items // m_data.setAutoDelete( true ); }