#define _CUSTOMWIDGETS_H_
#include <QLineEdit>
+#include <QPushButton>
#include <QLabel>
-#include <QIcon>
/**
This class provides a QLineEdit which contains a greyed-out hinting
bool mDrawClickMsg;
};
-class QToolButton;
-class SearchLineEdit : public QFrame
+class QVLCFramelessButton : public QPushButton
+{
+ Q_OBJECT;
+public:
+ QVLCFramelessButton( QWidget *parent = NULL );
+ QSize sizeHint() const;
+protected:
+ virtual void paintEvent( QPaintEvent * event );
+};
+
+class SearchLineEdit : public QLineEdit
{
Q_OBJECT
public:
- SearchLineEdit( QWidget *parent );
+ SearchLineEdit( QWidget *parent = NULL );
private:
- ClickLineEdit *searchLine;
- QToolButton *clearButton;
+ void resizeEvent ( QResizeEvent * event );
+ void focusInEvent( QFocusEvent *event );
+ void focusOutEvent( QFocusEvent *event );
+ void paintEvent( QPaintEvent *event );
+ void setMessageVisible( bool on );
+ QVLCFramelessButton *clearButton;
+ bool message;
+ QLabel *msg;
+
+public slots:
+ void clear();
private slots:
void updateText( const QString& );
-
-signals:
- void textChanged( const QString& );
};
-class QVLCIconLabel : public QLabel
+class QVLCElidingLabel : public QLabel
{
- Q_OBJECT
public:
- QVLCIconLabel( const QIcon&, QWidget *parent = 0 );
- void setIcon( const QIcon& );
-signals:
- void clicked();
-protected:
- virtual void enterEvent( QEvent * );
- virtual void leaveEvent( QEvent * );
- virtual void mouseReleaseEvent( QMouseEvent * );
- virtual void resizeEvent( QResizeEvent * );
+ QVLCElidingLabel( const QString &s = QString(),
+ Qt::TextElideMode mode = Qt::ElideRight,
+ QWidget * parent = NULL );
+ void setElideMode( Qt::TextElideMode );
private:
- inline void updatePixmap( );
- QIcon icon;
- QIcon::Mode iconMode;
+ void paintEvent( QPaintEvent * event );
+ Qt::TextElideMode elideMode;
};
/* VLC Key/Wheel hotkeys interactions */