KDE3Support
k3listview.cpp
Go to the documentation of this file.
122 connect(editor, SIGNAL(done(Q3ListViewItem*,int)), listview, SLOT(doneEditing(Q3ListViewItem*,int)));
303 (column = nextCol(p, (pi = (forward ? pi->nextSibling() : prevItem(pi))), restart, dir)) != -1 ||
391 if (focusEv->reason() != Qt::PopupFocusReason && focusEv->reason() != Qt::ActiveWindowFocusReason)
437 connect( KGlobalSettings::self(), SIGNAL(settingsChanged(int)), SLOT(slotSettingsChanged(int)) );
459 d->alternateBackground = KColorScheme(QPalette::Active, KColorScheme::View).background(KColorScheme::AlternateBackground).color();
747 d->alternateBackground=KColorScheme(QPalette::Active, KColorScheme::View).background(KColorScheme::AlternateBackground).color();
754 if( (selectionModeExt() == Extended) && (e->modifiers() & Qt::ShiftModifier) && !(e->modifiers() & Qt::ControlModifier) )
894 void K3ListView::slotMouseButtonClicked( int btn, Q3ListViewItem *item, const QPoint &pos, int c )
1334 insertmarker.setLeft( treeStepSize() * ( level + (rootIsDecorated() ? 1 : 0) ) + itemMargin() );
2197 : Q3ListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8)
2205 : Q3ListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8)
2345 void K3ListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment)
void done(Q3ListViewItem *, int)
virtual void insertItem(Q3ListViewItem *i)
virtual void selectAll(bool select)
SelectionMode selectionMode() const
void saveLayout(KConfig *config, const QString &group) const
Saves the list view's layout (column widtsh, column order, sort column) to a KConfig group...
Definition: k3listview.cpp:2016
void emitContextMenu(Q3ListViewItem *, const QPoint &, int)
Emit the contextMenu signal.
Definition: k3listview.cpp:1899
void setBottom(int y)
virtual void setDropVisualizer(bool b)
Enable/Disable the drawing of a drop-visualizer (a bar that shows where a dropped item would be inser...
Definition: k3listview.cpp:1210
QWidget * source() const
virtual void takeItem(Q3ListViewItem *i)
Reimplemented for internal reasons.
Definition: k3listview.cpp:2122
virtual QString text(int column) const
virtual void viewportResizeEvent(QResizeEvent *e)
Qt::KeyboardModifiers modifiers() const
void cleanDropVisualizer()
Repaint the rect where I was drawing the drop line.
Definition: k3listview.cpp:1035
virtual void keyPressEvent(QKeyEvent *)
Reimplemented for internal reasons.
Definition: k3listview.cpp:1464
Type type() const
const QPalette & palette() const
Q3ListViewItem * nextSibling() const
const QColor & backgroundColor()
returns the background color for this item
Definition: k3listview.cpp:2238
virtual void focusOutEvent(QFocusEvent *e)
void selectNextCell(Q3ListViewItem *pi, int column, bool forward)
Definition: k3listview.cpp:282
Q3ListViewItem * parent() const
int width() const
QBrush background(BackgroundRole=NormalBackground) const
bool fullWidth() const
Returns whether the last column is set to fit the available width.
void unsetCursor()
void fillRect(const QRectF &rectangle, const QBrush &brush)
Qt::KeyboardModifiers keyboardModifiers()
virtual void removeColumn(int index)
int childCount() const
QColor light(int factor) const
bool dragEnabled() const
int tooltipColumn() const
virtual const QPixmap * pixmap(int column) const
void setColor(ColorGroup group, ColorRole role, const QColor &color)
virtual int width(const QFontMetrics &fm, const Q3ListView *lv, int c) const
bool isVisible() const
virtual bool showTooltip(Q3ListViewItem *item, const QPoint &pos, int column) const
Definition: k3listview.cpp:1434
QString text() const
static bool singleClick()
const QRegion & region() const
type * first()
void moveItem(Q3ListViewItem *item, Q3ListViewItem *parent, Q3ListViewItem *after)
Arbitrarily move item to parent, positioned immediately after item after.
Definition: k3listview.cpp:1252
int timeout
virtual void focusOutEvent(QFocusEvent *)
Definition: k3listview.cpp:387
columns
SelectionModeExt selectionModeExt() const
Definition: k3listview.cpp:1847
int mapToIndex(int section) const
QStyle * style() const
void menuShortCutPressed(K3ListView *list, Q3ListViewItem *item)
This signal is emitted when the shortcut key for popup-menus is pressed.
virtual void setDragEnabled(bool b)
Enable/Disable the dragging of items.
Definition: k3listview.cpp:1185
Definition: k3listview.h:111
const QColor & alternateBackground() const
const QColor & color(ColorGroup group, ColorRole role) const
virtual void contentsContextMenuEvent(QContextMenuEvent *)
Reimplemented for internal reasons.
Definition: k3listview.cpp:1287
bool dropVisualizer() const
bool isExpandable() const
void contentsToViewport(int x, int y, int &vx, int &vy) const
virtual void takeItem(Q3ListViewItem *item)
void doubleClicked(Q3ListViewItem *item)
const QPoint & pos() const
virtual void setDropHighlighter(bool b)
Enable/Disable the drawing of a drop-highlighter (a rectangle around the item under the mouse cursor)...
Definition: k3listview.cpp:1424
void translate(int dx, int dy)
bool isVisible() const
bool intersects(const QRect &rectangle) const
virtual void focusOutEvent(QFocusEvent *ev)
QPoint mapToGlobal(const QPoint &pos) const
QRect unite(const QRect &rectangle) const
virtual void setColumnWidth(int column, int w)
virtual void viewportPaintEvent(QPaintEvent *)
Reimplemented for internal reasons.
Definition: k3listview.cpp:1916
bool isAlternate()
returns true if this item is to be drawn with the alternate background
Definition: k3listview.cpp:2271
void onItem(Q3ListViewItem *i)
rootIsDecorated
void writeEntry(const QString &key, const QVariant &value, WriteConfigFlags pFlags=Normal)
int height() const
int x() const
int y() const
bool isOpen() const
Q3ListViewItem * itemAbove() const
bool hasFocus() const
virtual void viewportPaintEvent(QPaintEvent *pe)
void setClipRegion(const QRegion ®ion, Qt::ClipOperation operation)
static bool showContextMenusOnPress()
virtual void keyPressEvent(QKeyEvent *e)
virtual void contentsDragEnterEvent(QDragEnterEvent *)
Reimplemented for internal reasons.
Definition: k3listview.cpp:1282
int mapToLogical(int a) const
static KGlobalSettings * self()
void acceptProposedAction()
virtual void setOpen(Q3ListViewItem *item, bool open)
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
void ensureItemVisible(const Q3ListViewItem *i)
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
void mouseButtonClicked(int button, Q3ListViewItem *item, const QPoint &pos, int c)
virtual void leaveEvent(QEvent *e)
Reimplemented for internal reasons.
Definition: k3listview.cpp:737
void getHsv(int *h, int *s, int *v, int *a) const
void update()
bool drag()
int x() const
int y() const
QColor dark(int factor) const
A listview item with support for alternate background colors.
Definition: k3listview.h:986
virtual void keyPressEvent(QKeyEvent *)
void setGeometry(int x, int y, int w, int h)
virtual void setAutoOpen(bool b)
Enable/Disable AutoOpen (not implemented currently).
Definition: k3listview.cpp:1195
virtual void focusInEvent(QFocusEvent *fe)
Reimplemented for internal reasons.
Definition: k3listview.cpp:699
virtual void paintCell(QPainter *painter, const QColorGroup &cg, int column, int width, int align)
virtual void setSorting(int column, bool ascending)
bool tabOrderedRenaming() const
Returns whether tab ordered renaming is enabled.
Definition: k3listview.cpp:1449
int depthToPixels(int depth)
Convert the depth of an item into its indentation in pixels.
Definition: k3listview.cpp:1045
type * next()
void append(const type *item)
virtual void viewportResizeEvent(QResizeEvent *e)
Reimplemented for setFullWidth()
Definition: k3listview.cpp:1988
int width() const
const QColor & color() const
Q3ListViewItem * current() const
Definition: k3listview.h:113
virtual void insertItem(Q3ListViewItem *newChild)
const QRect & rect() const
void setAlternateBackground(const QColor &c)
sets the alternate background background color.
Definition: k3listview.cpp:1998
virtual void contentsContextMenuEvent(QContextMenuEvent *e)
void drawRect(const QRectF &rectangle)
Qt::FocusReason reason() const
int itemMargin() const
void moveItem(Q3ListViewItem *after)
QString number(int n, int base)
virtual void contentsMousePressEvent(QMouseEvent *e)
Reimplemented for internal reasons.
Definition: k3listview.cpp:752
void append(const T &value)
const QPoint & globalPos() const
virtual void setSelected(bool s)
Definition: k3listview.h:112
virtual void setText(int column, const QString &text)
void activateAutomaticSelection()
In FileManager selection mode: explicitly activate the mode in which the current item is automaticall...
Definition: k3listview.cpp:1472
int visibleHeight() const
int mapToSection(int index) const
Q3ListViewItem * selectedItem() const
bool automaticSelection() const
In FileManager selection mode: return whether it is currently in the mode where the current item is s...
Definition: k3listview.cpp:1489
virtual void setAcceptDrops(bool)
Reimplemented for internal reasons.
Definition: k3listview.cpp:1904
virtual bool isExecuteArea(const QPoint &point)
This function determines whether the given coordinates are within the execute area.
Definition: k3listview.cpp:467
int top() const
void setShadeSortColumn(bool shadeSortColumn)
Set to true if the currently sorted column should be drawn shaded.
Definition: k3listview.cpp:2004
void emitExecute(Q3ListViewItem *item, const QPoint &pos, int c)
Emit signal executed.
Definition: k3listview.cpp:671
bool itemsMovable() const
virtual void startDrag()
This method calls dragObject() and starts the drag.
Definition: k3listview.cpp:1144
updatesEnabled
void doneEditing(Q3ListViewItem *item, int row)
Definition: k3listview.cpp:1403
void setFocus()
void deactivateAutomaticSelection()
In FileManager selection mode: explicitly deactivate the mode in which the current item is automatica...
Definition: k3listview.cpp:1484
virtual int addColumn(const QString &label, int width)
void setTop(int y)
virtual void setCurrentItem(Q3ListViewItem *i)
int left() const
Qt::MouseButton button() const
int columnAlignment(int column) const
virtual void contentsMouseReleaseEvent(QMouseEvent *)
Reimplemented for internal reasons.
Definition: k3listview.cpp:839
QPalette::ColorRole backgroundRole() const
void setTabOrderedRenaming(bool b)
Enable/disable tabbing between editable cells.
Definition: k3listview.cpp:1444
virtual void contentsMouseDoubleClickEvent(QMouseEvent *e)
Reimplemented for internal reasons.
Definition: k3listview.cpp:872
virtual bool event(QEvent *)
Reimplemented to reload the alternate background in palette changes.
Definition: k3listview.cpp:744
void onViewport()
void rightButtonPressed(Q3ListViewItem *item, const QPoint &point, int column)
Q3ListViewItem * itemAt(const QPoint &viewPos) const
virtual void removeColumn(int index)
Reimplemented for full width support.
Definition: k3listview.cpp:1982
bool autoOpen() const
QPoint pos() const
virtual void contentsDragMoveEvent(QDragMoveEvent *event)
Reimplemented for internal reasons.
Definition: k3listview.cpp:976
virtual void contentsDropEvent(QDropEvent *)
Reimplemented for internal reasons.
Definition: k3listview.cpp:900
Q3Header * header() const
void doubleClicked(Q3ListViewItem *item, const QPoint &pos, int c)
Definition: k3listview.cpp:2149
Q3ListView * listView() const
virtual void setTooltipColumn(int column)
Set which column should be used for automatic tooltips.
Definition: k3listview.cpp:1419
void dropped(QDropEvent *e, Q3ListViewItem *after)
This signal gets emitted whenever something acceptable is dropped onto the listview.
void hide()
bool isActiveWindow() const
void fileManagerKeyPressEvent(QKeyEvent *)
A special keyPressEvent (for FileManager selection mode).
Definition: k3listview.cpp:1494
void slotSettingsChanged(int)
Update internal settings whenever the global ones change.
Definition: k3listview.cpp:534
virtual void contentsMouseMoveEvent(QMouseEvent *e)
virtual QString tooltip(Q3ListViewItem *item, int column) const
Definition: k3listview.cpp:1439
bool signalsBlocked() const
virtual void setItemsRenameable(bool b)
Enables inplace-renaming of items.
Definition: k3listview.cpp:1174
QRect rect() const
This Widget extends the functionality of Q3ListView to honor the system wide settings for Single Clic...
Definition: k3listview.h:57
Q3ListViewItem * itemAtIndex(int index)
Returns the item of index within the item tree or 0 if index doesn't exist in this list view...
Definition: k3listview.cpp:1871
bool acceptDrops() const
Qt::KeyboardModifiers modifiers() const
Q3ListViewItem * firstChild() const
void itemRenamed(Q3ListViewItem *item, const QString &str, int col)
This signal gets emitted when an item is renamed via in-place renaming.
virtual void findDrop(const QPoint &pos, Q3ListViewItem *&parent, Q3ListViewItem *&after)
Where is the nearest Q3ListViewItem that I'm going to drop?
Definition: k3listview.cpp:1050
int key() const
bool blockSignals(bool block)
bool allColumnsShowFocus() const
virtual void contentsDragLeaveEvent(QDragLeaveEvent *event)
Reimplemented for internal reasons.
Definition: k3listview.cpp:1028
void executed(Q3ListViewItem *item)
This signal is emitted whenever the user executes an listview item.
virtual void keyPressEvent(QKeyEvent *e)
Definition: k3listview.cpp:349
bool isEmpty() const
virtual void contentsMouseReleaseEvent(QMouseEvent *e)
void setSelectionModeExt(SelectionModeExt mode)
Set the selection mode.
Definition: k3listview.cpp:1824
bool isSelected() const
int itemIndex(const Q3ListViewItem *item) const
Returns the index of item within the item tree or -1 if item doesn't exist in this list view...
Definition: k3listview.cpp:1852
Definition: k3listview.h:110
bool hasKey(const QString &key) const
virtual void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment)
Definition: k3listview.cpp:2345
void slotMouseButtonClicked(int btn, Q3ListViewItem *item, const QPoint &pos, int c)
Definition: k3listview.cpp:894
virtual void movableDropEvent(Q3ListViewItem *parent, Q3ListViewItem *afterme)
Handle dropEvent when itemsMovable() is set to true.
Definition: k3listview.cpp:926
void repaint()
QRect itemRect(const Q3ListViewItem *item) const
virtual void focusInEvent(QFocusEvent *e)
virtual void setDragEnabled(bool allow)
static bool changeCursorOverIcon()
void setRight(int x)
void cleanItemHighlighter()
Repaint the rect where I was drawing the drop rectangle.
Definition: k3listview.cpp:1370
K3ListViewLineEdit(K3ListView *parent)
Definition: k3listview.cpp:184
int startDragTime()
void setFrame(bool)
QFontMetrics fontMetrics() const
QPoint pos()
virtual bool acceptDrag(QDropEvent *event) const
Definition: k3listview.cpp:1409
int dropVisualizerWidth() const
The dropVisualizerWidth defaults to 4.
QString dir(const QString &fileClass)
virtual void insertItem(Q3ListViewItem *item)
Definition: k3listview.cpp:2224
virtual void takeItem(Q3ListViewItem *i)
bool below(const QRect &rect, const QPoint &p)
Determine whether a drop on position p would count as being above or below the QRect rect...
Definition: k3listview.cpp:1454
virtual void contentsMousePressEvent(QMouseEvent *e)
bool itemsRenameable() const
void home(bool mark)
void rightButtonClicked(Q3ListViewItem *item, const QPoint &point, int column)
void selectionChanged()
QPoint mapFromGlobal(const QPoint &pos) const
Q3ListViewItem * currentItem() const
typedef ConstIterator
int height() const
static int autoSelectDelay()
void slotOnViewport()
Accessory slot for AutoSelect/ChangeCursorOverItem.
Definition: k3listview.cpp:525
int bottom() const
QPoint topLeft() const
virtual bool event(QEvent *)
treeStepSize
virtual void contentsMouseMoveEvent(QMouseEvent *e)
Reimplemented for internal reasons.
Definition: k3listview.cpp:799
virtual void paintEvent(QPaintEvent *ev)
void init(const QWidget *widget)
virtual void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const =0
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
int columnWidth(int c) const
virtual int addColumn(const QString &label, int width=-1)
Reimplemented for full width support.
Definition: k3listview.cpp:1962
void repaint() const
int itemPos() const
Q3ListViewItem * firstChild() const
void setRenameable(int column, bool yesno=true)
By default, if you called setItemsRenameable(true), only the first column is renameable.
Definition: k3listview.cpp:1394
void resetAutoSelection()
Reset AutoSelection to the system wide setting.
Definition: k3listview.cpp:2140
bool shadeSortColumn(void) const
See if the sort column should be drawn shaded.
void show()
void aboutToMove()
Connect to this signal if you want to do some preprocessing before a move is made, for example, to disable sorting.
void contextMenu(K3ListView *l, Q3ListViewItem *i, const QPoint &p)
This signal is emitted whenever a context-menu should be shown for item i.
const QPoint & pos() const
int cellPos(int i) const
QWidget * target()
const_iterator constEnd() const
Definition: k3listview.h:109
virtual void focusOutEvent(QFocusEvent *fe)
Reimplemented for internal reasons.
Definition: k3listview.cpp:715
const_iterator constBegin() const
void itemAdded(Q3ListViewItem *item)
virtual void setSorting(int column, bool ascending=true)
Reimplemented to remember the current sort column and order.
Definition: k3listview.cpp:2079
virtual void rename(Q3ListViewItem *item, int c)
Rename column c of item.
Definition: k3listview.cpp:1380
QWidget * viewport() const
void center(int x, int y)
static int nextCol(K3ListView *pl, Q3ListViewItem *pi, int start, int dir)
Definition: k3listview.cpp:241
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void moved()
This signal is emitted when ever the user moves an item in the list via DnD.
QList< Q3ListViewItem * > selectedItems(bool includeHiddenItems=true) const
Definition: k3listview.cpp:1215
void triggerUpdate()
QObject * parent() const
virtual void setText(const QString &)
virtual void leaveEvent(QEvent *event)
Q3ListViewItem * itemBelow() const
static int dndEventDelay()
void moveSection(int section, int toIndex)
virtual void setItemsMovable(bool b)
Set whether items in the list view can be moved.
Definition: k3listview.cpp:1164
void setLeft(int x)
T readEntry(const QString &key, const T &aDefault) const
void restoreLayout(KConfig *config, const QString &group)
Reads the list view's layout from a KConfig group as stored with saveLayout.
Definition: k3listview.cpp:2039
virtual bool event(QEvent *e)
void selectionChanged()
bool dragEnabled() const
void contentsMoving(int x, int y)
virtual void clearSelection()
virtual void setDragAutoScroll(bool b)
void setDropVisualizerWidth(int w)
Set the width of the (default) drop-visualizer.
Definition: k3listview.cpp:1296
virtual QRect drawDropVisualizer(QPainter *p, Q3ListViewItem *parent, Q3ListViewItem *after)
Paint the drag line.
Definition: k3listview.cpp:1301
int contentsX() const
bool isValid() const
int depth() const
int sortColumn() const
QStringList list(const QString &fileClass)
virtual QRect drawItemHighlighter(QPainter *painter, Q3ListViewItem *item)
Paint the drag rectangle.
Definition: k3listview.cpp:1348
virtual void setSelected(Q3ListViewItem *item, bool selected)
typedef KeyboardModifiers
virtual void setStretchEnabled(bool b, int section)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:26:47 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:26:47 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.