diff options
author | Gerald Combs <gerald@wireshark.org> | 2012-12-18 17:21:20 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2012-12-18 17:21:20 +0000 |
commit | 7cf5334332fab7fbe47006a315998a3c5fc45929 (patch) | |
tree | cd49bbdee02c477ffb0019be01192a5a4fd3c719 /ui/qt/search_frame.cpp | |
parent | ed87fa9e3b9b9cb1e5beaf6d4b1b88a99b993307 (diff) | |
download | wireshark-7cf5334332fab7fbe47006a315998a3c5fc45929.tar.gz |
Add an AccordionFrame class which can animate showing and hiding (except
when we detect a remote connection). Use it for the "go to" and search
frames. Properly detect remote connections in the splash overlay.
svn path=/trunk/; revision=46591
Diffstat (limited to 'ui/qt/search_frame.cpp')
-rw-r--r-- | ui/qt/search_frame.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/ui/qt/search_frame.cpp b/ui/qt/search_frame.cpp index b05d5ca8d9..8130e38c70 100644 --- a/ui/qt/search_frame.cpp +++ b/ui/qt/search_frame.cpp @@ -44,7 +44,7 @@ const int narrow_chars = 1; const int wide_chars = 2; SearchFrame::SearchFrame(QWidget *parent) : - QFrame(parent), + AccordionFrame(parent), sf_ui_(new Ui::SearchFrame), cap_file_(NULL) { @@ -64,10 +64,11 @@ SearchFrame::~SearchFrame() delete sf_ui_; } -void SearchFrame::show() +void SearchFrame::animatedShow() { sf_ui_->searchLineEdit->setFocus(); - QFrame::show(); + + AccordionFrame::animatedShow(); } void SearchFrame::findNext() @@ -76,7 +77,7 @@ void SearchFrame::findNext() cap_file_->dir = SD_FORWARD; if (isHidden()) { - show(); + animatedShow(); return; } on_findButton_clicked(); @@ -88,7 +89,7 @@ void SearchFrame::findPrevious() cap_file_->dir = SD_BACKWARD; if (isHidden()) { - show(); + animatedShow(); return; } on_findButton_clicked(); @@ -98,14 +99,14 @@ void SearchFrame::setCaptureFile(capture_file *cf) { cap_file_ = cf; if (!cf && isVisible()) { - hide(); + animatedHide(); } enableWidgets(); } void SearchFrame::findFrameWithFilter(QString &filter) { - show(); + animatedShow(); sf_ui_->searchLineEdit->setText(filter); sf_ui_->searchTypeComboBox->setCurrentIndex(0); enableWidgets(); @@ -356,7 +357,7 @@ void SearchFrame::on_findButton_clicked() void SearchFrame::on_cancelButton_clicked() { - hide(); + animatedHide(); } /* |