mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 02:18:42 +00:00
Rework forms layout to workaround some stylesheet issues (Qt client)
This commit is contained in:
@@ -28,6 +28,7 @@ set(${PROJECT_NAME}_SOURCES
|
||||
about.cc
|
||||
add-data.cc
|
||||
app.cc
|
||||
column-resizer.cc
|
||||
dbus-adaptor.cc
|
||||
details.cc
|
||||
favicon.cc
|
||||
@@ -67,6 +68,7 @@ set(${PROJECT_NAME}_HEADERS
|
||||
about.h
|
||||
add-data.h
|
||||
app.h
|
||||
column-resizer.h
|
||||
dbus-adaptor.h
|
||||
details.h
|
||||
favicon.h
|
||||
|
||||
82
qt/column-resizer.cc
Normal file
82
qt/column-resizer.cc
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* This file Copyright (C) 2015 Mnemosyne LLC
|
||||
*
|
||||
* It may be used under the GNU GPL versions 2 or 3
|
||||
* or any future license endorsed by Mnemosyne LLC.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <QEvent>
|
||||
#include <QGridLayout>
|
||||
#include <QTimer>
|
||||
|
||||
#include "column-resizer.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
int
|
||||
itemColumnSpan (QGridLayout * layout, const QLayoutItem * item)
|
||||
{
|
||||
for (int i = 0, count = layout->count (); i < count; ++i)
|
||||
{
|
||||
if (layout->itemAt (i) != item)
|
||||
continue;
|
||||
|
||||
int row, column, rowSpan, columnSpan;
|
||||
layout->getItemPosition (i, &row, &column, &rowSpan, &columnSpan);
|
||||
return columnSpan;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
ColumnResizer::ColumnResizer (QObject * parent):
|
||||
QObject (parent),
|
||||
myTimer (new QTimer (this)),
|
||||
myLayouts ()
|
||||
{
|
||||
myTimer->setSingleShot (true);
|
||||
connect (myTimer, SIGNAL (timeout ()), SLOT (update ()));
|
||||
}
|
||||
|
||||
void
|
||||
ColumnResizer::addLayout (QGridLayout * layout)
|
||||
{
|
||||
myLayouts << layout;
|
||||
scheduleUpdate ();
|
||||
}
|
||||
|
||||
bool
|
||||
ColumnResizer::eventFilter (QObject * object, QEvent * event)
|
||||
{
|
||||
if (event->type () == QEvent::Resize)
|
||||
scheduleUpdate ();
|
||||
return QObject::eventFilter (object, event);
|
||||
}
|
||||
|
||||
void
|
||||
ColumnResizer::update ()
|
||||
{
|
||||
int maxWidth = 0;
|
||||
foreach (QGridLayout * layout, myLayouts)
|
||||
{
|
||||
for (int i = 0, count = layout->rowCount (); i < count; ++i)
|
||||
{
|
||||
QLayoutItem * item = layout->itemAtPosition (i, 0);
|
||||
if (item == nullptr || itemColumnSpan (layout, item) > 1)
|
||||
continue;
|
||||
maxWidth = qMax (maxWidth, item->sizeHint ().width ());
|
||||
}
|
||||
}
|
||||
|
||||
foreach (QGridLayout * layout, myLayouts)
|
||||
layout->setColumnMinimumWidth (0, maxWidth);
|
||||
}
|
||||
|
||||
void
|
||||
ColumnResizer::scheduleUpdate ()
|
||||
{
|
||||
myTimer->start (0);
|
||||
}
|
||||
41
qt/column-resizer.h
Normal file
41
qt/column-resizer.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* This file Copyright (C) 2015 Mnemosyne LLC
|
||||
*
|
||||
* It may be used under the GNU GPL versions 2 or 3
|
||||
* or any future license endorsed by Mnemosyne LLC.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef QTR_COLUMN_RESIZER_H
|
||||
#define QTR_COLUMN_RESIZER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QSet>
|
||||
|
||||
class QGridLayout;
|
||||
class QTimer;
|
||||
|
||||
class ColumnResizer: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ColumnResizer (QObject * parent = nullptr);
|
||||
|
||||
void addLayout (QGridLayout * layout);
|
||||
|
||||
virtual bool eventFilter (QObject * object, QEvent * event);
|
||||
|
||||
public slots:
|
||||
void update ();
|
||||
|
||||
private:
|
||||
void scheduleUpdate ();
|
||||
|
||||
private:
|
||||
QTimer * myTimer;
|
||||
QSet<QGridLayout *> myLayouts;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <libtransmission/transmission.h>
|
||||
#include <libtransmission/utils.h> // tr_getRatio ()
|
||||
|
||||
#include "column-resizer.h"
|
||||
#include "details.h"
|
||||
#include "file-tree.h"
|
||||
#include "formatter.h"
|
||||
@@ -959,6 +960,11 @@ Details::initInfoTab ()
|
||||
{
|
||||
const int h = QFontMetrics (ui.commentBrowser->font ()).lineSpacing () * 4;
|
||||
ui.commentBrowser->setFixedHeight (h);
|
||||
|
||||
ColumnResizer * cr (new ColumnResizer (this));
|
||||
cr->addLayout (ui.activitySectionLayout);
|
||||
cr->addLayout (ui.detailsSectionLayout);
|
||||
cr->update ();
|
||||
}
|
||||
|
||||
/***
|
||||
@@ -1177,6 +1183,13 @@ Details::initOptionsTab ()
|
||||
ui.idleCombo->addItem (tr ("Seed regardless of activity"), TR_IDLELIMIT_UNLIMITED);
|
||||
ui.idleCombo->addItem (tr ("Stop seeding if idle for:"), TR_IDLELIMIT_SINGLE);
|
||||
|
||||
ColumnResizer * cr (new ColumnResizer (this));
|
||||
cr->addLayout (ui.speedSectionLayout);
|
||||
cr->addLayout (ui.seedingLimitsSectionRatioLayout);
|
||||
cr->addLayout (ui.seedingLimitsSectionIdleLayout);
|
||||
cr->addLayout (ui.peerConnectionsSectionLayout);
|
||||
cr->update ();
|
||||
|
||||
connect (ui.sessionLimitCheck, SIGNAL (clicked (bool)), SLOT (onHonorsSessionLimitsToggled (bool)));
|
||||
connect (ui.singleDownCheck, SIGNAL (clicked (bool)), SLOT (onDownloadLimitedToggled (bool)));
|
||||
connect (ui.singleDownSpin, SIGNAL (editingFinished ()), SLOT (onSpinBoxEditingFinished ()));
|
||||
|
||||
432
qt/details.ui
432
qt/details.ui
@@ -7,28 +7,12 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>505</width>
|
||||
<height>579</height>
|
||||
<height>581</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Torrent Properties</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">[tr-style~="form-section"]
|
||||
{
|
||||
font-weight: bold;
|
||||
margin-top: 12px;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
[tr-style~="form-section"][tr-style~="first"]
|
||||
{
|
||||
margin-top: 0;
|
||||
}
|
||||
[tr-style~="form-label"]
|
||||
{
|
||||
margin-left: 18px;
|
||||
}</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="dialogLayout">
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabs">
|
||||
@@ -39,28 +23,30 @@
|
||||
<attribute name="title">
|
||||
<string>Information</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="infoTabLayout" rowstretch="0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1" columnstretch="0,1">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<layout class="QVBoxLayout" name="infoTabLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="activitySectionLabel">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font-weight:bold</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Activity</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-section first</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="activitySectionLayout" columnstretch="0,1">
|
||||
<property name="leftMargin">
|
||||
<number>18</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="haveLabel">
|
||||
<property name="text">
|
||||
<string>Have:</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<item row="0" column="1">
|
||||
<widget class="SqueezeLabel" name="haveValueLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Preferred">
|
||||
@@ -79,17 +65,14 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="availabilityLabel">
|
||||
<property name="text">
|
||||
<string>Availability:</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<item row="1" column="1">
|
||||
<widget class="SqueezeLabel" name="availabilityValueLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Preferred">
|
||||
@@ -108,17 +91,14 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="uploadedLabel">
|
||||
<property name="text">
|
||||
<string>Uploaded:</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<item row="2" column="1">
|
||||
<widget class="SqueezeLabel" name="uploadedValueLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Preferred">
|
||||
@@ -137,17 +117,14 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="downloadedLabel">
|
||||
<property name="text">
|
||||
<string>Downloaded:</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<item row="3" column="1">
|
||||
<widget class="SqueezeLabel" name="downloadedValueLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Preferred">
|
||||
@@ -166,17 +143,14 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="stateLabel">
|
||||
<property name="text">
|
||||
<string>State:</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<item row="4" column="1">
|
||||
<widget class="SqueezeLabel" name="stateValueLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Preferred">
|
||||
@@ -195,17 +169,14 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="runningTimeLabel">
|
||||
<property name="text">
|
||||
<string>Running time:</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<item row="5" column="1">
|
||||
<widget class="SqueezeLabel" name="runningTimeValueLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Preferred">
|
||||
@@ -224,17 +195,14 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="remainingTimeLabel">
|
||||
<property name="text">
|
||||
<string>Remaining time:</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<item row="6" column="1">
|
||||
<widget class="SqueezeLabel" name="remainingTimeValueLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Preferred">
|
||||
@@ -253,17 +221,14 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="lastActivityLabel">
|
||||
<property name="text">
|
||||
<string>Last activity:</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<item row="7" column="1">
|
||||
<widget class="SqueezeLabel" name="lastActivityValueLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Preferred">
|
||||
@@ -282,17 +247,14 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="errorLabel">
|
||||
<property name="text">
|
||||
<string>Error:</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<item row="8" column="1">
|
||||
<widget class="SqueezeLabel" name="errorValueLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Preferred">
|
||||
@@ -311,27 +273,40 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0" colspan="2">
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="detailsSectionSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>1</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="detailsSectionLabel">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font-weight:bold</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Details</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-section</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QLabel" name="sizeLabel">
|
||||
<property name="text">
|
||||
<string>Size:</string>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="detailsSectionLayout" columnstretch="0,1">
|
||||
<property name="leftMargin">
|
||||
<number>18</number>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="1">
|
||||
<item row="0" column="1">
|
||||
<widget class="SqueezeLabel" name="sizeValueLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Preferred">
|
||||
@@ -350,17 +325,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="0">
|
||||
<widget class="QLabel" name="locationLabel">
|
||||
<property name="text">
|
||||
<string>Location:</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="1">
|
||||
<item row="1" column="1">
|
||||
<widget class="SqueezeLabel" name="locationValueLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Preferred">
|
||||
@@ -379,75 +344,28 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="0">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="hashLabel">
|
||||
<property name="text">
|
||||
<string>Hash:</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="1">
|
||||
<widget class="SqueezeLabel" name="hashValueLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="0">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="privacyLabel">
|
||||
<property name="text">
|
||||
<string>Privacy:</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="1">
|
||||
<widget class="SqueezeLabel" name="privacyValueLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::NoTextInteraction</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="15" column="0">
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="originLabel">
|
||||
<property name="text">
|
||||
<string>Origin:</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="15" column="1">
|
||||
<item row="4" column="1">
|
||||
<widget class="SqueezeLabel" name="originValueLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Preferred">
|
||||
@@ -466,7 +384,59 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="16" column="0">
|
||||
<item row="3" column="1">
|
||||
<widget class="SqueezeLabel" name="privacyValueLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::NoTextInteraction</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="sizeLabel">
|
||||
<property name="text">
|
||||
<string>Size:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="locationLabel">
|
||||
<property name="text">
|
||||
<string>Location:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="SqueezeLabel" name="hashValueLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="commentLabel">
|
||||
<property name="text">
|
||||
<string>Comment:</string>
|
||||
@@ -474,12 +444,9 @@
|
||||
<property name="buddy">
|
||||
<cstring>commentBrowser</cstring>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="16" column="1">
|
||||
<item row="5" column="1">
|
||||
<widget class="QTextBrowser" name="commentBrowser">
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||
@@ -487,6 +454,8 @@
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="peersTab">
|
||||
<attribute name="title">
|
||||
@@ -608,38 +577,37 @@
|
||||
<attribute name="title">
|
||||
<string>Options</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="optionsTabLayout" columnstretch="0,1">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<layout class="QVBoxLayout" name="optionsTabLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="speedSectionLabel">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font-weight:bold</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Speed</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-section first</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="speedSectionLayout" columnstretch="0,1">
|
||||
<property name="leftMargin">
|
||||
<number>18</number>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="sessionLimitCheck">
|
||||
<property name="text">
|
||||
<string>Honor global &limits</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="singleDownCheck">
|
||||
<property name="text">
|
||||
<string>Limit &download speed:</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="singleDownSpin">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
@@ -652,17 +620,14 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="singleUpCheck">
|
||||
<property name="text">
|
||||
<string>Limit &upload speed:</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<item row="2" column="1">
|
||||
<widget class="QSpinBox" name="singleUpSpin">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
@@ -675,7 +640,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="bandwidthPriorityLabel">
|
||||
<property name="text">
|
||||
<string>Torrent &priority:</string>
|
||||
@@ -683,25 +648,45 @@
|
||||
<property name="buddy">
|
||||
<cstring>bandwidthPriorityCombo</cstring>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="bandwidthPriorityCombo"/>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2">
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="seedingLimitsSectionSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>1</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="seedingLimitsSectionLabel">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font-weight:bold</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Seeding Limits</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-section</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="seedingLimitsSectionRatioLayout" columnstretch="0,1,0">
|
||||
<property name="leftMargin">
|
||||
<number>18</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="ratioLabel">
|
||||
<property name="text">
|
||||
<string>&Ratio:</string>
|
||||
@@ -709,17 +694,12 @@
|
||||
<property name="buddy">
|
||||
<cstring>ratioCombo</cstring>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<layout class="QHBoxLayout" name="ratioValueLayout">
|
||||
<item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="ratioCombo"/>
|
||||
</item>
|
||||
<item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QDoubleSpinBox" name="ratioSpin">
|
||||
<property name="minimum">
|
||||
<double>0.500000000000000</double>
|
||||
@@ -731,7 +711,12 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="seedingLimitsSectionIdleLayout" columnstretch="0,1,0">
|
||||
<property name="leftMargin">
|
||||
<number>18</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="idleLabel">
|
||||
<property name="text">
|
||||
<string>&Idle:</string>
|
||||
@@ -739,17 +724,12 @@
|
||||
<property name="buddy">
|
||||
<cstring>idleCombo</cstring>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<layout class="QHBoxLayout" name="idleValueLayout">
|
||||
<item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="idleCombo"/>
|
||||
</item>
|
||||
<item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QSpinBox" name="idleSpin">
|
||||
<property name="suffix">
|
||||
<string notr="true"> minute(s)</string>
|
||||
@@ -767,17 +747,38 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="8" column="0" colspan="2">
|
||||
<item>
|
||||
<spacer name="peerConnectionsSectionSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>1</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="peerConnectionsSectionLabel">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font-weight:bold</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Peer Connections</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-section</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="peerConnectionsSectionLayout" columnstretch="0,1">
|
||||
<property name="leftMargin">
|
||||
<number>18</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="peerLimitLabel">
|
||||
<property name="text">
|
||||
<string>&Maximum peers:</string>
|
||||
@@ -785,12 +786,9 @@
|
||||
<property name="buddy">
|
||||
<cstring>peerLimitSpin</cstring>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="peerLimitSpin">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
@@ -803,7 +801,9 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0" colspan="2">
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="optionsTabBottomSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
@@ -844,34 +844,6 @@
|
||||
<header>file-tree.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>tabs</tabstop>
|
||||
<tabstop>errorValueLabel</tabstop>
|
||||
<tabstop>locationValueLabel</tabstop>
|
||||
<tabstop>hashValueLabel</tabstop>
|
||||
<tabstop>originValueLabel</tabstop>
|
||||
<tabstop>commentBrowser</tabstop>
|
||||
<tabstop>peersView</tabstop>
|
||||
<tabstop>trackersView</tabstop>
|
||||
<tabstop>addTrackerButton</tabstop>
|
||||
<tabstop>editTrackerButton</tabstop>
|
||||
<tabstop>removeTrackerButton</tabstop>
|
||||
<tabstop>showTrackerScrapesCheck</tabstop>
|
||||
<tabstop>showBackupTrackersCheck</tabstop>
|
||||
<tabstop>filesView</tabstop>
|
||||
<tabstop>sessionLimitCheck</tabstop>
|
||||
<tabstop>singleDownCheck</tabstop>
|
||||
<tabstop>singleDownSpin</tabstop>
|
||||
<tabstop>singleUpCheck</tabstop>
|
||||
<tabstop>singleUpSpin</tabstop>
|
||||
<tabstop>bandwidthPriorityCombo</tabstop>
|
||||
<tabstop>ratioCombo</tabstop>
|
||||
<tabstop>ratioSpin</tabstop>
|
||||
<tabstop>idleCombo</tabstop>
|
||||
<tabstop>idleSpin</tabstop>
|
||||
<tabstop>peerLimitSpin</tabstop>
|
||||
<tabstop>dialogButtons</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <libtransmission/makemeta.h>
|
||||
#include <libtransmission/utils.h>
|
||||
|
||||
#include "column-resizer.h"
|
||||
#include "formatter.h"
|
||||
#include "make-dialog.h"
|
||||
#include "session.h"
|
||||
@@ -220,14 +221,19 @@ MakeDialog::MakeDialog (Session& session, QWidget * parent):
|
||||
{
|
||||
ui.setupUi (this);
|
||||
|
||||
resize (minimumSizeHint ());
|
||||
|
||||
ui.destinationButton->setMode (TrPathButton::DirectoryMode);
|
||||
ui.destinationButton->setPath (QDir::homePath ());
|
||||
|
||||
ui.sourceFolderButton->setMode (TrPathButton::DirectoryMode);
|
||||
ui.sourceFileButton->setMode (TrPathButton::FileMode);
|
||||
|
||||
ColumnResizer * cr (new ColumnResizer (this));
|
||||
cr->addLayout (ui.filesSectionLayout);
|
||||
cr->addLayout (ui.propertiesSectionLayout);
|
||||
cr->update ();
|
||||
|
||||
resize (minimumSizeHint ());
|
||||
|
||||
connect (ui.sourceFolderRadio, SIGNAL (toggled (bool)), this, SLOT (onSourceChanged ()));
|
||||
connect (ui.sourceFolderButton, SIGNAL (pathChanged (QString)), this, SLOT (onSourceChanged ()));
|
||||
connect (ui.sourceFileRadio, SIGNAL (toggled (bool)), this, SLOT (onSourceChanged ()));
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>566</width>
|
||||
<height>417</height>
|
||||
<height>426</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="acceptDrops">
|
||||
@@ -16,34 +16,23 @@
|
||||
<property name="windowTitle">
|
||||
<string>New Torrent</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">[tr-style~="form-section"]
|
||||
{
|
||||
font-weight: bold;
|
||||
margin-top: 12px;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
[tr-style~="form-section"][tr-style~="first"]
|
||||
{
|
||||
margin-top: 0;
|
||||
}
|
||||
[tr-style~="form-label"]
|
||||
{
|
||||
margin-left: 18px;
|
||||
}</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="dialogLayout">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<layout class="QVBoxLayout" name="dialogLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="filesSectionLabel">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font-weight:bold</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Files</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-section first</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="filesSectionLayout" columnstretch="0,1">
|
||||
<property name="leftMargin">
|
||||
<number>18</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="destinationLabel">
|
||||
<property name="text">
|
||||
<string>Sa&ve to:</string>
|
||||
@@ -51,32 +40,26 @@
|
||||
<property name="buddy">
|
||||
<cstring>destinationButton</cstring>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<item row="0" column="1">
|
||||
<widget class="TrPathButton" name="destinationButton"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="1" column="0">
|
||||
<widget class="QRadioButton" name="sourceFolderRadio">
|
||||
<property name="text">
|
||||
<string>Source f&older:</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<item row="1" column="1">
|
||||
<widget class="TrPathButton" name="sourceFolderButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<item row="2" column="0">
|
||||
<widget class="QRadioButton" name="sourceFileRadio">
|
||||
<property name="text">
|
||||
<string>Source &file:</string>
|
||||
@@ -84,32 +67,52 @@
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<item row="2" column="1">
|
||||
<widget class="TrPathButton" name="sourceFileButton"/>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="sourceSizeLabel">
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2">
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="propertiesSectionSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>1</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="propertiesSectionLabel">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font-weight:bold</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Properties</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-section</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="propertiesSectionLayout" columnstretch="0,1">
|
||||
<property name="leftMargin">
|
||||
<number>18</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="trackersLabel">
|
||||
<property name="text">
|
||||
<string>&Trackers:</string>
|
||||
@@ -120,12 +123,9 @@
|
||||
<property name="buddy">
|
||||
<cstring>trackersEdit</cstring>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<item row="0" column="1">
|
||||
<widget class="QPlainTextEdit" name="trackersEdit">
|
||||
<property name="tabChangesFocus">
|
||||
<bool>true</bool>
|
||||
@@ -135,7 +135,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="trackersDescriptionLabel">
|
||||
<property name="text">
|
||||
<string>To add a backup URL, add it on the line after the primary URL.
|
||||
@@ -143,34 +143,30 @@ To add another primary URL, add it after a blank line.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="commentCheck">
|
||||
<property name="text">
|
||||
<string>Co&mment:</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="commentEdit">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0" colspan="2">
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="privateCheck">
|
||||
<property name="text">
|
||||
<string>&Private torrent</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0" colspan="2">
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="dialogButtons">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
|
||||
@@ -63,6 +63,7 @@ win32|macx:RESOURCES += icons/Faenza/Faenza.qrc
|
||||
SOURCES += about.cc \
|
||||
add-data.cc \
|
||||
app.cc \
|
||||
column-resizer.cc \
|
||||
dbus-adaptor.cc \
|
||||
details.cc \
|
||||
favicon.cc \
|
||||
|
||||
@@ -6,84 +6,62 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>339</width>
|
||||
<height>151</height>
|
||||
<width>333</width>
|
||||
<height>155</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Set Torrent Location</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">[tr-style~="form-section"]
|
||||
{
|
||||
font-weight: bold;
|
||||
margin-top: 12px;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
[tr-style~="form-section"][tr-style~="first"]
|
||||
{
|
||||
margin-top: 0;
|
||||
}
|
||||
[tr-style~="form-label"]
|
||||
{
|
||||
margin-left: 18px;
|
||||
}
|
||||
#newLocationStack
|
||||
{
|
||||
min-width: 15em;
|
||||
}</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="dialogLayout">
|
||||
<layout class="QVBoxLayout" name="dialogLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetFixedSize</enum>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<item>
|
||||
<widget class="QLabel" name="setLocationSectionLabel">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font-weight:bold</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Set Location</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-section first</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="setLocationSectionLayout" columnstretch="0,1">
|
||||
<property name="leftMargin">
|
||||
<number>18</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="newLocationLabel">
|
||||
<property name="text">
|
||||
<string>New &location:</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<item row="0" column="1">
|
||||
<widget class="QStackedWidget" name="newLocationStack">
|
||||
<widget class="TrPathButton" name="newLocationButton"/>
|
||||
<widget class="QLineEdit" name="newLocationEdit"/>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QRadioButton" name="moveDataRadio">
|
||||
<property name="text">
|
||||
<string>&Move from the current folder</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QRadioButton" name="findDataRadio">
|
||||
<property name="text">
|
||||
<string>Local data is &already there</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="dialogButtons">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
|
||||
@@ -6,64 +6,47 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>248</width>
|
||||
<height>263</height>
|
||||
<width>250</width>
|
||||
<height>265</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Change Session</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">[tr-style~="form-section"]
|
||||
{
|
||||
font-weight: bold;
|
||||
margin-top: 12px;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
[tr-style~="form-section"][tr-style~="first"]
|
||||
{
|
||||
margin-top: 0;
|
||||
}
|
||||
[tr-style~="form-label"]
|
||||
{
|
||||
margin-left: 18px;
|
||||
}</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="dialogLayout">
|
||||
<layout class="QVBoxLayout" name="dialogLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetFixedSize</enum>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<item>
|
||||
<widget class="QLabel" name="sourceSectionLabel">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font-weight:bold</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Source</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-section first</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="sourceSectionLayout" columnstretch="0,1">
|
||||
<property name="leftMargin">
|
||||
<number>18</number>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QRadioButton" name="localSessionRadio">
|
||||
<property name="text">
|
||||
<string>Start &Local Session</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QRadioButton" name="remoteSessionRadio">
|
||||
<property name="text">
|
||||
<string>Connect to &Remote Session</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="hostLabel">
|
||||
<property name="text">
|
||||
<string>&Host:</string>
|
||||
@@ -71,15 +54,12 @@
|
||||
<property name="buddy">
|
||||
<cstring>hostEdit</cstring>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="hostEdit"/>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="portLabel">
|
||||
<property name="text">
|
||||
<string>&Port:</string>
|
||||
@@ -87,12 +67,9 @@
|
||||
<property name="buddy">
|
||||
<cstring>portSpin</cstring>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<item row="3" column="1">
|
||||
<widget class="QSpinBox" name="portSpin">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
@@ -102,17 +79,14 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2">
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="authCheck">
|
||||
<property name="text">
|
||||
<string>&Authentication required</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="usernameLabel">
|
||||
<property name="text">
|
||||
<string>&Username:</string>
|
||||
@@ -120,15 +94,12 @@
|
||||
<property name="buddy">
|
||||
<cstring>usernameEdit</cstring>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<item row="5" column="1">
|
||||
<widget class="QLineEdit" name="usernameEdit"/>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="passwordLabel">
|
||||
<property name="text">
|
||||
<string>Pass&word:</string>
|
||||
@@ -136,19 +107,18 @@
|
||||
<property name="buddy">
|
||||
<cstring>passwordEdit</cstring>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<item row="6" column="1">
|
||||
<widget class="QLineEdit" name="passwordEdit">
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0" colspan="2">
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="dialogButtons">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <QTimer>
|
||||
|
||||
#include "column-resizer.h"
|
||||
#include "formatter.h"
|
||||
#include "session.h"
|
||||
#include "stats-dialog.h"
|
||||
@@ -25,6 +26,11 @@ StatsDialog::StatsDialog (Session& session, QWidget * parent):
|
||||
{
|
||||
ui.setupUi (this);
|
||||
|
||||
ColumnResizer * cr (new ColumnResizer (this));
|
||||
cr->addLayout (ui.currentSessionSectionLayout);
|
||||
cr->addLayout (ui.totalSectionLayout);
|
||||
cr->update ();
|
||||
|
||||
myTimer->setSingleShot (false);
|
||||
connect (myTimer, SIGNAL (timeout ()), &mySession, SLOT (refreshSessionStats ()));
|
||||
|
||||
|
||||
@@ -6,165 +6,187 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>139</width>
|
||||
<height>303</height>
|
||||
<width>138</width>
|
||||
<height>315</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Statistics</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">[tr-style~="form-section"]
|
||||
{
|
||||
font-weight: bold;
|
||||
margin-top: 12px;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
[tr-style~="form-section"][tr-style~="first"]
|
||||
{
|
||||
margin-top: 0;
|
||||
}
|
||||
[tr-style~="form-label"]
|
||||
{
|
||||
margin-left: 18px;
|
||||
}</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="dialogLayout">
|
||||
<layout class="QVBoxLayout" name="dialogLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetFixedSize</enum>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<item>
|
||||
<widget class="QLabel" name="currentSessionSectionLabel">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font-weight:bold</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Current Session</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-section first</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="currentSessionSectionLayout" columnstretch="0,1">
|
||||
<property name="leftMargin">
|
||||
<number>18</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="currentUploadedLabel">
|
||||
<property name="text">
|
||||
<string>Uploaded:</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="currentUploadedValueLabel">
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="currentUploadedValueLabel"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="currentDownloadedLabel">
|
||||
<property name="text">
|
||||
<string>Downloaded:</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="currentDownloadedValueLabel">
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="currentDownloadedValueLabel"/>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="currentRatioLabel">
|
||||
<property name="text">
|
||||
<string>Ratio:</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="currentRatioValueLabel">
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="currentRatioValueLabel"/>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="currentDurationLabel">
|
||||
<property name="text">
|
||||
<string>Duration:</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="currentDurationValueLabel">
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="currentDurationValueLabel"/>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2">
|
||||
<item>
|
||||
<spacer name="totalSectionSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>1</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="totalSectionLabel">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font-weight:bold</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Total</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-section</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="totalSectionLayout" columnstretch="0,1">
|
||||
<property name="leftMargin">
|
||||
<number>18</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="startCountLabel">
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="totalUploadedLabel">
|
||||
<property name="text">
|
||||
<string>Uploaded:</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="totalUploadedValueLabel">
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QLabel" name="totalUploadedValueLabel"/>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="totalDownloadedLabel">
|
||||
<property name="text">
|
||||
<string>Downloaded:</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="totalDownloadedValueLabel">
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QLabel" name="totalDownloadedValueLabel"/>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="totalRatioLabel">
|
||||
<property name="text">
|
||||
<string>Ratio:</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="totalRatioValueLabel">
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QLabel" name="totalRatioValueLabel"/>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="totalDurationLabel">
|
||||
<property name="text">
|
||||
<string>Duration:</string>
|
||||
</property>
|
||||
<property name="tr-style" stdset="0">
|
||||
<string notr="true">form-label</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="totalDurationValueLabel">
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<widget class="QLabel" name="totalDurationValueLabel"/>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="11" column="0" colspan="2">
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="dialogButtons">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
|
||||
Reference in New Issue
Block a user