/*************************************************************************** formcopyright.cpp - description ------------------- begin : Thu Feb 3 2000 copyright : (C) 2000 by Jürgen Vigna email : jug@sad.it ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "FormCopyright.h" #include "formcopyrightdialog.h" #include "Dialogs.h" FormCopyright::FormCopyright(LyXFunc *c, Dialogs *d) : dialog_(0), lf_(c), d_(d), h_(0) { // let the dialog be shown // This is a permanent connection so we won't bother // storing a copy because we won't be disconnecting. d->showCopyright.connect(slot(this, &FormCopyright::show)); dialog_ = 0; } FormCopyright::~FormCopyright() { delete dialog_; } void FormCopyright::show() { if (!dialog_) dialog_ = new FormCopyrightDialog(0, "Copyright and Warranty", false); if (!dialog_->isVisible()) h_ = d_->hideAll.connect(slot(this, &FormCopyright::hide)); dialog_->show(); } void FormCopyright::hide() { dialog_->hide(); h_.disconnect(); }