Commit 58b5d4a1 authored by Francois Cartegnie's avatar Francois Cartegnie

Qt: rebase about dialog on Qtcreator

parent e6d25cc5
......@@ -86,6 +86,7 @@ nodist_SOURCES_qt4 = \
ui/sprefs_video.h \
ui/streampanel.h \
ui/messages_panel.h \
ui/about.h \
ui/sout.h
DEPS_res = \
......@@ -358,6 +359,7 @@ EXTRA_DIST += \
ui/sprefs_video.ui \
ui/streampanel.ui \
ui/messages_panel.ui \
ui/about.ui \
ui/sout.ui \
ui/vlm.ui \
$(DEPS_res)
......
......@@ -82,35 +82,28 @@ void HelpDialog::close()
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"
......@@ -124,48 +117,15 @@ AboutDialog::AboutDialog( intf_thread_t *_p_intf)
+ 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()
......
......@@ -32,6 +32,7 @@
#include "util/qvlcframe.hpp"
#include "util/singleton.hpp"
#include "ui/about.h"
class QPushButton;
class QTextBrowser;
......@@ -61,6 +62,7 @@ class AboutDialog : public QVLCDialog, public Singleton<AboutDialog>
private:
AboutDialog( intf_thread_t * );
virtual ~AboutDialog();
Ui::aboutWidget ui;
public slots:
void close();
......
<?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">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Courier'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
&lt;tr&gt;
&lt;td style=&quot;border: none;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot;-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;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot;-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;&quot;&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</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>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment