mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-29 16:47:25 -04:00
- implemented an optional flat view for shared files that allows sorting by date/peer/name
- restored the search for flat view only (very slow for tree view) - cleaned the code a bit: made two subclasses of RetroshareDirModel: TreeStyle_RDM and FlatStyle_RDM git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4117 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
c22a0c79e7
commit
f634331442
5 changed files with 693 additions and 448 deletions
|
@ -25,7 +25,7 @@
|
|||
#include "RsAutoUpdatePage.h"
|
||||
#include "ui_SharedFilesDialog.h"
|
||||
|
||||
class RemoteDirModel;
|
||||
class RetroshareDirModel;
|
||||
class QSortFilterProxyModel;
|
||||
|
||||
class SharedFilesDialog : public RsAutoUpdatePage
|
||||
|
@ -87,6 +87,8 @@ private slots:
|
|||
void clearFilter();
|
||||
void startFilter();
|
||||
|
||||
public slots:
|
||||
void changeCurrentViewModel(int) ;
|
||||
signals:
|
||||
void playFiles(QStringList files);
|
||||
|
||||
|
@ -103,7 +105,8 @@ private:
|
|||
void copyLink (const QModelIndexList& lst, bool remote);
|
||||
|
||||
void FilterItems();
|
||||
bool FilterItem(const QModelIndex &index, const QString &text, int level);
|
||||
bool tree_FilterItem(const QModelIndex &index, const QString &text, int level);
|
||||
bool flat_FilterItem(const QModelIndex &index, const QString &text, int level);
|
||||
|
||||
QModelIndexList getRemoteSelected();
|
||||
QModelIndexList getLocalSelected();
|
||||
|
@ -125,10 +128,15 @@ private:
|
|||
/** Qt Designer generated object */
|
||||
Ui::SharedFilesDialog ui;
|
||||
|
||||
/* RemoteDirModel */
|
||||
RemoteDirModel *model;
|
||||
/* RetroshareDirModel */
|
||||
RetroshareDirModel *tree_model;
|
||||
RetroshareDirModel *flat_model;
|
||||
RetroshareDirModel *model;
|
||||
QSortFilterProxyModel *tree_proxyModel;
|
||||
QSortFilterProxyModel *flat_proxyModel;
|
||||
QSortFilterProxyModel *proxyModel;
|
||||
RemoteDirModel *localModel;
|
||||
|
||||
RetroshareDirModel *localModel;
|
||||
QSortFilterProxyModel *localProxyModel;
|
||||
|
||||
QString currentCommand;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue