*
* 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.
+ *****************************************************************************/
#include "customwidgets.hpp"
#include <QPainter>
#include <QColorGroup>
#include <QRect>
#include <QKeyEvent>
+#include <QWheelEvent>
#include <vlc_keys.h>
HANDLE( Key_End, KEY_END );
HANDLE( Key_Insert, KEY_INSERT );
HANDLE( Key_Delete, KEY_DELETE );
+ HANDLE( Key_VolumeDown, KEY_VOLUME_DOWN);
+ HANDLE( Key_VolumeUp, KEY_VOLUME_UP );
+ HANDLE( Key_MediaPlay, KEY_MEDIA_PLAY_PAUSE );
+ HANDLE( Key_MediaStop, KEY_MEDIA_STOP );
+ HANDLE( Key_MediaPrevious, KEY_MEDIA_PREV_TRACK );
+ HANDLE( Key_MediaNext, KEY_MEDIA_NEXT_TRACK );
}
if( !found )
return i_vlck;
}
+int qtWheelEventToVLCKey( QWheelEvent *e )
+{
+ int i_vlck = 0;
+ /* Handle modifiers */
+ i_vlck |= qtKeyModifiersToVLC( e );
+ if ( e->delta() > 0 )
+ i_vlck |= KEY_MOUSEWHEELUP;
+ else
+ i_vlck |= KEY_MOUSEWHEELDOWN;
+ return i_vlck;
+}
+
QString VLCKeyToString( int val )
{
QString r = "";
}
return r;
}
+
+#include <QComboBox>
+
+void setfillVLCConfigCombo( const char *configname, intf_thread_t *p_intf,
+ QComboBox *combo, QWidget *parent )
+{
+ module_config_t *p_config =
+ config_FindConfig( VLC_OBJECT(p_intf), configname );
+ if( p_config )
+ {
+ for ( int i_index = 0; i_index < p_config->i_list; i_index++ )
+ {
+ combo->addItem( qfu( p_config->ppsz_list_text[i_index] ),
+ QVariant( p_config->pi_list[i_index] ) );
+ if( p_config->value.i == p_config->pi_list[i_index] )
+ {
+ combo->setCurrentIndex( i_index );
+ }
+ }
+ combo->setToolTip( qfu( p_config->psz_longtext ) );
+ }
+}