Commit 55fe9c71 authored by Ludovic Fauvet's avatar Ludovic Fauvet

Main window created

parent c9abf9ed
/*****************************************************************************
* main.cpp: VLMC main
*****************************************************************************
* Copyright (C) 2008-2009 the VLMC team
*
* Authors: Ludovic Fauvet <etix@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 "MainWindow.h"
MainWindow::MainWindow( QWidget *parent ) :
QMainWindow( parent )
{
m_ui.setupUi( this );
}
void MainWindow::changeEvent( QEvent *e )
{
switch ( e->type() )
{
case QEvent::LanguageChange:
m_ui.retranslateUi( this );
break;
default:
break;
}
}
void MainWindow::on_actionQuit_triggered()
{
QApplication::quit();
}
/*****************************************************************************
* main.cpp: VLMC main
*****************************************************************************
* Copyright (C) 2008-2009 the VLMC team
*
* Authors: Ludovic Fauvet <etix@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 MAINWINDOW_H
#define MAINWINDOW_H
#include <QApplication>
#include "ui_MainWindow.h"
class MainWindow : public QMainWindow
{
Q_OBJECT
Q_DISABLE_COPY(MainWindow)
public:
explicit MainWindow( QWidget *parent = 0 );
protected:
virtual void changeEvent( QEvent *e );
private:
Ui::MainWindow m_ui;
private slots:
void on_actionQuit_triggered();
};
#endif // MAINWINDOW_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>600</height>
</rect>
</property>
<property name="windowTitle">
<string>VideoLAN Movie Creator</string>
</property>
<property name="dockNestingEnabled">
<bool>true</bool>
</property>
<widget class="QWidget" name="centralwidget"/>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>26</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
<property name="title">
<string>File</string>
</property>
<addaction name="actionQuit"/>
</widget>
<widget class="QMenu" name="menuEdit">
<property name="title">
<string>Edit</string>
</property>
</widget>
<widget class="QMenu" name="menuView">
<property name="title">
<string>View</string>
</property>
</widget>
<widget class="QMenu" name="menuEffets">
<property name="title">
<string>Effects</string>
</property>
</widget>
<widget class="QMenu" name="menuTools">
<property name="title">
<string>Tools</string>
</property>
</widget>
<widget class="QMenu" name="menuWindow">
<property name="title">
<string>Window</string>
</property>
</widget>
<widget class="QMenu" name="menuHelp">
<property name="title">
<string>Help</string>
</property>
<addaction name="actionHelp"/>
<addaction name="separator"/>
<addaction name="actionAbout"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuEdit"/>
<addaction name="menuView"/>
<addaction name="menuEffets"/>
<addaction name="menuTools"/>
<addaction name="menuWindow"/>
<addaction name="menuHelp"/>
</widget>
<widget class="QStatusBar" name="statusbar"/>
<action name="actionQuit">
<property name="text">
<string>Quit</string>
</property>
</action>
<action name="actionAbout">
<property name="text">
<string>About</string>
</property>
</action>
<action name="actionHelp">
<property name="text">
<string>Help</string>
</property>
</action>
</widget>
<resources/>
<connections/>
</ui>
......@@ -21,9 +21,12 @@
*****************************************************************************/
#include <QApplication>
#include "gui/MainWindow.h"
int main( int argc, char **argv )
{
QApplication app( argc, argv );
MainWindow w;
w.show();
return app.exec();
}
TARGET = vlmc
DESTDIR = bin
CONFIG += debug
TEMPLATE = app
QT += gui network
SOURCES += src/main.cpp
HEADERS +=
FORMS +=
QT += gui \
network
SOURCES += src/main.cpp \
src/gui/MainWindow.cpp
HEADERS += src/gui/MainWindow.h
FORMS += src/gui/ui/MainWindow.ui
RESOURCES +=
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