qBittorrent
speedwidget.h
Go to the documentation of this file.
1
/*
2
* Bittorrent Client using Qt and libtorrent.
3
* Copyright (C) 2015 Anton Lashkov <
[email protected]
>
4
*
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
*
19
* In addition, as a special exception, the copyright holders give permission to
20
* link this program with the OpenSSL project's "OpenSSL" library (or with
21
* modified versions of it that use the same license as the "OpenSSL" library),
22
* and distribute the linked executables. You must obey the GNU General Public
23
* License in all respects for all of the code used other than "OpenSSL". If you
24
* modify file(s), you may extend this exception to your version of the file(s),
25
* but you are not obligated to do so. If you do not wish to do so, delete this
26
* exception statement from your version.
27
*/
28
29
#pragma once
30
31
#include <QComboBox>
32
#include <QWidget>
33
34
class
QHBoxLayout;
35
class
QLabel;
36
class
QMenu;
37
class
QVBoxLayout;
38
39
class
PropertiesWidget
;
40
class
SpeedPlotView
;
41
42
class
ComboBoxMenuButton
final :
public
QComboBox
43
{
44
Q_OBJECT
45
46
public
:
47
ComboBoxMenuButton
(QWidget *parent, QMenu *menu);
48
void
showPopup
()
override
;
49
50
private
:
51
QMenu *
m_menu
;
52
};
53
54
55
class
SpeedWidget
:
public
QWidget
56
{
57
Q_OBJECT
58
59
public
:
60
explicit
SpeedWidget
(
PropertiesWidget
*parent);
61
~SpeedWidget
();
62
63
private
slots:
64
void
onPeriodChange
(
int
period);
65
void
onGraphChange
(
int
id
);
66
void
update
();
67
68
private
:
69
void
loadSettings
();
70
void
saveSettings
()
const
;
71
72
QVBoxLayout *
m_layout
;
73
QHBoxLayout *
m_hlayout
;
74
QLabel *
m_periodLabel
;
75
QComboBox *
m_periodCombobox
;
76
SpeedPlotView
*
m_plot
;
77
78
ComboBoxMenuButton
*
m_graphsButton
;
79
QMenu *
m_graphsMenu
;
80
QList<QAction *>
m_graphsMenuActions
;
81
};
ComboBoxMenuButton
Definition:
speedwidget.h:43
ComboBoxMenuButton::m_menu
QMenu * m_menu
Definition:
speedwidget.h:51
ComboBoxMenuButton::showPopup
void showPopup() override
Definition:
speedwidget.cpp:50
ComboBoxMenuButton::ComboBoxMenuButton
ComboBoxMenuButton(QWidget *parent, QMenu *menu)
Definition:
speedwidget.cpp:44
PropertiesWidget
Definition:
propertieswidget.h:57
SpeedPlotView
Definition:
speedplotview.h:49
SpeedWidget
Definition:
speedwidget.h:56
SpeedWidget::m_periodCombobox
QComboBox * m_periodCombobox
Definition:
speedwidget.h:75
SpeedWidget::m_graphsMenuActions
QList< QAction * > m_graphsMenuActions
Definition:
speedwidget.h:80
SpeedWidget::m_plot
SpeedPlotView * m_plot
Definition:
speedwidget.h:76
SpeedWidget::m_hlayout
QHBoxLayout * m_hlayout
Definition:
speedwidget.h:73
SpeedWidget::loadSettings
void loadSettings()
Definition:
speedwidget.cpp:160
SpeedWidget::m_graphsMenu
QMenu * m_graphsMenu
Definition:
speedwidget.h:79
SpeedWidget::SpeedWidget
SpeedWidget(PropertiesWidget *parent)
Definition:
speedwidget.cpp:58
SpeedWidget::m_graphsButton
ComboBoxMenuButton * m_graphsButton
Definition:
speedwidget.h:78
SpeedWidget::onPeriodChange
void onPeriodChange(int period)
Definition:
speedwidget.cpp:149
SpeedWidget::~SpeedWidget
~SpeedWidget()
Definition:
speedwidget.cpp:123
SpeedWidget::update
void update()
Definition:
speedwidget.cpp:130
SpeedWidget::m_layout
QVBoxLayout * m_layout
Definition:
speedwidget.h:72
SpeedWidget::m_periodLabel
QLabel * m_periodLabel
Definition:
speedwidget.h:74
SpeedWidget::onGraphChange
void onGraphChange(int id)
Definition:
speedwidget.cpp:154
SpeedWidget::saveSettings
void saveSettings() const
Definition:
speedwidget.cpp:178
src
gui
properties
speedwidget.h
Generated on Wed May 4 2022 08:51:13 for qBittorrent by
1.9.1