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

Animation on hiding "Save password" question

This commit is contained in:
nowrep 2011-03-02 17:54:12 +01:00
parent 03601b7cd9
commit 5b70f50a90
4 changed files with 36 additions and 5 deletions

View File

@ -23,21 +23,37 @@ AutoFillWidget::AutoFillWidget(QUrl url, QByteArray data, QString pass, QWidget
connect(ui->remember, SIGNAL(clicked()), this, SLOT(remember()));
connect(ui->never, SIGNAL(clicked()), this, SLOT(never()));
connect(ui->notnow, SIGNAL(clicked()), this, SLOT(close()));
connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(close()));
connect(ui->notnow, SIGNAL(clicked()), this, SLOT(hide()));
connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(hide()));
}
void AutoFillWidget::hide()
{
m_animation = new QTimeLine(300, this);
m_animation->setFrameRange(0, 35);
m_animation->setDirection(QTimeLine::Backward);
m_animation->start();
connect(m_animation, SIGNAL(finished()), this, SLOT(close()));
connect(m_animation, SIGNAL(frameChanged(int)),this, SLOT(frameChanged(int)));
}
void AutoFillWidget::frameChanged(int frame)
{
setMinimumHeight(frame);
setMaximumHeight(frame);
}
// addEntry(request.url(), outgoingData, pass);
void AutoFillWidget::never()
{
MainApplication::getInstance()->autoFill()->blockStoringfor(m_url);
close();
hide();
}
void AutoFillWidget::remember()
{
MainApplication::getInstance()->autoFill()->addEntry(m_url, m_data, m_pass);
close();
hide();
}
AutoFillWidget::~AutoFillWidget()

View File

@ -3,6 +3,7 @@
#include <QWidget>
#include <QUrl>
#include <QTimeLine>
namespace Ui {
class AutoFillWidget;
@ -17,14 +18,18 @@ public:
~AutoFillWidget();
private slots:
void frameChanged(int frame);
void remember();
void never();
void hide();
private:
Ui::AutoFillWidget *ui;
QUrl m_url;
QByteArray m_data;
QString m_pass;
QTimeLine* m_animation;
};
#endif // AUTOFILLWIDGET_H

View File

@ -74,6 +74,9 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Remember</string>
</property>
@ -87,6 +90,9 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Never For This Site</string>
</property>
@ -100,6 +106,9 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Not Now</string>
</property>

View File

@ -25,6 +25,7 @@ void WebTab::showNotification(QWidget *notif)
delete m_layout->itemAt(0)->widget();
m_layout->insertWidget(0, notif);
notif->show();
}
WebTab::~WebTab()