mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-12-04 16:14:05 +00:00
fix:remove custom treeview class
This commit is contained in:
parent
ddb9655938
commit
e32a7a2c94
|
@ -410,8 +410,6 @@ set(PROJECT_SOURCES
|
||||||
translatebox.hh
|
translatebox.hh
|
||||||
transliteration.cc
|
transliteration.cc
|
||||||
transliteration.hh
|
transliteration.hh
|
||||||
treeview.cc
|
|
||||||
treeview.hh
|
|
||||||
ufile.cc
|
ufile.cc
|
||||||
ufile.hh
|
ufile.hh
|
||||||
utf8.cc
|
utf8.cc
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
void FavoritesPaneWidget::setUp( Config::Class * cfg, QMenu * menu )
|
void FavoritesPaneWidget::setUp( Config::Class * cfg, QMenu * menu )
|
||||||
{
|
{
|
||||||
m_cfg = cfg;
|
m_cfg = cfg;
|
||||||
m_favoritesTree = findChild< TreeView * >( "favoritesTree" );
|
m_favoritesTree = findChild< QTreeView * >( "favoritesTree" );
|
||||||
QDockWidget * favoritesPane = qobject_cast< QDockWidget * >( parentWidget() );
|
QDockWidget * favoritesPane = qobject_cast< QDockWidget * >( parentWidget() );
|
||||||
m_favoritesTree->setHeaderHidden( true );
|
m_favoritesTree->setHeaderHidden( true );
|
||||||
|
|
||||||
|
|
|
@ -13,10 +13,11 @@
|
||||||
#include <QDomNode>
|
#include <QDomNode>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QMimeData>
|
#include <QMimeData>
|
||||||
|
#include <QItemSelection>
|
||||||
|
#include <QTreeView>
|
||||||
|
|
||||||
#include <config.hh>
|
#include <config.hh>
|
||||||
#include "delegate.hh"
|
#include "delegate.hh"
|
||||||
#include "treeview.hh"
|
|
||||||
|
|
||||||
class FavoritesModel;
|
class FavoritesModel;
|
||||||
|
|
||||||
|
@ -78,7 +79,7 @@ private:
|
||||||
virtual bool eventFilter( QObject *, QEvent * );
|
virtual bool eventFilter( QObject *, QEvent * );
|
||||||
|
|
||||||
Config::Class * m_cfg ;
|
Config::Class * m_cfg ;
|
||||||
TreeView * m_favoritesTree;
|
QTreeView * m_favoritesTree;
|
||||||
QMenu * m_favoritesMenu;
|
QMenu * m_favoritesMenu;
|
||||||
QAction * m_deleteSelectedAction;
|
QAction * m_deleteSelectedAction;
|
||||||
QAction * m_separator;
|
QAction * m_separator;
|
||||||
|
|
|
@ -404,7 +404,6 @@ HEADERS += folding.hh \
|
||||||
gls.hh \
|
gls.hh \
|
||||||
splitfile.hh \
|
splitfile.hh \
|
||||||
favoritespanewidget.hh \
|
favoritespanewidget.hh \
|
||||||
treeview.hh \
|
|
||||||
src/dict/lingualibre.h \
|
src/dict/lingualibre.h \
|
||||||
src/ui/articleview.h \
|
src/ui/articleview.h \
|
||||||
src/ui/ftssearchpanel.h \
|
src/ui/ftssearchpanel.h \
|
||||||
|
@ -540,7 +539,6 @@ SOURCES += folding.cc \
|
||||||
gls.cc \
|
gls.cc \
|
||||||
splitfile.cc \
|
splitfile.cc \
|
||||||
favoritespanewidget.cc \
|
favoritespanewidget.cc \
|
||||||
treeview.cc \
|
|
||||||
src/dict/lingualibre.cpp \
|
src/dict/lingualibre.cpp \
|
||||||
src/ui/articleview.cpp \
|
src/ui/articleview.cpp \
|
||||||
src/ui/ftssearchpanel.cpp \
|
src/ui/ftssearchpanel.cpp \
|
||||||
|
|
|
@ -252,7 +252,7 @@
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="TreeView" name="favoritesTree"/>
|
<widget class="QTreeView" name="favoritesTree"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -624,11 +624,6 @@
|
||||||
<header>favoritespanewidget.hh</header>
|
<header>favoritespanewidget.hh</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>TreeView</class>
|
|
||||||
<extends>QTreeView</extends>
|
|
||||||
<header>treeview.hh</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>translateLine</tabstop>
|
<tabstop>translateLine</tabstop>
|
||||||
|
|
10
treeview.cc
10
treeview.cc
|
@ -1,10 +0,0 @@
|
||||||
/* This file is (c) 2008-2018 Abs62
|
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
|
||||||
|
|
||||||
#include <QDropEvent>
|
|
||||||
#include "treeview.hh"
|
|
||||||
|
|
||||||
void TreeView::dropEvent( QDropEvent * event )
|
|
||||||
{
|
|
||||||
QTreeView::dropEvent( event );
|
|
||||||
}
|
|
20
treeview.hh
20
treeview.hh
|
@ -1,20 +0,0 @@
|
||||||
/* This file is (c) 2008-2018 Abs62
|
|
||||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
|
||||||
|
|
||||||
#ifndef __TREEVIEW_HH__INCLUDED
|
|
||||||
#define __TREEVIEW_HH__INCLUDED
|
|
||||||
|
|
||||||
#include <QTreeView>
|
|
||||||
|
|
||||||
class TreeView : public QTreeView
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
TreeView( QWidget * parent = 0 ) :
|
|
||||||
QTreeView( parent )
|
|
||||||
{}
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual void dropEvent( QDropEvent * event );
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // TREEVIEW_HH
|
|
Loading…
Reference in a new issue