]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/infopanels.hpp
Removes trailing spaces. Removes tabs.
[vlc] / modules / gui / qt4 / components / infopanels.hpp
index 952b7060c9e2d993087be802b47b07bac0898ac0..7b73589b58da1639bc6c1f060d4887e0131cf2ee 100644 (file)
@@ -1,11 +1,12 @@
 /*****************************************************************************
  * infopanels.hpp : Panels for the information dialogs
  ****************************************************************************
- * Copyright (C) 2006 the VideoLAN team
+ * Copyright (C) 2006-2007 the VideoLAN team
  * $Id$
  *
  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
  *          Jean-Baptiste Kempf <jb@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
 #include <vlc_meta.h>
 
 #include <QWidget>
-#include <QTabWidget>
-#include <QLabel>
+
+#ifdef HAVE_LIMITS_H
+#   include <limits.h>
+#endif
+
+#define setSpinBounds( spinbox ) {               \
+    spinbox->setRange( 0, INT_MAX );             \
+    spinbox->setAccelerated( true ) ;            \
+    spinbox->setAlignment( Qt::AlignRight );     \
+    spinbox->setSpecialValueText(""); }
 
 class QTreeWidget;
 class QTreeWidgetItem;
+class QTreeView;
+class QSpinBox;
+class QLineEdit;
+class QLabel;
 
 class MetaPanel: public QWidget
 {
@@ -40,28 +53,59 @@ class MetaPanel: public QWidget
 public:
     MetaPanel( QWidget *, intf_thread_t * );
     virtual ~MetaPanel();
+    void saveMeta();
+    void setInput( input_item_t * );
+    bool isInEditMode();
+    void setEditMode( bool );
+
 private:
+    input_item_t *p_input;
     intf_thread_t *p_intf;
-    QLabel *uri_text;
-    QLabel *name_text;
-    QLabel *artist_text;
-    QLabel *genre_text;
-    QLabel *copyright_text;
-    QLabel *collection_text;
-    QLabel *seqnum_text;
-    QLabel *description_text;
-    QLabel *rating_text;
-    QLabel *date_text;
-    QLabel *setting_text;
-    QLabel *language_text;
-    QLabel *nowplaying_text;
-    QLabel *publisher_text;
+    bool b_inEditMode;
+
+    QLineEdit *uri_text;
+    QLineEdit *title_text;
+    QLineEdit *artist_text;
+    QLineEdit *genre_text;
+    QLineEdit *copyright_text;
+    QLineEdit *collection_text;
+    QLineEdit *seqnum_text;
+    QLineEdit *description_text;
+    QSpinBox *rating_text;
+    QLineEdit *date_text;
+//    QLineEdit *setting_text;
+    QLineEdit *language_text;
+    QLineEdit *nowplaying_text;
+    QLineEdit *publisher_text;
+//    QLineEdit *encodedby_text;
+    QLabel *art_cover;
 
 public slots:
     void update( input_item_t * );
     void clear();
+
+private slots:
+    void enterEditMode();
+signals:
+    void uriSet( QString );
+    void editing();
 };
 
+class ExtraMetaPanel: public QWidget
+{
+    Q_OBJECT;
+public:
+    ExtraMetaPanel( QWidget *, intf_thread_t * );
+    virtual  ~ExtraMetaPanel() {};
+private:
+    intf_thread_t *p_intf;
+    QTreeWidget *extraMetaTree;
+public slots:
+    void update( input_item_t * );
+    void clear();
+};
 
 class InputStatsPanel: public QWidget
 {
@@ -112,22 +156,4 @@ public slots:
     void update( input_item_t * );
     void clear();
 };
-
-class InfoTab: public QTabWidget
-{
-    Q_OBJECT;
-public:
-    InfoTab( QWidget *, intf_thread_t *, bool );
-    virtual ~InfoTab();
-    void update( input_item_t *, bool, bool );
-    void clear();
-private:
-    bool stats;
-    intf_thread_t *p_intf;
-    InputStatsPanel *ISP;
-    MetaPanel *MP;
-    InfoPanel *IP;
-    int i_runs;
-};
-
 #endif