]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/qt4.hpp
Advanced controls bar
[vlc] / modules / gui / qt4 / qt4.hpp
index fe66a737e562fc987a6985bf0b8c55570e7a0640..5d1a48979fa486330d0dbab645b97b0155a108a7 100644 (file)
@@ -62,6 +62,22 @@ struct intf_sys_t
 #define BUTTONACT( b, a ) connect( b, SIGNAL( clicked() ), this, SLOT(a) )
 #define ON_TIMEOUT( act ) CONNECT( THEDP->fixed_timer, timeout(), this, act )
 
+#define BUTTON_SET( button, text, tooltip ) \
+    button->setText( text ); \
+    button->setToolTip( tooltip );
+
+#define BUTTON_SET_ACT( button, text, tooltip, thisslot ) \
+    BUTTON_SET( button, text, tooltip ); \
+    BUTTONACT( button, thisslot );
+
+#define BUTTON_SET_IMG( button, text, image, tooltip ) \
+    BUTTON_SET( button, text, tooltip ); \
+    button->setIcon( QIcon( ":/pixmaps/"#image ) );
+
+#define BUTTON_SET_ACT_I( button, text, image, tooltip, thisslot ) \
+    BUTTON_SET_IMG( button, text, image, tooltip ); \
+    BUTTONACT( button, thisslot );
+
 static int DialogEvent_Type = QEvent::User + 1;
 static int PLUndockEvent_Type = QEvent::User + 2;
 static int PLDockEvent_Type = QEvent::User + 3;