[vlmc-devel] commit: Introduce a new dialog showed before VLMC starts (only in release). (Ludovic Fauvet )
git at videolan.org
git at videolan.org
Sat Mar 27 16:42:29 CET 2010
vlmc | branch: master | Ludovic Fauvet <etix at l0cal.com> | Sat Mar 27 16:38:42 2010 +0100| [9ec781f12dc9f42318d7a8a778715759bd831130] | committer: Ludovic Fauvet
Introduce a new dialog showed before VLMC starts (only in release).
The dialog contains a warning about the current pre-alpha state of VLMC.
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=9ec781f12dc9f42318d7a8a778715759bd831130
---
src/CMakeLists.txt | 3 +
src/Gui/IntroDialog.cpp | 44 +++++++++++++++++++++
src/Gui/IntroDialog.h | 41 +++++++++++++++++++
src/Gui/ui/IntroDialog.ui | 95 +++++++++++++++++++++++++++++++++++++++++++++
src/Main/guimain.cpp | 7 +++
5 files changed, 190 insertions(+), 0 deletions(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d7ed6aa..ae50d49 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -141,6 +141,7 @@ ELSE(NOT WITH_GUI)
Gui/ClickableLabel.cpp
Gui/ClipProperty.cpp
Gui/DockWidgetManager.cpp
+ Gui/IntroDialog.cpp
Gui/LanguageHelper.cpp
Gui/preview/LCDTimecode.cpp
Gui/MainWindow.cpp
@@ -194,6 +195,7 @@ ELSE(NOT WITH_GUI)
Gui/DockWidgetManager.h
Gui/export/RendererSettings.h
Gui/import/ImportController.h
+ Gui/IntroDialog.h
Gui/LanguageHelper.h
Gui/import/TagWidget.h
Gui/library/ListViewController.h
@@ -240,6 +242,7 @@ ELSE(NOT WITH_GUI)
Gui/library/ui/StackViewNavController.ui
Gui/ui/About.ui
Gui/ui/ClipProperty.ui
+ Gui/ui/IntroDialog.ui
Gui/ui/MainWindow.ui
Gui/preview/ui/PreviewWidget.ui
Gui/import/ui/TagWidget.ui
diff --git a/src/Gui/IntroDialog.cpp b/src/Gui/IntroDialog.cpp
new file mode 100644
index 0000000..f85dfcf
--- /dev/null
+++ b/src/Gui/IntroDialog.cpp
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * IntroDialog.cpp: Introduction dialog
+ *****************************************************************************
+ * Copyright (C) 2010 the VLMC team
+ *
+ * Authors: Ludovic Fauvet <etix at l0cal.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#include "IntroDialog.h"
+
+IntroDialog::IntroDialog( QWidget *parent ) : QDialog( parent )
+{
+ ui.setupUi(this);
+
+ connect( ui.pushButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
+}
+
+void
+IntroDialog::changeEvent( QEvent *e )
+{
+ QDialog::changeEvent( e );
+ switch ( e->type() )
+ {
+ case QEvent::LanguageChange:
+ ui.retranslateUi( this );
+ break;
+ default:
+ break;
+ }
+}
diff --git a/src/Gui/IntroDialog.h b/src/Gui/IntroDialog.h
new file mode 100644
index 0000000..49563f3
--- /dev/null
+++ b/src/Gui/IntroDialog.h
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * IntroDialog.h: Introduction dialog
+ *****************************************************************************
+ * Copyright (C) 2010 the VLMC team
+ *
+ * Authors: Ludovic Fauvet <etix at l0cal.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef INTRODIALOG_H
+#define INTRODIALOG_H
+
+#include "ui_IntroDialog.h"
+
+class IntroDialog : public QDialog
+{
+ Q_OBJECT
+public:
+ explicit IntroDialog( QWidget *parent = 0 );
+
+protected:
+ void changeEvent( QEvent *e );
+
+private:
+ Ui::IntroDialog ui;
+};
+
+#endif // INTRODIALOG_H
diff --git a/src/Gui/ui/IntroDialog.ui b/src/Gui/ui/IntroDialog.ui
new file mode 100644
index 0000000..629699b
--- /dev/null
+++ b/src/Gui/ui/IntroDialog.ui
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>IntroDialog</class>
+ <widget class="QDialog" name="IntroDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>430</width>
+ <height>235</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>430</width>
+ <height>235</height>
+ </size>
+ </property>
+ <property name="windowTitle">
+ <string>VideoLAN Movie Creator</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string><!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:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;">
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt;">Please note</span></p>
+<p align="justify" 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-size:14pt;"></p>
+<p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">VideoLAN Movie Creator is a <a href="http://en.wikipedia.org/wiki/Software_release_life_cycle#Pre-Alpha"><span style=" text-decoration: underline; color:#0057ae;">pre-alpha</span></a> software and is not ready for prime-time. Many key features are <span style=" font-weight:600;">simply missing</span>, or even <span style=" font-weight:600;">buggy</span>.</p>
+<p align="justify" 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 align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Our team is composed of volunteers who are working hard to give you the best experience with video editing.</p>
+<p align="justify" 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 align="right" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://www.vlmc.org"><span style=" font-size:8pt; text-decoration: underline; color:#0057ae;">read more</span></a></p></body></html></string>
+ </property>
+ <property name="textFormat">
+ <enum>Qt::RichText</enum>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ <property name="openExternalLinks">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pushButton">
+ <property name="text">
+ <string>I understand</string>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ <property name="flat">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/Main/guimain.cpp b/src/Main/guimain.cpp
index f654cc4..c6ee2a2 100644
--- a/src/Main/guimain.cpp
+++ b/src/Main/guimain.cpp
@@ -29,6 +29,7 @@
#include "config.h"
#include "MainWindow.h"
#include "project/GuiProjectManager.h"
+#include "IntroDialog.h"
#include <QApplication>
#include <QFile>
@@ -85,6 +86,12 @@ VLMCmain( int argc, char **argv )
p.setColor( QPalette::WindowText, QColor( 255, 255, 255, 255 ) );
p.setColor( QPalette::Link, QColor( 177, 202, 0, 255 ) );
p.setColor( QPalette::LinkVisited, QColor( 177, 202, 0, 255 ) );
+
+#ifndef QT_DEBUG
+ IntroDialog d;
+ d.exec();
+#endif
+
app.setPalette( p );
MainWindow w;
More information about the Vlmc-devel
mailing list