kompare
komparelistview.cpp
Go to the documentation of this file.
229 return verticalScrollBar()->maximum() + viewport()->height() - style()->pixelMetric( QStyle::PM_ScrollBarExtent );
319 kDebug(8104) << "KompareListView::setSelectedDifference(" << diff << ", " << scroll << ")" << endl;
364 kDebug(8104) << "KompareListView::slotSetSelection( const DiffModel* model, const Difference* diff )" << endl;
483 QHash<const Diff2::Difference*, KompareListViewDiffItem*>::ConstIterator it = m_itemDict.constBegin();
484 QHash<const Diff2::Difference*, KompareListViewDiffItem*>::ConstIterator end = m_itemDict.constEnd();
522 void KompareListViewItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const
528 KompareListViewItem* item = static_cast<KompareListViewItem*>( static_cast<KompareListView*>( parent() )->itemFromIndex( index ) );
532 QSize KompareListViewItemDelegate::sizeHint( const QStyleOptionViewItem& option, const QModelIndex& index ) const
534 KompareListViewItem* item = static_cast<KompareListViewItem*>( static_cast<KompareListView*>( parent() )->itemFromIndex( index ) );
549 KompareListViewItem::KompareListViewItem( KompareListView* parent, KompareListViewItem* after, int type )
568 KompareListViewItem::KompareListViewItem( KompareListViewItem* parent, KompareListViewItem* /*after*/, int type )
613 void KompareListViewItem::paintCell( QPainter* p, const QStyleOptionViewItem& option, int column )
625 KompareListViewDiffItem::KompareListViewDiffItem( KompareListView* parent, Difference* difference )
634 KompareListViewDiffItem::KompareListViewDiffItem( KompareListView* parent, KompareListViewItem* after, Difference* difference )
680 KompareListViewLineContainerItem::KompareListViewLineContainerItem( KompareListViewDiffItem* parent, bool isSource )
729 KompareListViewLineItem::KompareListViewLineItem( KompareListViewLineContainerItem* parent, int line, DifferenceString* text )
735 KompareListViewLineItem::KompareListViewLineItem( KompareListViewLineContainerItem* parent, int line, DifferenceString* text, int type )
754 void KompareListViewLineItem::paintCell( QPainter* p, const QStyleOptionViewItem& option, int column )
805 void KompareListViewLineItem::paintText( QPainter* p, const QColor& bg, int column, int width, int align )
869 textChunk = m_text->string().mid( prevValue, qMax( 1, m_text->string().length() - prevValue ) );
906 KompareListViewBlankLineItem::KompareListViewBlankLineItem( KompareListViewLineContainerItem* parent )
912 void KompareListViewBlankLineItem::paintText( QPainter* p, const QColor& bg, int column, int width, int /* align */ )
921 KompareListViewHunkItem::KompareListViewHunkItem( KompareListView* parent, DiffHunk* hunk, bool zeroHeight )
930 KompareListViewHunkItem::KompareListViewHunkItem( KompareListView* parent, KompareListViewItem* after, DiffHunk* hunk, bool zeroHeight )
955 void KompareListViewHunkItem::paintCell( QPainter* p, const QStyleOptionViewItem& option, int column )
965 p->fillRect( x, y, width, paintHeight(), QColor( Qt::lightGray ) ); // Hunk headers should be lightgray
QObject * child(const char *objName, const char *inheritsClass, bool recursiveSearch) const
KompareListView(bool isSource, ViewSettings *settings, QWidget *parent, const char *name=0)
Definition: komparelistview.cpp:103
friend class KompareListViewItemDelegate
Definition: komparelistview.h:51
QFrame(QWidget *parent, QFlags< Qt::WindowType > f)
virtual void paintCell(QPainter *p, const QStyleOptionViewItem &option, int column)
Definition: komparelistview.cpp:613
void clear()
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
Diff2::Difference * difference()
Definition: komparelistview.h:185
virtual void paintText(QPainter *p, const QColor &bg, int column, int width, int align)
Definition: komparelistview.cpp:912
iterator insert(const Key &key, const T &value)
int lastVisibleDifference()
Definition: komparelistview.cpp:163
int width() const
void fillRect(const QRectF &rectangle, const QBrush &brush)
virtual ~KompareListViewItemDelegate()
Definition: komparelistview.cpp:518
void setRenderHint(RenderHint hint, bool on)
virtual void mouseDoubleClickEvent(QMouseEvent *)
Definition: komparelistview.cpp:443
Definition: komparelistview.h:222
QTreeWidgetItem * child(int index) const
void setFrameShape(Shape)
void setFocusPolicy(Qt::FocusPolicy policy)
const QFont & font() const
QStyle * style() const
virtual int pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const =0
KompareListViewDiffItem * diffItemParent() const
Definition: komparelistview.cpp:706
void differenceClicked(const Diff2::Difference *diff)
KompareListViewItem * itemAtIndex(int i)
Definition: komparelistview.cpp:136
int y() const
void slotApplyDifference(bool apply)
Definition: komparelistview.cpp:473
QWidget * viewport() const
Definition: komparelistview.h:47
int height() const
QTreeWidgetItem * itemBelow(const QTreeWidgetItem *item) const
virtual void resizeEvent(QResizeEvent *event)
void setVerticalScrollMode(ScrollMode mode)
virtual int maxHeight()=0
void setFrameStyle(int style)
void drawLine(const QLineF &line)
typedef Alignment
KompareListView * kompareListView() const
Definition: komparelistview.cpp:608
Definition: komparelistview.h:255
void update()
QColor dark(int factor) const
void clear()
int indexOf(const T &value, int from) const
KompareListViewLineContainerItem(KompareListViewDiffItem *parent, bool isSource)
Definition: komparelistview.cpp:680
width
void setBold(bool enable)
void resetTransform()
virtual int horizontalOffset() const
void setSelectedDifference(const Diff2::Difference *diff, bool scroll)
Definition: komparelistview.cpp:317
void setFlags(QFlags< Qt::ItemFlag > flags)
int columnWidth(int column) const
void setFont(const QFont &font)
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
QString number(int n, int base)
void append(const T &value)
void ignore()
virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
Definition: komparelistview.cpp:532
void slotSetModel(const Diff2::DiffModel *model)
Definition: komparelistview.cpp:83
const_iterator constEnd() const
int x() const
int top() const
void resizeColumnToContents(int column)
void setUpdatesEnabled(bool enable)
void setPen(const QColor &color)
Definition: komparelistview.h:167
KompareListViewDiffItem * diffItemParent() const
Definition: komparelistview.cpp:900
void setHorizontalScrollBarPolicy(Qt::ScrollBarPolicy)
void setObjectName(const QString &name)
void setFocusProxy(QWidget *w)
KompareListViewItem(KompareListView *parent, int type)
Definition: komparelistview.cpp:539
void setItemDelegate(QAbstractItemDelegate *delegate)
QFont font(int column) const
QTreeWidgetItem * itemAt(const QPoint &p) const
QPoint pos() const
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
Definition: komparelistview.cpp:522
bool isHidden() const
virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
void setNextPaintOffset(int offset)
Definition: komparelistview.cpp:262
void drawText(const QPointF &position, const QString &text)
~KompareListViewLineItem()
Definition: komparelistview.cpp:741
void setText(const QString &)
void setAllColumnsShowFocus(bool enable)
QTreeWidgetItem * currentItem() const
Definition: komparesplitter.h:40
QScrollBar * verticalScrollBar() const
void setIndentation(int i)
QTreeWidget * treeWidget() const
void setMargin(int margin)
void setColumnCount(int columns)
void setSizePolicy(QSizePolicy)
QRect rect() const
KompareListViewHunkItem(KompareListView *parent, Diff2::DiffHunk *hunk, bool zeroHeight=false)
void setHidden(bool hide)
void clear()
const T value(const Key &key) const
virtual void paintCell(QPainter *p, const QStyleOptionViewItem &option, int column)
Definition: komparelistview.cpp:955
void setFont(const QFont &)
void setValue(int)
void applyDifference(bool apply)
int width(const QString &text, int len) const
void slotSetSelection(const Diff2::DiffModel *model, const Diff2::Difference *diff)
Definition: komparelistview.h:167
KompareListViewBlankLineItem(KompareListViewLineContainerItem *parent)
Definition: komparelistview.cpp:906
QTreeWidgetItem * parent() const
void setFrameShadow(Shadow)
QTreeWidgetItem * itemAbove(const QTreeWidgetItem *item) const
void setCurrentItem(QTreeWidgetItem *item)
virtual void wheelEvent(QWheelEvent *e)
Definition: komparelistview.cpp:502
QString & replace(int position, int n, QChar after)
const_iterator constBegin() const
QColor colorForDifferenceType(int type, bool selected=false, bool applied=false)
Definition: viewsettings.cpp:77
void setExpanded(bool expand)
virtual void paintCell(QPainter *p, const QStyleOptionViewItem &option, int column)
Definition: komparelistview.cpp:754
~KompareListViewHunkItem()
Definition: komparelistview.cpp:939
Qt::ItemFlags flags() const
QFontMetrics fontMetrics() const
Definition: komparelistview.h:167
QRect visualItemRect(const QTreeWidgetItem *item) const
void setHeaderHidden(bool hide)
void setFixedHeight(int h)
Definition: komparelistview.h:167
QFontMetrics fontMetrics() const
Definition: viewsettings.h:29
QWidget * parentWidget() const
virtual int verticalOffset() const
int height() const
Definition: komparelistview.h:176
virtual void paintText(QPainter *p, const QColor &bg, int column, int width, int align)
Definition: komparelistview.cpp:805
void setText(int column, const QString &text)
~KompareListViewDiffItem()
Definition: komparelistview.cpp:643
int column() const
int length() const
void translate(const QPointF &offset)
virtual void mousePressEvent(QMouseEvent *e)
Definition: komparelistview.cpp:434
QScrollBar * horizontalScrollBar() const
~KompareListViewLineContainerItem()
Definition: komparelistview.cpp:702
int type() const
int firstVisibleDifference()
Definition: komparelistview.cpp:141
QTreeWidgetItem * topLevelItem(int index) const
const QPoint & pos() const
Definition: komparelistview.h:145
QAbstractItemModel * model() const
KompareListViewDiffItem(KompareListView *parent, Diff2::Difference *difference)
void slotApplyAllDifferences(bool apply)
Definition: komparelistview.cpp:481
KompareListViewLineItem(KompareListViewLineContainerItem *parent, int line, Diff2::DifferenceString *text)
void setRootIsDecorated(bool show)
int topLevelItemCount() const
maximum
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QObject * parent() const
virtual void resizeEvent(QResizeEvent *e)
Definition: komparelistview.cpp:507
int childCount() const
KompareListViewItemDelegate(QObject *parent)
Definition: komparelistview.cpp:513
void setVerticalScrollBarPolicy(Qt::ScrollBarPolicy)
void resized()
KompareListViewFrame(bool isSource, ViewSettings *settings, KompareSplitter *parent, const char *name=0)
Definition: komparelistview.cpp:52
QRect united(const QRect &rectangle) const
QString text(int column) const
void applyDifference(bool apply)
Definition: komparelistview.cpp:665
void setMargin(int)
void setSpacing(int spacing)
height
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.