]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/util/customwidgets.hpp
Removes trailing spaces. Removes tabs.
[vlc] / modules / gui / qt4 / util / customwidgets.hpp
index e0d0af3323518e839b66f818b6f5788c0b7eb2b8..2ee76e8ece8c3286dd44453c89585ce561d12627 100644 (file)
@@ -21,7 +21,8 @@
  *
  * 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. *****************************************************************************/
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
 
 #ifndef _CUSTOMWIDGETS_H_
 #define _CUSTOMWIDGETS_H_
@@ -55,4 +56,47 @@ private:
     bool mDrawClickMsg;
 };
 
-#endif // CLICKLINEEDIT_H
+/*****************************************************************
+ * Custom views
+ *****************************************************************/
+#include <QMouseEvent>
+#include <QTreeView>
+#include <QCursor>
+#include <QPoint>
+#include <QModelIndex>
+
+class QVLCTreeView : public QTreeView
+{
+    Q_OBJECT;
+public:
+    QVLCTreeView( QWidget * parent ) : QTreeView( parent )
+    {
+    };
+    virtual ~QVLCTreeView()   {};
+
+    void mouseReleaseEvent(QMouseEvent* e )
+    {
+        if( e->button() & Qt::RightButton )
+        {
+            emit rightClicked( indexAt( QPoint( e->x(), e->y() ) ),
+                               QCursor::pos() );
+        }
+    }
+signals:
+    void rightClicked( QModelIndex, QPoint  );
+};
+
+class QKeyEvent;
+class QWheelEvent;
+int qtKeyModifiersToVLC( QInputEvent* e );
+int qtEventToVLCKey( QKeyEvent *e );
+int qtWheelEventToVLCKey( QWheelEvent *e );
+QString VLCKeyToString( int val );
+
+#include "qt4.hpp"
+#include <vlc/vlc.h>
+class QComboBox;
+void setfillVLCConfigCombo(const char *configname, intf_thread_t *p_intf,
+                        QComboBox *combo, QWidget *parent = 0 );
+
+#endif