2008-06-25 19:29:29 +00:00
|
|
|
/*
|
|
|
|
* Bittorrent Client using Qt4 and libtorrent.
|
|
|
|
* Copyright (C) 2006 Christophe Dumez
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
2009-04-05 17:00:55 +00:00
|
|
|
* In addition, as a special exception, the copyright holders give permission to
|
|
|
|
* link this program with the OpenSSL project's "OpenSSL" library (or with
|
|
|
|
* modified versions of it that use the same license as the "OpenSSL" library),
|
|
|
|
* and distribute the linked executables. You must obey the GNU General Public
|
|
|
|
* License in all respects for all of the code used other than "OpenSSL". If you
|
|
|
|
* modify file(s), you may extend this exception to your version of the file(s),
|
|
|
|
* but you are not obligated to do so. If you do not wish to do so, delete this
|
|
|
|
* exception statement from your version.
|
|
|
|
*
|
2008-06-25 19:29:29 +00:00
|
|
|
* Contact : chris@qbittorrent.org
|
|
|
|
*/
|
|
|
|
|
2015-08-26 20:05:57 +03:00
|
|
|
#ifndef SEARCHTAB_H
|
|
|
|
#define SEARCHTAB_H
|
|
|
|
|
2015-09-24 10:33:02 +03:00
|
|
|
#include <QWidget>
|
2011-02-27 15:41:05 +00:00
|
|
|
|
2015-09-24 10:33:02 +03:00
|
|
|
class QLabel;
|
2008-06-25 19:29:29 +00:00
|
|
|
class QTreeView;
|
2009-03-15 15:54:08 +00:00
|
|
|
class QHeaderView;
|
2008-06-25 19:29:29 +00:00
|
|
|
class QStandardItemModel;
|
2015-09-24 10:33:02 +03:00
|
|
|
class QSortFilterProxyModel;
|
|
|
|
class QModelIndex;
|
|
|
|
class QVBoxLayout;
|
|
|
|
|
|
|
|
class SearchSortModel;
|
|
|
|
class SearchListDelegate;
|
|
|
|
class SearchWidget;
|
2009-08-27 12:37:39 +00:00
|
|
|
|
2015-08-26 20:05:57 +03:00
|
|
|
class SearchTab: public QWidget
|
|
|
|
{
|
2015-04-11 14:26:25 +03:00
|
|
|
Q_OBJECT
|
2009-08-27 12:37:39 +00:00
|
|
|
|
|
|
|
public:
|
2015-09-24 10:33:02 +03:00
|
|
|
explicit SearchTab(SearchWidget *m_parent);
|
|
|
|
|
|
|
|
QLabel* getCurrentLabel() const;
|
2015-04-11 14:26:25 +03:00
|
|
|
QStandardItemModel* getCurrentSearchListModel() const;
|
|
|
|
QSortFilterProxyModel* getCurrentSearchListProxy() const;
|
2015-09-24 10:33:02 +03:00
|
|
|
QTreeView* getCurrentTreeView() const;
|
2015-04-11 14:26:25 +03:00
|
|
|
QHeaderView* header() const;
|
2015-09-24 10:33:02 +03:00
|
|
|
QString status() const;
|
|
|
|
|
|
|
|
bool loadColWidthResultsList();
|
|
|
|
void setRowColor(int row, QString color);
|
|
|
|
void setStatus(const QString &value);
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void downloadSelectedItem(const QModelIndex &index);
|
|
|
|
|
|
|
|
private:
|
|
|
|
QVBoxLayout *m_box;
|
|
|
|
QLabel *m_resultsLbl;
|
|
|
|
QTreeView *m_resultsBrowser;
|
|
|
|
QStandardItemModel *m_searchListModel;
|
|
|
|
SearchSortModel *m_proxyModel;
|
|
|
|
SearchListDelegate *m_searchDelegate;
|
|
|
|
SearchWidget *m_parent;
|
|
|
|
QString m_status;
|
2008-06-25 19:29:29 +00:00
|
|
|
};
|
|
|
|
|
2015-08-26 20:05:57 +03:00
|
|
|
#endif // SEARCHTAB_H
|
2008-07-07 09:14:49 +00:00
|
|
|
|