mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 09:50:12 +00:00
Update the ActiveView in DolphinIconsView similiar to DolphinView::mouseReleaseEvent
svn path=/trunk/playground/utils/dolphin/; revision=607853
This commit is contained in:
parent
8fa346cd4b
commit
1d03eac7fc
|
@ -20,9 +20,11 @@
|
||||||
|
|
||||||
#include "dolphiniconsview.h"
|
#include "dolphiniconsview.h"
|
||||||
#include "dolphinview.h"
|
#include "dolphinview.h"
|
||||||
|
#include "dolphin.h"
|
||||||
|
|
||||||
DolphinIconsView::DolphinIconsView(DolphinView* parent) :
|
DolphinIconsView::DolphinIconsView(DolphinView* parent) :
|
||||||
QListView(parent)
|
QListView(parent)
|
||||||
|
, m_parentView( parent )
|
||||||
{
|
{
|
||||||
setResizeMode( QListView::Adjust );
|
setResizeMode( QListView::Adjust );
|
||||||
}
|
}
|
||||||
|
@ -31,4 +33,10 @@ DolphinIconsView::~DolphinIconsView()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DolphinIconsView::mouseReleaseEvent(QMouseEvent *e)
|
||||||
|
{
|
||||||
|
QListView::mouseReleaseEvent(e);
|
||||||
|
Dolphin::mainWin().setActiveView(m_parentView);
|
||||||
|
}
|
||||||
|
|
||||||
#include "dolphiniconsview.moc"
|
#include "dolphiniconsview.moc"
|
||||||
|
|
|
@ -40,6 +40,12 @@ class DolphinIconsView : public QListView
|
||||||
public:
|
public:
|
||||||
DolphinIconsView(DolphinView* parent);
|
DolphinIconsView(DolphinView* parent);
|
||||||
virtual ~DolphinIconsView();
|
virtual ~DolphinIconsView();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void mouseReleaseEvent(QMouseEvent* event);
|
||||||
|
|
||||||
|
private:
|
||||||
|
DolphinView *m_parentView;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue