source: trunk/qt/OptionsDialog.h @ 14537

Last change on this file since 14537 was 14537, checked in by mikedld, 6 years ago

Use PascalCase? for Qt client filenames

Split FileTree?.{h,cc} and FilterBar?.{h,cc} files so that each class
is in its own file.

This breaks translations (some classes got renamed => context changed),
to be fixed by next commit (along with Tx sync).

  • Property svn:keywords set to Date Rev Author Id
File size: 1.8 KB
Line 
1/*
2 * This file Copyright (C) 2009-2015 Mnemosyne LLC
3 *
4 * It may be used under the GNU GPL versions 2 or 3
5 * or any future license endorsed by Mnemosyne LLC.
6 *
7 * $Id: OptionsDialog.h 14537 2015-06-10 21:27:11Z mikedld $
8 */
9
10#ifndef QTR_OPTIONS_DIALOG_H
11#define QTR_OPTIONS_DIALOG_H
12
13#include <QCryptographicHash>
14#include <QDialog>
15#include <QDir>
16#include <QFile>
17#include <QMap>
18#include <QString>
19#include <QString>
20#include <QTimer>
21#include <QVector>
22
23#include "AddData.h" // AddData
24#include "Torrent.h" // FileList
25
26#include "ui_OptionsDialog.h"
27
28class Prefs;
29class Session;
30
31extern "C"
32{
33  struct tr_variant;
34}
35
36class OptionsDialog: public QDialog
37{
38    Q_OBJECT
39
40  public:
41    OptionsDialog (Session& session, const Prefs& prefs, const AddData& addme, QWidget * parent = 0);
42    ~OptionsDialog ();
43
44  private:
45    void reload ();
46    void clearInfo ();
47    void clearVerify ();
48
49  private slots:
50    void onAccepted ();
51    void onPriorityChanged (const QSet<int>& fileIndices, int);
52    void onWantedChanged (const QSet<int>& fileIndices, bool);
53    void onVerify ();
54    void onTimeout ();
55
56    void onSourceChanged ();
57    void onDestinationChanged ();
58
59  private:
60    Session& mySession;
61    AddData myAdd;
62    QDir myLocalDestination;
63    bool myHaveInfo;
64    tr_info myInfo;
65    Ui::OptionsDialog ui;
66    QPushButton * myVerifyButton;
67    QVector<int> myPriorities;
68    QVector<bool> myWanted;
69    FileList myFiles;
70
71  private:
72    QTimer myVerifyTimer;
73    char myVerifyBuf[2048 * 4];
74    QFile myVerifyFile;
75    uint64_t myVerifyFilePos;
76    int myVerifyFileIndex;
77    uint32_t myVerifyPieceIndex;
78    uint32_t myVerifyPiecePos;
79    QVector<bool> myVerifyFlags;
80    QCryptographicHash myVerifyHash;
81    typedef QMap<uint32_t, int32_t> mybins_t;
82    mybins_t myVerifyBins;
83    QTimer myEditTimer;
84};
85
86#endif // QTR_OPTIONS_DIALOG_H
Note: See TracBrowser for help on using the repository browser.