1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-09-02 10:24:01 +02:00

Made the SocialWidget look and feel more consistent with other popups.

This commit is contained in:
Teo Mrnjavac
2012-10-15 17:27:48 +02:00
parent d547dfd336
commit cf6d1c32c4
6 changed files with 49 additions and 74 deletions

View File

@@ -1,6 +1,7 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2012, Christian Muehlhaeuser <muesli@tomahawk-player.org>
* Copyright 2012, Teo Mrnjavac <teo@kde.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -33,7 +34,6 @@ namespace Ui
class SocialWidget : public QWidget
{
Q_OBJECT
Q_PROPERTY( qreal opacity READ opacity WRITE setOpacity )
public:
SocialWidget( QWidget* parent );
@@ -42,13 +42,11 @@ public:
Tomahawk::query_ptr query() const { return m_query; }
void setQuery( const Tomahawk::query_ptr& query );
qreal opacity() const { return m_opacity; }
void setOpacity( qreal opacity );
QPoint position() const { return m_position; }
void setPosition( QPoint position );
bool shown() const;
void close();
signals:
void hidden();
@@ -61,6 +59,7 @@ protected:
// void changeEvent( QEvent* e );
void paintEvent( QPaintEvent* event );
bool eventFilter( QObject* object, QEvent* event );
void focusOutEvent( QFocusEvent* );
private slots:
void accept();
@@ -68,7 +67,6 @@ private slots:
void onShortLinkReady( const QUrl& longUrl, const QUrl& shortUrl, const QVariant& callbackObj );
void onGeometryUpdate();
void close();
private:
unsigned int charsAvailable() const;
@@ -77,7 +75,6 @@ private:
Tomahawk::query_ptr m_query;
qreal m_opacity;
QPoint m_position;
QWidget* m_parent;