Browse Source

PropertiesWidget: Some coding style

adaptive-webui-19844
thalieht 8 years ago
parent
commit
b360c5453b
  1. 38
      src/gui/properties/propertieswidget.cpp
  2. 30
      src/gui/properties/propertieswidget.h

38
src/gui/properties/propertieswidget.cpp

@ -30,40 +30,40 @@ @@ -30,40 +30,40 @@
#include "propertieswidget.h"
#include <QAction>
#include <QBitArray>
#include <QDebug>
#include <QTimer>
#include <QListWidgetItem>
#include <QVBoxLayout>
#include <QStackedWidget>
#include <QSplitter>
#include <QFileDialog>
#include <QHeaderView>
#include <QAction>
#include <QListWidgetItem>
#include <QMenu>
#include <QFileDialog>
#include <QBitArray>
#include <QSplitter>
#include <QStackedWidget>
#include <QThread>
#include <QTimer>
#include <QVBoxLayout>
#include "base/bittorrent/session.h"
#include "base/preferences.h"
#include "base/unicodestrings.h"
#include "base/utils/fs.h"
#include "base/utils/misc.h"
#include "base/utils/string.h"
#include "base/unicodestrings.h"
#include "proplistdelegate.h"
#include "torrentcontentfiltermodel.h"
#include "torrentcontentmodel.h"
#include "peerlistwidget.h"
#include "speedwidget.h"
#include "trackerlist.h"
#include "autoexpandabledialog.h"
#include "downloadedpiecesbar.h"
#include "guiiconprovider.h"
#include "lineedit.h"
#include "mainwindow.h"
#include "messageboxraised.h"
#include "downloadedpiecesbar.h"
#include "peerlistwidget.h"
#include "pieceavailabilitybar.h"
#include "proplistdelegate.h"
#include "proptabbar.h"
#include "guiiconprovider.h"
#include "lineedit.h"
#include "speedwidget.h"
#include "torrentcontentfiltermodel.h"
#include "torrentcontentmodel.h"
#include "trackerlist.h"
#include "transferlistwidget.h"
#include "autoexpandabledialog.h"
#include "ui_propertieswidget.h"

30
src/gui/properties/propertieswidget.h

@ -33,8 +33,8 @@ @@ -33,8 +33,8 @@
#include <QShortcut>
#include <QWidget>
#include "base/bittorrent/torrenthandle.h"
#include "base/bittorrent/torrenthandle.h"
class TransferListWidget;
class TorrentContentFilterModel;
@ -67,9 +67,12 @@ class PropertiesWidget: public QWidget @@ -67,9 +67,12 @@ class PropertiesWidget: public QWidget
Q_DISABLE_COPY(PropertiesWidget)
public:
enum SlideState {REDUCED, VISIBLE};
enum SlideState
{
REDUCED,
VISIBLE
};
public:
PropertiesWidget(QWidget *parent, MainWindow *main_window, TransferListWidget *transferList);
~PropertiesWidget();
BitTorrent::TorrentHandle *getCurrentTorrent() const;
@ -78,6 +81,16 @@ public: @@ -78,6 +81,16 @@ public:
QTreeView *getFilesList() const;
SpeedWidget *getSpeedWidget() const { return speedWidget; }
public slots:
void setVisibility(bool visible);
void loadDynamicData();
void clear();
void readSettings();
void saveSettings();
void reloadPreferences();
void openDoubleClickedFile(const QModelIndex &);
void loadTrackers(BitTorrent::TorrentHandle *const torrent);
protected:
QPushButton *getButtonFromIndex(int index);
bool applyPriorities();
@ -98,21 +111,10 @@ protected slots: @@ -98,21 +111,10 @@ protected slots:
void renameSelectedFile();
void openSelectedFile();
public slots:
void setVisibility(bool visible);
void loadDynamicData();
void clear();
void readSettings();
void saveSettings();
void reloadPreferences();
void openDoubleClickedFile(const QModelIndex &);
void loadTrackers(BitTorrent::TorrentHandle *const torrent);
private:
void openFile(const QModelIndex &index);
void openFolder(const QModelIndex &index, bool containing_folder);
private:
Ui::PropertiesWidget *m_ui;
TransferListWidget *transferList;
MainWindow *main_window;

Loading…
Cancel
Save