)
tr_qt_wrap_ui(${PROJECT_NAME}_UI_SOURCES
+ about.ui
details.ui
mainwin.ui
session-dialog.ui
QDialog (parent, Qt::Dialog),
myLicenseDialog (new LicenseDialog (this))
{
- setWindowTitle (tr ("About Transmission"));
- QLabel * l;
- QVBoxLayout * v = new QVBoxLayout (this);
+ ui.setupUi (this);
- l = new QLabel;
- l->setPixmap (QApplication::windowIcon ().pixmap (48));
- l->setAlignment (Qt::AlignCenter);
- v->addWidget (l);
-
- QFont f (font ());
- f.setWeight (QFont::Bold);
- f.setPointSize (int (f.pointSize () * 1.2));
- l = new QLabel (tr ("<big>Transmission %1</big>").arg (QString::fromUtf8 (LONG_VERSION_STRING)));
- l->setAlignment (Qt::AlignCenter);
- l->setFont (f);
- l->setMargin (8);
- v->addWidget (l);
-
- l = new QLabel (tr ("A fast and easy BitTorrent client"));
- l->setStyleSheet (QString::fromUtf8 ("text-align: center"));
- l->setAlignment (Qt::AlignCenter);
- v->addWidget (l);
-
- l = new QLabel (tr ("Copyright (c) The Transmission Project"));
- l->setAlignment (Qt::AlignCenter);
- v->addWidget (l);
-
- l = new QLabel (QString::fromUtf8 ("<a href=\"http://www.transmissionbt.com/\">http://www.transmissionbt.com/</a>"));
- l->setOpenExternalLinks (true);
- l->setAlignment (Qt::AlignCenter);
- v->addWidget (l);
-
- v->addSpacing (HIG::PAD_BIG);
+ ui.iconLabel->setPixmap (QApplication::windowIcon ().pixmap (48));
+ ui.titleLabel->setText (tr ("<big><b>Transmission %1</b></big>").arg (QString::fromUtf8 (LONG_VERSION_STRING)));
QPushButton * b;
- QDialogButtonBox * box = new QDialogButtonBox;
b = new QPushButton (tr ("C&redits"), this);
- box->addButton (b, QDialogButtonBox::ActionRole);
+ ui.dialogButtons->addButton (b, QDialogButtonBox::ActionRole);
connect (b, SIGNAL (clicked ()), this, SLOT (showCredits ()));
b = new QPushButton (tr ("&License"), this);
- box->addButton (b, QDialogButtonBox::ActionRole);
+ ui.dialogButtons->addButton (b, QDialogButtonBox::ActionRole);
connect (b, SIGNAL (clicked ()), myLicenseDialog, SLOT (show ()));
- box->addButton (QDialogButtonBox::Close);
- box->setCenterButtons (true);
- v->addWidget (box);
- connect (box, SIGNAL (rejected ()), this, SLOT (hide ()));
+ ui.dialogButtons->button (QDialogButtonBox::Close)->setDefault (true);
}
void
#include <QDialog>
+#include "ui_about.h"
+
class AboutDialog: public QDialog
{
Q_OBJECT
- private:
- QDialog * myLicenseDialog;
-
public:
AboutDialog (QWidget * parent = 0);
~AboutDialog () {}
- QWidget * createAboutTab ();
- QWidget * createAuthorsTab ();
- QWidget * createLicenseTab ();
public slots:
void showCredits ();
+ private:
+ QDialog * myLicenseDialog;
+ Ui::AboutDialog ui;
};
#endif
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>AboutDialog</class>
+ <widget class="QDialog" name="AboutDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>249</width>
+ <height>191</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>About Transmission</string>
+ </property>
+ <layout class="QVBoxLayout" name="dialogLayout">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetFixedSize</enum>
+ </property>
+ <item>
+ <widget class="QLabel" name="iconLabel">
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="titleLabel">
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ <property name="margin">
+ <number>8</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="descriptionLabel">
+ <property name="text">
+ <string>A fast and easy BitTorrent client</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="copyrightsLabel">
+ <property name="text">
+ <string>Copyright (c) The Transmission Project</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="linkLabel">
+ <property name="text">
+ <string><a href="http://www.transmissionbt.com/">http://www.transmissionbt.com/</a></string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ <property name="openExternalLinks">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="dialogButtonsSpacer">
+ <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>6</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="dialogButtons">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Close</set>
+ </property>
+ <property name="centerButtons">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>dialogButtons</sender>
+ <signal>accepted()</signal>
+ <receiver>AboutDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>248</x>
+ <y>254</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>157</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>dialogButtons</sender>
+ <signal>rejected()</signal>
+ <receiver>AboutDialog</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>316</x>
+ <y>260</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>286</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
translations/transmission_ru.ts \
translations/transmission_uk.ts
-FORMS += details.ui \
+FORMS += about.ui \
+ details.ui \
mainwin.ui \
session-dialog.ui \
stats-dialog.ui