]> git.sesse.net Git - vlc/commitdiff
Qt4 - Add a "Goto Time" dialog asked over and over. Empty dialog now.
authorJean-Baptiste Kempf <jb@videolan.org>
Sat, 31 Mar 2007 13:45:34 +0000 (13:45 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Sat, 31 Mar 2007 13:45:34 +0000 (13:45 +0000)
modules/gui/qt4/Modules.am
modules/gui/qt4/dialogs/gototime.cpp [new file with mode: 0644]
modules/gui/qt4/dialogs/gototime.hpp [new file with mode: 0644]
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/dialogs_provider.hpp
modules/gui/qt4/menus.cpp

index 2c0288fb66417ac1f7cd6b37d42eb791629b0551..95473c43b29e9180d789be2868b909f2efde4323 100644 (file)
@@ -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 \
diff --git a/modules/gui/qt4/dialogs/gototime.cpp b/modules/gui/qt4/dialogs/gototime.cpp
new file mode 100644 (file)
index 0000000..144add4
--- /dev/null
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * 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();
+}
diff --git a/modules/gui/qt4/dialogs/gototime.hpp b/modules/gui/qt4/dialogs/gototime.hpp
new file mode 100644 (file)
index 0000000..61c9abd
--- /dev/null
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * 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
index 33d93c6e393778acd5ec1075d86102b6e5f4e65f..363c4abfa5b038ad60eca768797ab5c951f8ceb6 100644 (file)
@@ -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();
index d32ca26059af176c075d39906f3f10a4f035e7b8..0b039fe8c7106352527466be18b6b4c6382d1409 100644 (file)
@@ -144,6 +144,7 @@ public slots:
     void MLAppendDir();
     void quit();
     void switchToSkins();
+    void gotoTimeDialog();
     void helpDialog();
     void aboutDialog();
 };
index 31360272eea0c2b7b45390e321768569091a0d1d..ad38fc78f81f5d33f7b5bd0b254b00887c36d630 100644 (file)
@@ -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;