Browse Source

Follow project coding style. Issue #2192.

adaptive-webui-19844
sledgehammer999 10 years ago
parent
commit
38455af791
  1. 1052
      src/addnewtorrentdialog.cpp
  2. 86
      src/addnewtorrentdialog.h

1052
src/addnewtorrentdialog.cpp

File diff suppressed because it is too large Load Diff

86
src/addnewtorrentdialog.h

@ -40,69 +40,69 @@ @@ -40,69 +40,69 @@
QT_BEGIN_NAMESPACE
namespace Ui {
class AddNewTorrentDialog;
class AddNewTorrentDialog;
}
QT_END_NAMESPACE
class TorrentContentFilterModel;
class PropListDelegate;
class AddNewTorrentDialog : public QDialog
class AddNewTorrentDialog: public QDialog
{
Q_OBJECT
Q_OBJECT
public:
~AddNewTorrentDialog();
~AddNewTorrentDialog();
static void showTorrent(const QString& torrent_path, const QString& from_url, QWidget *parent = 0);
static void showMagnet(const QString& torrent_link, QWidget *parent = 0);
static void showTorrent(const QString& torrent_path, const QString& from_url, QWidget *parent = 0);
static void showMagnet(const QString& torrent_link, QWidget *parent = 0);
protected:
void showEvent(QShowEvent *event);
void showEvent(QShowEvent *event);
private slots:
void showAdvancedSettings(bool show);
void displayContentTreeMenu(const QPoint&);
void updateDiskSpaceLabel();
void onSavePathChanged(int);
void relayout();
void renameSelectedFile();
void setdialogPosition();
void updateMetadata(const QTorrentHandle& h);
void browseButton_clicked();
void showAdvancedSettings(bool show);
void displayContentTreeMenu(const QPoint&);
void updateDiskSpaceLabel();
void onSavePathChanged(int);
void relayout();
void renameSelectedFile();
void setdialogPosition();
void updateMetadata(const QTorrentHandle& h);
void browseButton_clicked();
protected slots:
virtual void accept();
virtual void reject();
virtual void accept();
virtual void reject();
private:
explicit AddNewTorrentDialog(QWidget *parent = 0);
bool loadTorrent(const QString& torrent_path, const QString& from_url);
bool loadMagnet(const QString& magnet_uri);
void loadSavePathHistory();
void saveSavePathHistory() const;
int indexOfSavePath(const QString& save_path);
void updateFileNameInSavePaths(const QString& new_filename);
void loadState();
void saveState();
void setMetadataProgressIndicator(bool visibleIndicator, const QString &labelText = QString());
void setupTreeview();
explicit AddNewTorrentDialog(QWidget *parent = 0);
bool loadTorrent(const QString& torrent_path, const QString& from_url);
bool loadMagnet(const QString& magnet_uri);
void loadSavePathHistory();
void saveSavePathHistory() const;
int indexOfSavePath(const QString& save_path);
void updateFileNameInSavePaths(const QString& new_filename);
void loadState();
void saveState();
void setMetadataProgressIndicator(bool visibleIndicator, const QString &labelText = QString());
void setupTreeview();
private:
Ui::AddNewTorrentDialog *ui;
TorrentContentFilterModel *m_contentModel;
PropListDelegate *m_contentDelegate;
bool m_isMagnet;
bool m_hasMetadata;
QString m_filePath;
QString m_url;
QString m_hash;
boost::intrusive_ptr<libtorrent::torrent_info> m_torrentInfo;
QStringList m_filesPath;
bool m_hasRenamedFile;
QShortcut *editHotkey;
QByteArray m_headerState;
int m_oldIndex;
Ui::AddNewTorrentDialog *ui;
TorrentContentFilterModel *m_contentModel;
PropListDelegate *m_contentDelegate;
bool m_isMagnet;
bool m_hasMetadata;
QString m_filePath;
QString m_url;
QString m_hash;
boost::intrusive_ptr<libtorrent::torrent_info> m_torrentInfo;
QStringList m_filesPath;
bool m_hasRenamedFile;
QShortcut *editHotkey;
QByteArray m_headerState;
int m_oldIndex;
};
#endif // ADDNEWTORRENTDIALOG_H

Loading…
Cancel
Save