Commit be0f7096 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - Add a "Goto Time" dialog asked over and over. Empty dialog now.

parent f75592ee
......@@ -47,7 +47,8 @@ TOMOC = main_interface \
dialogs/interaction \
dialogs/sout \
dialogs/help \
dialogs/open \
dialogs/gototime \
dialogs/open \
components/extended_panels \
components/infopanels \
components/preferences_widgets \
......@@ -76,6 +77,7 @@ nodist_SOURCES_qt4 = \
dialogs/interaction.moc.cpp \
dialogs/sout.moc.cpp \
dialogs/help.moc.cpp \
dialogs/gototime.moc.cpp \
dialogs/open.moc.cpp \
components/extended_panels.moc.cpp \
components/infopanels.moc.cpp \
......@@ -125,6 +127,7 @@ SOURCES_qt4 = qt4.cpp \
dialogs/interaction.cpp \
dialogs/sout.cpp \
dialogs/help.cpp \
dialogs/gototime.cpp \
dialogs/open.cpp \
components/extended_panels.cpp \
components/infopanels.cpp \
......@@ -156,6 +159,7 @@ EXTRA_DIST += \
dialogs/interaction.hpp \
dialogs/sout.hpp \
dialogs/help.hpp \
dialogs/gototime.hpp \
dialogs/open.hpp \
components/extended_panels.hpp \
components/infopanels.hpp \
......
/*****************************************************************************
* GotoTime.cpp : GotoTime and About dialogs
****************************************************************************
* Copyright (C) 2006 the VideoLAN team
* $Id: Messages.cpp 16024 2006-07-13 13:51:05Z xtophe $
*
* Authors: Jean-Baptiste Kempf <jb (at) videolan.org>
*
* 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 "dialogs/gototime.hpp"
#include "dialogs_provider.hpp"
#include "util/qvlcframe.hpp"
#include "qt4.hpp"
#include <QTextBrowser>
#include <QTabWidget>
#include <QFile>
#include <QLabel>
GotoTimeDialog *GotoTimeDialog::instance = NULL;
GotoTimeDialog::GotoTimeDialog( intf_thread_t *_p_intf) : QVLCFrame( _p_intf )
{
setWindowTitle( qtr( "GotoTime" ) );
resize(600, 500);
QGridLayout *layout = new QGridLayout(this);
QPushButton *closeButton = new QPushButton(qtr("&Close"));
layout->addWidget(closeButton, 1, 3);
BUTTONACT( closeButton, close() );
}
GotoTimeDialog::~GotoTimeDialog()
{
}
void GotoTimeDialog::close()
{
this->toggleVisible();
}
/*****************************************************************************
* GotoTime.hpp : GotoTime dialogs
****************************************************************************
* Copyright (C) 2006 the VideoLAN team
* $Id: Messages.hpp 16024 2006-07-13 13:51:05Z xtophe $
*
* Authors: Jean-Baptiste Kempf <jb (at) videolan.org>
*
* 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 _GOTOTIME_DIALOG_H_
#define _GOTOTIME_DIALOG_H_
#include "util/qvlcframe.hpp"
class GotoTimeDialog : public QVLCFrame
{
Q_OBJECT;
public:
static GotoTimeDialog * getInstance( intf_thread_t *p_intf )
{
if( !instance)
instance = new GotoTimeDialog( p_intf);
return instance;
}
virtual ~GotoTimeDialog();
private:
GotoTimeDialog( intf_thread_t *);
static GotoTimeDialog *instance;
public slots:
void close();
};
#endif
......@@ -41,6 +41,7 @@
#include "dialogs/sout.hpp"
#include "dialogs/open.hpp"
#include "dialogs/help.hpp"
#include "dialogs/gototime.hpp"
DialogsProvider* DialogsProvider::instance = NULL;
......@@ -135,6 +136,11 @@ void DialogsProvider::messagesDialog()
MessagesDialog::getInstance( p_intf )->toggleVisible();
}
void DialogsProvider::gotoTimeDialog()
{
GotoTimeDialog::getInstance( p_intf )->toggleVisible();
}
void DialogsProvider::helpDialog()
{
HelpDialog::getInstance( p_intf )->toggleVisible();
......
......@@ -144,6 +144,7 @@ public slots:
void MLAppendDir();
void quit();
void switchToSkins();
void gotoTimeDialog();
void helpDialog();
void aboutDialog();
};
......
......@@ -166,7 +166,7 @@ void QVLCMenu::createMenuBar( MainInterface *mi, intf_thread_t *p_intf,
bool visual_selector_enabled )
{
#ifndef WIN32
/* Uglu klugde
/* Ugly klugde
* Remove SIGCHLD from the ignored signal the time to initialise
* Qt because it call gconf to get the icon theme */
sigset_t set;
......@@ -252,6 +252,7 @@ QMenu *QVLCMenu::ToolsMenu( intf_thread_t *p_intf, MainInterface *mi,
if( visual_selector_enabled ) adv->setChecked( true );
#endif
}
DP_SADD( qtr(I_MENU_GOTOTIME), "","",gotoTimeDialog(), "Ctrl+T" );
menu->addSeparator();
DP_SADD( qtr("Preferences"), "", "", prefsDialog(), "Ctrl+P" );
return menu;
......
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