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 ); }
EvaListView::EvaListView(TQWidget *parent, const char *name, WFlags f) : TQListView(parent, name, f) { setItemMargin(EVA_LV_LEFT_MARGIN); addColumn("1"); setColumnWidthMode( 0, Manual); // addColumn("2"); // setColumnWidthMode( 1, Manual); header()->hide(); setSorting(0); setRootIsDecorated( false ); setTreeStepSize( 8 ); setDragAutoScroll(true); setHScrollBarMode(TQScrollView::AlwaysOff); setFrameShape( TQFrame::NoFrame ); setAcceptDrops( true ); setSelectionMode( TQListView::Extended ); setSelectionMode(TQListView::Single); m_tooltip = new EvaLVToolTip(this); clearWFlags( WStaticContents ); setWFlags( WNoAutoErase ); static_cast<EvaListView*>(viewport())->clearWFlags( WStaticContents ); static_cast<EvaListView*>(viewport())->setWFlags( WNoAutoErase ); codec = TQTextCodec::codecForName("GB18030"); }
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(); }
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; }
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*)) ); }
/********************************************************************** * * 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*))); } }
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 ); }
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()); } }
TLFrameSequenceLayout::TLFrameSequenceLayout( QWidget *parent ) : QScrollView( parent ) { Q_CHECK_PTR( parent ); //Initializations enableClipper( true ); parent_widget = parent; setHScrollBarMode( QScrollView::AlwaysOff ); number_of_frame_sequences = 1; max_used_frames = 1; current_frame = NULL; k_toon = ( Ktoon * )( parent_widget -> parentWidget() -> parentWidget() -> parentWidget() ); //Add a default frame sequence to the default layer TLFrameSequence *default_frame_sequence = new TLFrameSequence( 1, viewport(), this ); addChild( default_frame_sequence ); connect( default_frame_sequence, SIGNAL( frameInserted() ), SLOT( slotUpdateMaxUsedFrames() ) ); connect( default_frame_sequence, SIGNAL( frameRemoved() ), SLOT( slotUpdateMaxUsedFrames() ) ); connect( default_frame_sequence, SIGNAL( keyframeRemoved( int ) ), SIGNAL( keyframeRemovedToES( int ) ) ); connect( default_frame_sequence, SIGNAL( motionTweenCreated( int ) ), SIGNAL( motionTweenCreatedToES( int ) ) ); connect( default_frame_sequence, SIGNAL( motionTweenRemoved( int ) ), SIGNAL( motionTweenRemovedToES( int ) ) ); list_of_frame_sequences.append( default_frame_sequence ); current_frame_sequence = default_frame_sequence; last_frame_sequence = default_frame_sequence; }
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 ); }
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(); }
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))); }
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);*/ }
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(); }
void QSAEditor::configChanged() { QMap<QString, ConfigStyle> styles = Config::readStyles(); config()->styles = styles; ( (QSASyntaxHighlighter*)document()->preProcessor() )->updateStyles( config()->styles ); completion->setEnabled( Config::completion() ); parenMatcher->setEnabled( Config::parenMatching() ); if ( Config::wordWrap() ) { if ( hScrollBarMode() != AlwaysOff ) { document()->setFormatter( new Q3TextFormatterBreakInWords ); setHScrollBarMode( AlwaysOff ); } } else { if ( hScrollBarMode() != AlwaysOn ) { Q3TextFormatterBreakWords *f = new Q3TextFormatterBreakWords; f->setWrapEnabled( false ); document()->setFormatter( f ); setHScrollBarMode( AlwaysOn ); } } setFont( ( (QSASyntaxHighlighter*)document()->preProcessor() )->format( 0 )->font() ); indent->setTabSize( Config::indentTabSize() ); indent->setIndentSize( Config::indentIndentSize() ); indent->setKeepTabs( Config::indentKeepTabs() ); indent->setAutoIndent( Config::indentAutoIndent() ); if ( !Config::indentAutoIndent() ) document()->setIndent( 0 ); else document()->setIndent( indent ); document()->setTabStops( ( (QSASyntaxHighlighter*)document()->preProcessor() )-> format( Q3TextPreProcessor::Standard )->width( 'x' ) * Config::indentTabSize() ); Editor::configChanged(); }
/* * ====================================================================== * MEMBER FUNCTIONS: QmvList * ====================================================================== */ QmvList::QmvList(QmvEditor * editor) : QListView(editor), editor(editor) { viewport()->setBackgroundMode( PaletteBackground ); setResizePolicy( QScrollView::Manual ); if (editor->shuttleClass()) { qDebug("qmvlist:classname=%s", editor->shuttleClass()->relationName().latin1()); addColumn( tr( editor->shuttleClass()->relationTitle() ) ); QString ctlabel; ctlabel.sprintf("%d rows",editor->shuttleClass()->count()); addColumn( tr( ctlabel) ); } else { addColumn( "No Class Selected" ); addColumn( "0 Rows" ); } tuplemenu = new QPopupMenu(this, "item menu"); tuplemenu->insertItem("Item Menu"); tuplemenu->insertSeparator(); tuplemenu->insertItem("&New", this, SLOT(itemInsert())); tuplemenu->insertItem("&Copy", this, SLOT(itemCopy())); tuplemenu->insertItem("&Delete", this, SLOT(itemRemove())); relationmenu = new QPopupMenu(this, "relation menu"); relationmenu->insertItem("Relation Menu"); relationmenu->insertSeparator(); relationmenu->insertItem("&Print", this, SLOT(printSet())); relationmenu->insertItem("&Export", this, SLOT(exportSet())); QToolTip::add( header(), "Click for codes Utilites-Menu"); connect( header(), SIGNAL( sizeChange( int, int, int ) ), this, SLOT( updateEditorSize() ) ); disconnect( header(), SIGNAL( clicked( int ) ), this, SLOT( changeSortColumn( int ) ) ); connect( this, SIGNAL( pressed( QListViewItem *, const QPoint &, int ) ), this, SLOT( itemPressed( QListViewItem *, const QPoint &, int ) ) ); connect( this, SIGNAL( rightButtonPressed( QListViewItem *, const QPoint &, int ) ), this, SLOT( itemMenu( QListViewItem *, const QPoint &, int ) ) ); connect( header(), SIGNAL( clicked( int ) ), this, SLOT( currentSetMenu() ) ); connect( this, SIGNAL( doubleClicked( QListViewItem * ) ), this, SLOT( toggleOpen( QListViewItem * ) ) ); setSorting( -1 ); setHScrollBarMode( AlwaysOff ); }
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; }
ModuleTreeView::ModuleTreeView(ConfigModuleList *list, QWidget * parent, const char * name) : KListView(parent, name) , _modules(list) { addColumn(QString::null); setColumnWidthMode (0, QListView::Maximum); setAllColumnsShowFocus(true); setResizeMode(QListView::AllColumns); setRootIsDecorated(true); setHScrollBarMode(AlwaysOff); header()->hide(); new ModuleTreeWhatsThis( this ); connect(this, SIGNAL(clicked(QListViewItem*)), this, SLOT(slotItemSelected(QListViewItem*))); }
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); } }