1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 09:42:10 +02:00

Updated animations

This commit is contained in:
nowrep 2011-03-03 15:34:53 +01:00
parent bc1b6fb947
commit 6c26f4abbe
5 changed files with 9 additions and 35 deletions

View File

@ -84,8 +84,7 @@ SOURCES += main.cpp\
webview/webtab.cpp \ webview/webtab.cpp \
rss/rsswidget.cpp \ rss/rsswidget.cpp \
autofill/autofillnotification.cpp \ autofill/autofillnotification.cpp \
rss/rssnotification.cpp \ rss/rssnotification.cpp
tools/notification.cpp
HEADERS += 3rdparty/squeezelabel.h \ HEADERS += 3rdparty/squeezelabel.h \
3rdparty/qtwin.h \ 3rdparty/qtwin.h \
@ -139,8 +138,7 @@ HEADERS += 3rdparty/squeezelabel.h \
webview/webtab.h \ webview/webtab.h \
rss/rsswidget.h \ rss/rsswidget.h \
autofill/autofillnotification.h \ autofill/autofillnotification.h \
rss/rssnotification.h \ rss/rssnotification.h
tools/notification.h
FORMS += \ FORMS += \
preferences/autofillmanager.ui \ preferences/autofillmanager.ui \

View File

@ -26,12 +26,11 @@ AutoFillNotification::AutoFillNotification(QUrl url, QByteArray data, QString pa
connect(ui->notnow, SIGNAL(clicked()), this, SLOT(hide())); connect(ui->notnow, SIGNAL(clicked()), this, SLOT(hide()));
connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(hide())); connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(hide()));
qDebug() << this->sizeHint().height(); m_animation = new QTimeLine(300, this);
m_animation->setFrameRange(0, sizeHint().height());
setMinimumHeight(1); setMinimumHeight(1);
setMaximumHeight(1); setMaximumHeight(1);
m_animation = new QTimeLine(300, this);
m_animation->setFrameRange(0, 35);
connect(m_animation, SIGNAL(frameChanged(int)),this, SLOT(frameChanged(int))); connect(m_animation, SIGNAL(frameChanged(int)),this, SLOT(frameChanged(int)));
QTimer::singleShot(1, m_animation, SLOT(start())); QTimer::singleShot(1, m_animation, SLOT(start()));
} }

View File

@ -9,8 +9,6 @@ RSSNotification::RSSNotification(QString host, QWidget *parent) :
{ {
setAttribute(Qt::WA_DeleteOnClose); setAttribute(Qt::WA_DeleteOnClose);
ui->setupUi(this); ui->setupUi(this);
setMinimumHeight(1);
setMaximumHeight(1);
ui->closeButton->setIcon( ui->closeButton->setIcon(
#ifdef Q_WS_X11 #ifdef Q_WS_X11
style()->standardIcon(QStyle::SP_DialogCloseButton) style()->standardIcon(QStyle::SP_DialogCloseButton)
@ -25,7 +23,10 @@ RSSNotification::RSSNotification(QString host, QWidget *parent) :
connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(hide())); connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(hide()));
m_animation = new QTimeLine(300, this); m_animation = new QTimeLine(300, this);
m_animation->setFrameRange(0, 35); m_animation->setFrameRange(0, sizeHint().height());
setMinimumHeight(1);
setMaximumHeight(1);
connect(m_animation, SIGNAL(frameChanged(int)),this, SLOT(frameChanged(int))); connect(m_animation, SIGNAL(frameChanged(int)),this, SLOT(frameChanged(int)));
QTimer::singleShot(1, m_animation, SLOT(start())); QTimer::singleShot(1, m_animation, SLOT(start()));
} }

View File

@ -1,6 +0,0 @@
#include "notification.h"
Notification::Notification(QWidget *parent) :
QWidget(parent)
{
}

View File

@ -1,18 +0,0 @@
#ifndef NOTIFICATION_H
#define NOTIFICATION_H
#include <QWidget>
class Notification : public QWidget
{
Q_OBJECT
public:
explicit Notification(QWidget *parent = 0);
signals:
public slots:
};
#endif // NOTIFICATION_H