[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/lib/koproperty
From: Jaroslaw Staniek <js () iidea ! pl>
Date: 2005-08-05 14:04:37
Message-ID: 1123250677.051898.7780.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 443247 by staniek:
Property Editor
- entire group item is expandable by clicking
M +8 -10 editor.cpp
M +2 -4 editor.h
--- trunk/koffice/lib/koproperty/editor.cpp #443246:443247
@@ -163,7 +163,6 @@
connect(header(), SIGNAL(sizeChange(int, int, int)), this, SLOT(slotColumnSizeChanged(int, int, int)));
connect(header(), SIGNAL(clicked(int)), this, SLOT(updateEditorGeometry()));
connect(header(), SIGNAL(sectionHandleDoubleClicked (int)), this, SLOT(slotColumnSizeChanged(int)));
-
}
Editor::~Editor()
@@ -847,7 +846,6 @@
Editor::updateFont()
{
setFont(parentWidget()->font());
-// fontChange( font() );
d->baseRowHeight = QFontMetrics(parentWidget()->font()).height() + itemMargin() * 2;
if (!d->currentItem)
d->undoButton->resize(d->baseRowHeight, d->baseRowHeight);
@@ -872,15 +870,15 @@
return d->insideFill;
}
-/*void
-Editor::drawContentsOffset ( QPainter * p, int ox, int oy, int cx, int cy, int cw, int ch )
+void
+Editor::contentsMousePressEvent( QMouseEvent * e )
{
- KListView::drawContentsOffset( p, ox, oy, cx, cy, cw, ch );
+ QListViewItem *item = itemAt(e->pos());
+ if (dynamic_cast<EditorGroupItem*>(item)) {
+ setOpen( item, !isOpen(item) );
+ return;
+ }
+ KListView::contentsMousePressEvent(e);
}
-void
-Editor::paintEmptyArea ( QPainter * p, const QRect & rect )
-{
-}*/
-
#include "editor.moc"
--- trunk/koffice/lib/koproperty/editor.h #443246:443247
@@ -154,14 +154,12 @@
virtual bool eventFilter( QObject * watched, QEvent * e );
bool handleKeyPress(QKeyEvent* ev);
- //! reaction on font change ('undo button' will be resized)
-// virtual void fontChange( const QFont & oldFont );
virtual bool event( QEvent * e );
void updateFont();
bool insideFill() const;
-// virtual void drawContentsOffset ( QPainter * p, int ox, int oy, int cx, int cy, int cw, int ch );
-// virtual void paintEmptyArea ( QPainter * p, const QRect & rect );
+ virtual void contentsMousePressEvent( QMouseEvent * e );
+
private:
EditorPrivate *d;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic