Added save/restore geometry logic for Qt TAS find note dialog.
This commit is contained in:
parent
2072269edc
commit
8cfab72523
|
@ -5665,6 +5665,7 @@ int bookmarkPreviewPopup::loadImage(int index)
|
||||||
TasFindNoteWindow::TasFindNoteWindow( QWidget *parent )
|
TasFindNoteWindow::TasFindNoteWindow( QWidget *parent )
|
||||||
: QDialog( parent, Qt::Window )
|
: QDialog( parent, Qt::Window )
|
||||||
{
|
{
|
||||||
|
QSettings settings;
|
||||||
QVBoxLayout *mainLayout, *vbox;
|
QVBoxLayout *mainLayout, *vbox;
|
||||||
QHBoxLayout *hbox, *hbox1;
|
QHBoxLayout *hbox, *hbox1;
|
||||||
QGroupBox *gbox;
|
QGroupBox *gbox;
|
||||||
|
@ -5720,14 +5721,22 @@ TasFindNoteWindow::TasFindNoteWindow( QWidget *parent )
|
||||||
connect( nextBtn , SIGNAL(clicked(void)), this, SLOT(findNextClicked(void)) );
|
connect( nextBtn , SIGNAL(clicked(void)), this, SLOT(findNextClicked(void)) );
|
||||||
|
|
||||||
connect( searchPattern, SIGNAL(textChanged(const QString &)), this, SLOT(searchPatternChanged(const QString &)) );
|
connect( searchPattern, SIGNAL(textChanged(const QString &)), this, SLOT(searchPatternChanged(const QString &)) );
|
||||||
|
|
||||||
|
// Restore Window Geometry
|
||||||
|
restoreGeometry(settings.value("tasEditorFindDialog/geometry").toByteArray());
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
TasFindNoteWindow::~TasFindNoteWindow(void)
|
TasFindNoteWindow::~TasFindNoteWindow(void)
|
||||||
{
|
{
|
||||||
|
QSettings settings;
|
||||||
|
|
||||||
if ( findWin == this )
|
if ( findWin == this )
|
||||||
{
|
{
|
||||||
findWin = NULL;
|
findWin = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Save Window Geometry
|
||||||
|
settings.setValue("tasEditorFindDialog/geometry", saveGeometry());
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void TasFindNoteWindow::closeEvent(QCloseEvent *event)
|
void TasFindNoteWindow::closeEvent(QCloseEvent *event)
|
||||||
|
|
Loading…
Reference in New Issue