AboutDialog::AboutDialog( intf_thread_t *_p_intf)
: QVLCDialog( (QWidget*)_p_intf->p_sys->p_mi, _p_intf )
{
+ /* Build UI */
+ ui.setupUi( this );
+
setWindowTitle( qtr( "About" ) );
setWindowRole( "vlc-about" );
resize( 600, 500 );
setMinimumSize( 600, 500 );
setWindowModality( Qt::WindowModal );
- QGridLayout *layout = new QGridLayout( this );
- QTabWidget *tab = new QTabWidget( this );
-
- QPushButton *closeButton = new QPushButton( qtr( "&Close" ) );
- closeButton->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
- closeButton->setDefault( true );
+ CONNECT( ui.closeButtonBox, rejected(), this, close() );
+ ui.closeButtonBox->setFocus();
- QLabel *introduction = new QLabel(
+ ui.introduction->setText(
qtr( "VLC media player" ) + qfu( " " VERSION_MESSAGE ) );
- QLabel *iconVLC = new QLabel;
+
if( QDate::currentDate().dayOfYear() >= 354 )
- iconVLC->setPixmap( QPixmap( ":/logo/vlc48-christmas.png" ) );
+ ui.iconVLC->setPixmap( QPixmap( ":/logo/vlc128-christmas.png" ) );
else
- iconVLC->setPixmap( QPixmap( ":/logo/vlc48.png" ) );
- layout->addWidget( iconVLC, 0, 0, 1, 1 );
- layout->addWidget( introduction, 0, 1, 1, 7 );
- layout->addWidget( tab, 1, 0, 1, 8 );
- layout->addWidget( closeButton, 2, 6, 1, 2 );
+ ui.iconVLC->setPixmap( QPixmap( ":/logo/vlc128.png" ) );
/* Main Introduction */
- QWidget *infoWidget = new QWidget( this );
- QHBoxLayout *infoLayout = new QHBoxLayout( infoWidget );
- QLabel *infoLabel = new QLabel(
+ ui.infoLabel->setText(
qtr( "VLC media player is a free media player, "
"encoder and streamer that can read from files, "
"CDs, DVDs, network streams, capture cards and even more!\n"
+ qtr( "Copyright (C) " ) + COPYRIGHT_YEARS
+ qtr( " by the VideoLAN Team.\n" )
+ "vlc@videolan.org, http://www.videolan.org" );
- infoLabel->setWordWrap( infoLabel );
-
- QLabel *iconVLC2 = new QLabel;
- if( QDate::currentDate().dayOfYear() >= 354 )
- iconVLC2->setPixmap( QPixmap( ":/logo/vlc128-christmas.png" ) );
- else
- iconVLC2->setPixmap( QPixmap( ":/logo/vlc128.png" ) );
- infoLayout->addWidget( iconVLC2 );
- infoLayout->addWidget( infoLabel );
/* GPL License */
- QTextEdit *licenseEdit = new QTextEdit( this );
- licenseEdit->setText( qfu( psz_license ) );
- licenseEdit->setReadOnly( true );
+ ui.licenseEdit->setText( qfu( psz_license ) );
/* People who helped */
- QWidget *thanksWidget = new QWidget( this );
- QVBoxLayout *thanksLayout = new QVBoxLayout( thanksWidget );
-
- QLabel *thanksLabel = new QLabel( qtr( "We would like to thank the whole "
- "VLC community, the testers, our users and the following people "
- "(and the missing ones...) for their collaboration to "
- "create the best free software." ) );
- thanksLabel->setWordWrap( true );
- thanksLayout->addWidget( thanksLabel );
- QTextEdit *thanksEdit = new QTextEdit( this );
- thanksEdit->setText( qfu( psz_thanks ) );
- thanksEdit->setReadOnly( true );
- thanksLayout->addWidget( thanksEdit );
+ ui.thanksEdit->setText( qfu( psz_thanks ) );
/* People who wrote the software */
- QTextEdit *authorsEdit = new QTextEdit( this );
- authorsEdit->setText( qfu( psz_authors ) );
- authorsEdit->setReadOnly( true );
-
- /* add the tabs to the Tabwidget */
- tab->addTab( infoWidget, qtr( "About" ) );
- tab->addTab( authorsEdit, qtr( "Authors" ) );
- tab->addTab( thanksWidget, qtr("Thanks") );
- tab->addTab( licenseEdit, qtr("License") );
-
- BUTTONACT( closeButton, close() );
+ ui.authorsEdit->setText( qfu( psz_authors ) );
}
AboutDialog::~AboutDialog()
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>aboutWidget</class>
+ <widget class="QWidget" name="aboutWidget">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>520</width>
+ <height>357</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>About</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QTabWidget" name="tabWidget">
+ <property name="currentIndex">
+ <number>0</number>
+ </property>
+ <widget class="QWidget" name="tab">
+ <attribute name="title">
+ <string>Version</string>
+ </attribute>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="0" column="1">
+ <widget class="QLabel" name="introduction">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>40</height>
+ </size>
+ </property>
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string notr="true">introduction</string>
+ </property>
+ <property name="textInteractionFlags">
+ <set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLabel" name="infoLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string notr="true">infoLabel</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ <property name="textInteractionFlags">
+ <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" rowspan="2">
+ <widget class="QLabel" name="iconVLC">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string notr="true">iconVLC</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="tab_2">
+ <attribute name="title">
+ <string>Authors</string>
+ </attribute>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QTextEdit" name="authorsEdit">
+ <property name="textInteractionFlags">
+ <set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="tab_3">
+ <attribute name="title">
+ <string>Thanks</string>
+ </attribute>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>We would like to thank the whole VLC community, the testers, our users and the following people (and the missing ones...) for their collaboration to create the best free software.</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QTextEdit" name="thanksEdit">
+ <property name="textInteractionFlags">
+ <set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="tab_4">
+ <attribute name="title">
+ <string>Licence</string>
+ </attribute>
+ <layout class="QVBoxLayout" name="verticalLayout_3">
+ <item>
+ <widget class="QTextEdit" name="licenseEdit">
+ <property name="font">
+ <font>
+ <family>Courier</family>
+ <pointsize>9</pointsize>
+ </font>
+ </property>
+ <property name="lineWrapMode">
+ <enum>QTextEdit::NoWrap</enum>
+ </property>
+ <property name="html">
+ <string notr="true"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+<html><head><meta name="qrichtext" content="1" /><style type="text/css">
+p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'Courier'; font-size:9pt; font-weight:400; font-style:normal;">
+<table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;">
+<tr>
+<td style="border: none;">
+<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
+<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;"></p>
+<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;"></p></td></tr></table></body></html></string>
+ </property>
+ <property name="acceptRichText">
+ <bool>false</bool>
+ </property>
+ <property name="textInteractionFlags">
+ <set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QDialogButtonBox" name="closeButtonBox">
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Close</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>