Browse Source

Merge pull request #3323 from Chocobo1/prop_bar

Availability bar, progress bar, button group improvements
adaptive-webui-19844
sledgehammer999 9 years ago
parent
commit
787b824d90
  1. 2
      src/gui/properties/downloadedpiecesbar.cpp
  2. 2
      src/gui/properties/downloadedpiecesbar.h
  3. 2
      src/gui/properties/pieceavailabilitybar.cpp
  4. 3
      src/gui/properties/pieceavailabilitybar.h
  5. 30
      src/gui/properties/propertieswidget.cpp
  6. 460
      src/gui/properties/propertieswidget.ui
  7. 5
      src/gui/properties/proptabbar.cpp

2
src/gui/properties/downloadedpiecesbar.cpp

@ -34,7 +34,7 @@
DownloadedPiecesBar::DownloadedPiecesBar(QWidget *parent): QWidget(parent) DownloadedPiecesBar::DownloadedPiecesBar(QWidget *parent): QWidget(parent)
{ {
setFixedHeight(BAR_HEIGHT); setToolTip(QString("%1\n%2\n%3").arg(tr("White: Missing pieces")).arg(tr("Green: Partial pieces")).arg(tr("Blue: Completed pieces")));
m_bgColor = 0xffffff; m_bgColor = 0xffffff;
m_borderColor = palette().color(QPalette::Dark).rgb(); m_borderColor = palette().color(QPalette::Dark).rgb();

2
src/gui/properties/downloadedpiecesbar.h

@ -37,8 +37,6 @@
#include <QBitArray> #include <QBitArray>
#include <QVector> #include <QVector>
#define BAR_HEIGHT 18
class DownloadedPiecesBar: public QWidget { class DownloadedPiecesBar: public QWidget {
Q_OBJECT Q_OBJECT
Q_DISABLE_COPY(DownloadedPiecesBar) Q_DISABLE_COPY(DownloadedPiecesBar)

2
src/gui/properties/pieceavailabilitybar.cpp

@ -36,7 +36,7 @@
PieceAvailabilityBar::PieceAvailabilityBar(QWidget *parent) PieceAvailabilityBar::PieceAvailabilityBar(QWidget *parent)
: QWidget(parent) : QWidget(parent)
{ {
setFixedHeight(BAR_HEIGHT); setToolTip(QString("%1\n%2").arg(tr("White: Unavailable pieces")).arg(tr("Blue: Available pieces")));
m_bgColor = 0xffffff; m_bgColor = 0xffffff;
m_borderColor = palette().color(QPalette::Dark).rgb(); m_borderColor = palette().color(QPalette::Dark).rgb();

3
src/gui/properties/pieceavailabilitybar.h

@ -35,9 +35,6 @@
#include <QPainter> #include <QPainter>
#include <QImage> #include <QImage>
#define BAR_HEIGHT 18
class PieceAvailabilityBar: public QWidget class PieceAvailabilityBar: public QWidget
{ {
Q_OBJECT Q_OBJECT

30
src/gui/properties/propertieswidget.cpp

@ -66,10 +66,7 @@
PropertiesWidget::PropertiesWidget(QWidget *parent, MainWindow* main_window, TransferListWidget *transferList): PropertiesWidget::PropertiesWidget(QWidget *parent, MainWindow* main_window, TransferListWidget *transferList):
QWidget(parent), transferList(transferList), main_window(main_window), m_torrent(0) { QWidget(parent), transferList(transferList), main_window(main_window), m_torrent(0) {
setupUi(this); setupUi(this);
setAutoFillBackground(true);
// Icons
trackerUpButton->setIcon(GuiIconProvider::instance()->getIcon("go-up"));
trackerDownButton->setIcon(GuiIconProvider::instance()->getIcon("go-down"));
state = VISIBLE; state = VISIBLE;
@ -102,14 +99,34 @@ PropertiesWidget::PropertiesWidget(QWidget *parent, MainWindow* main_window, Tra
connect(filesList->header(), SIGNAL(sectionResized(int, int, int)), this, SLOT(saveSettings())); connect(filesList->header(), SIGNAL(sectionResized(int, int, int)), this, SLOT(saveSettings()));
connect(filesList->header(), SIGNAL(sortIndicatorChanged(int, Qt::SortOrder)), this, SLOT(saveSettings())); connect(filesList->header(), SIGNAL(sortIndicatorChanged(int, Qt::SortOrder)), this, SLOT(saveSettings()));
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
// set bar height relative to screen dpi
int barHeight = devicePixelRatio() * 18;
#else
// set bar height relative to font height
QFont defFont;
QFontMetrics fMetrics(defFont, 0); // need to be device-dependent
int barHeight = fMetrics.height() * 5 / 4;
#endif
// Downloaded pieces progress bar // Downloaded pieces progress bar
tempProgressBarArea->setVisible(false);
downloaded_pieces = new DownloadedPiecesBar(this); downloaded_pieces = new DownloadedPiecesBar(this);
ProgressHLayout->insertWidget(1, downloaded_pieces); groupBarLayout->addWidget(downloaded_pieces, 0, 1);
downloaded_pieces->setFixedHeight(barHeight);
downloaded_pieces->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
// Pieces availability bar // Pieces availability bar
tempAvailabilityBarArea->setVisible(false);
pieces_availability = new PieceAvailabilityBar(this); pieces_availability = new PieceAvailabilityBar(this);
ProgressHLayout_2->insertWidget(1, pieces_availability); groupBarLayout->addWidget(pieces_availability, 1, 1);
pieces_availability->setFixedHeight(barHeight);
pieces_availability->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
// Tracker list // Tracker list
trackerList = new TrackerList(this); trackerList = new TrackerList(this);
trackerUpButton->setIcon(GuiIconProvider::instance()->getIcon("go-up"));
trackerDownButton->setIcon(GuiIconProvider::instance()->getIcon("go-down"));
connect(trackerUpButton, SIGNAL(clicked()), trackerList, SLOT(moveSelectionUp())); connect(trackerUpButton, SIGNAL(clicked()), trackerList, SLOT(moveSelectionUp()));
connect(trackerDownButton, SIGNAL(clicked()), trackerList, SLOT(moveSelectionDown())); connect(trackerDownButton, SIGNAL(clicked()), trackerList, SLOT(moveSelectionDown()));
horizontalLayout_trackers->insertWidget(0, trackerList); horizontalLayout_trackers->insertWidget(0, trackerList);
@ -127,6 +144,7 @@ PropertiesWidget::PropertiesWidget(QWidget *parent, MainWindow* main_window, Tra
speed_layout->addWidget(speedWidget); speed_layout->addWidget(speedWidget);
// Tab bar // Tab bar
m_tabBar = new PropTabBar(); m_tabBar = new PropTabBar();
m_tabBar->setContentsMargins(0, 5, 0, 0);
verticalLayout->addLayout(m_tabBar); verticalLayout->addLayout(m_tabBar);
connect(m_tabBar, SIGNAL(tabChanged(int)), stackedProperties, SLOT(setCurrentIndex(int))); connect(m_tabBar, SIGNAL(tabChanged(int)), stackedProperties, SLOT(setCurrentIndex(int)));
connect(m_tabBar, SIGNAL(tabChanged(int)), this, SLOT(saveSettings())); connect(m_tabBar, SIGNAL(tabChanged(int)), this, SLOT(saveSettings()));

460
src/gui/properties/propertieswidget.ui

@ -10,14 +10,20 @@
<height>452</height> <height>452</height>
</rect> </rect>
</property> </property>
<property name="windowTitle">
<string notr="true">Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
<property name="margin"> <property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
@ -25,22 +31,25 @@
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="page"> <widget class="QWidget" name="pageInfos">
<layout class="QVBoxLayout" name="verticalLayout_7"> <layout class="QVBoxLayout" name="verticalLayout_7">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
<property name="margin"> <property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<widget class="QScrollArea" name="scrollArea"> <widget class="QScrollArea" name="scrollArea">
<property name="sizePolicy">
<sizepolicy hsizetype="Ignored" vsizetype="Ignored">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="widgetResizable"> <property name="widgetResizable">
<bool>true</bool> <bool>true</bool>
</property> </property>
@ -50,29 +59,27 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>549</width> <width>549</width>
<height>447</height> <height>450</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
<item> <item>
<layout class="QHBoxLayout" name="ProgressHLayout"> <widget class="QWidget" name="groupBar" native="true">
<property name="sizeConstraint"> <layout class="QGridLayout" name="groupBarLayout">
<enum>QLayout::SetDefaultConstraint</enum> <property name="topMargin">
<number>4</number>
</property> </property>
<item> <property name="bottomMargin">
<number>4</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="downloaded_pieces_lbl"> <widget class="QLabel" name="downloaded_pieces_lbl">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="text"> <property name="text">
<string>Progress:</string> <string>Progress:</string>
</property> </property>
@ -81,55 +88,27 @@
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="0" column="2">
<widget class="QLabel" name="progress_lbl"> <widget class="QLabel" name="progress_lbl">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="maximumSize">
<size>
<width>50</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string notr="true"/>
</property>
<property name="textFormat"> <property name="textFormat">
<enum>Qt::PlainText</enum> <enum>Qt::PlainText</enum>
</property> </property>
<property name="alignment">
<set>Qt::AlignLeading</set>
</property>
<property name="margin">
<number>0</number>
</property>
</widget> </widget>
</item> </item>
</layout> <item row="1" column="0">
</item>
<item>
<layout class="QHBoxLayout" name="ProgressHLayout_2">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item>
<widget class="QLabel" name="avail_pieces_lbl"> <widget class="QLabel" name="avail_pieces_lbl">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="text"> <property name="text">
<string>Availability:</string> <string>Availability:</string>
</property> </property>
@ -138,32 +117,35 @@
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="1" column="2">
<widget class="QLabel" name="avail_average_lbl"> <widget class="QLabel" name="avail_average_lbl">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="maximumSize"> <property name="textFormat">
<size> <enum>Qt::PlainText</enum>
<width>50</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string notr="true"/>
</property> </property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="tempAvailabilityBarArea">
<property name="textFormat"> <property name="textFormat">
<enum>Qt::PlainText</enum> <enum>Qt::PlainText</enum>
</property> </property>
<property name="alignment"> </widget>
<set>Qt::AlignLeading</set> </item>
<item row="0" column="1">
<widget class="QLabel" name="tempProgressBarArea">
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget>
</item> </item>
<item> <item>
<widget class="Line" name="line_2"> <widget class="Line" name="line_2">
@ -173,51 +155,32 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QGroupBox" name="groupBox"> <widget class="QGroupBox" name="groupTransferBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title"> <property name="title">
<string>Transfer</string> <string>Transfer</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0"> <property name="topMargin">
<widget class="QLabel" name="label_7"> <number>4</number>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="text"> <property name="bottomMargin">
<string extracomment="Time (duration) the torrent is active (not paused)">Time Active:</string> <number>4</number>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> <item row="2" column="1">
</item> <widget class="QLabel" name="label_dl_speed_val">
<item row="0" column="1">
<widget class="QLabel" name="lbl_elapsed">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text">
<string notr="true"/>
</property>
<property name="textFormat"> <property name="textFormat">
<enum>Qt::PlainText</enum> <enum>Qt::PlainText</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="2"> <item row="2" column="2">
<widget class="QLabel" name="label_eta"> <widget class="QLabel" name="label_upload_speed">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred"> <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -225,31 +188,28 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>ETA:</string> <string>Upload Speed:</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="3"> <item row="2" column="3" colspan="4">
<widget class="QLabel" name="label_eta_val"> <widget class="QLabel" name="label_upload_speed_val">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text">
<string notr="true"/>
</property>
<property name="textFormat"> <property name="textFormat">
<enum>Qt::PlainText</enum> <enum>Qt::PlainText</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="4"> <item row="2" column="4">
<widget class="QLabel" name="label_4"> <widget class="QLabel" name="label_peers">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred"> <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -257,63 +217,57 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>Connections:</string> <string>Peers:</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="5"> <item row="0" column="4">
<widget class="QLabel" name="lbl_connections"> <widget class="QLabel" name="label_4">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string notr="true"/> <string>Connections:</string>
</property> </property>
<property name="textFormat"> <property name="alignment">
<enum>Qt::PlainText</enum> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="4" column="3">
<widget class="QLabel" name="label_6"> <widget class="QLabel" name="reannounce_lbl">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred"> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="textFormat">
<string>Downloaded:</string> <enum>Qt::PlainText</enum>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="0" column="3">
<widget class="QLabel" name="dlTotal"> <widget class="QLabel" name="label_eta_val">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text">
<string notr="true"/>
</property>
<property name="textFormat"> <property name="textFormat">
<enum>Qt::PlainText</enum> <enum>Qt::PlainText</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="2"> <item row="3" column="0">
<widget class="QLabel" name="label_5"> <widget class="QLabel" name="label_2">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred"> <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -321,63 +275,57 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>Uploaded:</string> <string>Download Limit:</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="3" colspan="4"> <item row="4" column="0">
<widget class="QLabel" name="upTotal"> <widget class="QLabel" name="lbl_ratio">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string notr="true"/> <string>Share Ratio:</string>
</property> </property>
<property name="textFormat"> <property name="alignment">
<enum>Qt::PlainText</enum> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="4"> <item row="0" column="5">
<widget class="QLabel" name="label_seeds"> <widget class="QLabel" name="lbl_connections">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred"> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="textFormat">
<string>Seeds:</string> <enum>Qt::PlainText</enum>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="5"> <item row="2" column="5">
<widget class="QLabel" name="label_seeds_val"> <widget class="QLabel" name="label_peers_val">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text">
<string notr="true"/>
</property>
<property name="textFormat"> <property name="textFormat">
<enum>Qt::PlainText</enum> <enum>Qt::PlainText</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="1" column="0">
<widget class="QLabel" name="label_dl_speed"> <widget class="QLabel" name="label_6">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred"> <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -385,31 +333,31 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>Download Speed:</string> <string>Downloaded:</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1"> <item row="3" column="2">
<widget class="QLabel" name="label_dl_speed_val"> <widget class="QLabel" name="label">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string notr="true"/> <string>Upload Limit:</string>
</property> </property>
<property name="textFormat"> <property name="alignment">
<enum>Qt::PlainText</enum> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="2"> <item row="4" column="4">
<widget class="QLabel" name="label_upload_speed"> <widget class="QLabel" name="label_last_complete">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred"> <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -417,31 +365,41 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>Upload Speed:</string> <string>Last Seen Complete:</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="3" colspan="4"> <item row="3" column="1">
<widget class="QLabel" name="label_upload_speed_val"> <widget class="QLabel" name="lbl_dllimit">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="textFormat">
<string notr="true"/> <enum>Qt::PlainText</enum>
</property>
</widget>
</item>
<item row="1" column="3" colspan="4">
<widget class="QLabel" name="upTotal">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="textFormat"> <property name="textFormat">
<enum>Qt::PlainText</enum> <enum>Qt::PlainText</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="4"> <item row="4" column="2">
<widget class="QLabel" name="label_peers"> <widget class="QLabel" name="label_10">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred"> <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -449,31 +407,28 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>Peers:</string> <string>Reannounce In:</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="5"> <item row="4" column="5">
<widget class="QLabel" name="label_peers_val"> <widget class="QLabel" name="label_last_complete_val">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text">
<string notr="true"/>
</property>
<property name="textFormat"> <property name="textFormat">
<enum>Qt::PlainText</enum> <enum>Qt::PlainText</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="1" column="4">
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="label_seeds">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred"> <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -481,31 +436,15 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>Download Limit:</string> <string>Seeds:</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="2" column="0">
<widget class="QLabel" name="lbl_dllimit"> <widget class="QLabel" name="label_dl_speed">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string notr="true"/>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLabel" name="label">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred"> <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -513,63 +452,54 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>Upload Limit:</string> <string>Download Speed:</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="3"> <item row="1" column="1">
<widget class="QLabel" name="lbl_uplimit"> <widget class="QLabel" name="dlTotal">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text">
<string notr="true"/>
</property>
<property name="textFormat"> <property name="textFormat">
<enum>Qt::PlainText</enum> <enum>Qt::PlainText</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="4"> <item row="3" column="5">
<widget class="QLabel" name="label_8"> <widget class="QLabel" name="wasted">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred"> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="textFormat">
<string>Wasted:</string> <enum>Qt::PlainText</enum>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="5"> <item row="4" column="1">
<widget class="QLabel" name="wasted"> <widget class="QLabel" name="shareRatio">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred"> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text">
<string notr="true"/>
</property>
<property name="textFormat"> <property name="textFormat">
<enum>Qt::PlainText</enum> <enum>Qt::PlainText</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="0"> <item row="1" column="2">
<widget class="QLabel" name="lbl_ratio"> <widget class="QLabel" name="label_5">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred"> <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -577,31 +507,41 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>Share Ratio:</string> <string>Uploaded:</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="1"> <item row="1" column="5">
<widget class="QLabel" name="shareRatio"> <widget class="QLabel" name="label_seeds_val">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="textFormat">
<string notr="true"/> <enum>Qt::PlainText</enum>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="lbl_elapsed">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="textFormat"> <property name="textFormat">
<enum>Qt::PlainText</enum> <enum>Qt::PlainText</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="2"> <item row="0" column="0">
<widget class="QLabel" name="label_10"> <widget class="QLabel" name="label_7">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred"> <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -609,31 +549,28 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>Reannounce In:</string> <string extracomment="Time (duration) the torrent is active (not paused)">Time Active:</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="3"> <item row="3" column="3">
<widget class="QLabel" name="reannounce_lbl"> <widget class="QLabel" name="lbl_uplimit">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text">
<string notr="true"/>
</property>
<property name="textFormat"> <property name="textFormat">
<enum>Qt::PlainText</enum> <enum>Qt::PlainText</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="4"> <item row="0" column="2">
<widget class="QLabel" name="label_last_complete"> <widget class="QLabel" name="label_eta">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred"> <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -641,26 +578,26 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>Last Seen Complete:</string> <string>ETA:</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="5"> <item row="3" column="4">
<widget class="QLabel" name="label_last_complete_val"> <widget class="QLabel" name="label_8">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string notr="true"/> <string>Wasted:</string>
</property> </property>
<property name="textFormat"> <property name="alignment">
<enum>Qt::PlainText</enum> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
@ -668,17 +605,17 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QGroupBox" name="groupTorrentInfos"> <widget class="QGroupBox" name="groupInfosBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title"> <property name="title">
<string>Information</string> <string>Information</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<property name="topMargin">
<number>4</number>
</property>
<property name="bottomMargin">
<number>2</number>
</property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label_total_size"> <widget class="QLabel" name="label_total_size">
<property name="sizePolicy"> <property name="sizePolicy">
@ -703,9 +640,6 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text">
<string notr="true"/>
</property>
<property name="textFormat"> <property name="textFormat">
<enum>Qt::PlainText</enum> <enum>Qt::PlainText</enum>
</property> </property>
@ -735,9 +669,6 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text">
<string notr="true"/>
</property>
<property name="textFormat"> <property name="textFormat">
<enum>Qt::PlainText</enum> <enum>Qt::PlainText</enum>
</property> </property>
@ -767,9 +698,6 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text">
<string notr="true"/>
</property>
<property name="textFormat"> <property name="textFormat">
<enum>Qt::PlainText</enum> <enum>Qt::PlainText</enum>
</property> </property>
@ -799,9 +727,6 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text">
<string notr="true"/>
</property>
<property name="textFormat"> <property name="textFormat">
<enum>Qt::PlainText</enum> <enum>Qt::PlainText</enum>
</property> </property>
@ -831,9 +756,6 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text">
<string notr="true"/>
</property>
<property name="textFormat"> <property name="textFormat">
<enum>Qt::PlainText</enum> <enum>Qt::PlainText</enum>
</property> </property>
@ -863,9 +785,6 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text">
<string notr="true"/>
</property>
<property name="textFormat"> <property name="textFormat">
<enum>Qt::PlainText</enum> <enum>Qt::PlainText</enum>
</property> </property>
@ -895,9 +814,6 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text">
<string notr="true"/>
</property>
<property name="textFormat"> <property name="textFormat">
<enum>Qt::PlainText</enum> <enum>Qt::PlainText</enum>
</property> </property>
@ -930,15 +846,9 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text">
<string notr="true"/>
</property>
<property name="textFormat"> <property name="textFormat">
<enum>Qt::PlainText</enum> <enum>Qt::PlainText</enum>
</property> </property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap"> <property name="wordWrap">
<bool>true</bool> <bool>true</bool>
</property> </property>
@ -1000,7 +910,7 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="page_trackers"> <widget class="QWidget" name="pageTrackers">
<layout class="QHBoxLayout" name="horizontalLayout_trackers"> <layout class="QHBoxLayout" name="horizontalLayout_trackers">
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout_10"> <layout class="QVBoxLayout" name="verticalLayout_10">
@ -1169,18 +1079,10 @@
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="speed_page"> <widget class="QWidget" name="speed_page">
<layout class="QVBoxLayout" name="speed_layout"> <layout class="QVBoxLayout" name="speed_layout"/>
</layout>
</widget> </widget>
</widget> </widget>
</item> </item>
<item>
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
</layout> </layout>
<action name="actionNot_downloaded"> <action name="actionNot_downloaded">
<property name="text"> <property name="text">

5
src/gui/properties/proptabbar.cpp

@ -39,7 +39,8 @@
PropTabBar::PropTabBar(QWidget *parent) : PropTabBar::PropTabBar(QWidget *parent) :
QHBoxLayout(parent), m_currentIndex(-1) QHBoxLayout(parent), m_currentIndex(-1)
{ {
setSpacing(2); setAlignment(Qt::AlignLeft | Qt::AlignCenter);
setSpacing(3);
m_btnGroup = new QButtonGroup(this); m_btnGroup = new QButtonGroup(this);
// General tab // General tab
QPushButton *main_infos_button = new QPushButton(GuiIconProvider::instance()->getIcon("document-properties"), tr("General"), parent); QPushButton *main_infos_button = new QPushButton(GuiIconProvider::instance()->getIcon("document-properties"), tr("General"), parent);
@ -63,7 +64,7 @@ PropTabBar::PropTabBar(QWidget *parent) :
addWidget(files_button); addWidget(files_button);
m_btnGroup->addButton(files_button, FILES_TAB); m_btnGroup->addButton(files_button, FILES_TAB);
// Spacer // Spacer
addItem(new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum)); addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Fixed));
// Speed tab // Speed tab
QPushButton *speed_button = new QPushButton(GuiIconProvider::instance()->getIcon("office-chart-line"), tr("Speed"), parent); QPushButton *speed_button = new QPushButton(GuiIconProvider::instance()->getIcon("office-chart-line"), tr("Speed"), parent);
addWidget(speed_button); addWidget(speed_button);

Loading…
Cancel
Save