]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt2/QFloatDialog.C
better selection and scrolling behaviour
[lyx.git] / src / frontends / qt2 / QFloatDialog.C
index 82409d996a5b4f410d7c38d4784a45654469a565..4e589e849ab913b928f1867dd4e35b738ad8e087 100644 (file)
@@ -1,22 +1,30 @@
 /**
  * \file QFloatDialog.C
- * Copyright 2002 the LyX Team
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- * \author Edwin Leuven <leuven@fee.uva.nl>
+ * \author Edwin Leuven
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 #include <config.h>
 
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+#include "LString.h"
+
+#include "ControlFloat.h"
+
 #include <qpushbutton.h>
+#include <qcheckbox.h>
 
-#include "LString.h" 
-#include "ControlFloat.h" 
 #include "QFloatDialog.h"
-#include "Dialogs.h"
 #include "QFloat.h"
 
+
 QFloatDialog::QFloatDialog(QFloat * form)
        : QFloatDialogBase(0, 0, false, 0),
        form_(form)
@@ -31,16 +39,55 @@ QFloatDialog::QFloatDialog(QFloat * form)
                form, SLOT(slotClose()));
 }
 
+
 void QFloatDialog::change_adaptor()
 {
        form_->changed();
 }
 
+
 void QFloatDialog::closeEvent(QCloseEvent * e)
 {
        form_->slotWMHide();
        e->accept();
 }
 
+void QFloatDialog::tbhpClicked()
+{
+       heredefinitelyCB->setChecked(false);
+       bool allow(topCB->isChecked());
+       allow |= bottomCB->isChecked();
+       allow |= pageCB->isChecked();
+       allow |= herepossiblyCB->isChecked();
+       ignoreCB->setEnabled(allow);
+}
+
+
+void QFloatDialog::heredefinitelyClicked()
+{
+       if (heredefinitelyCB->isChecked());
+               ignoreCB->setEnabled(false);
+
+       topCB->setChecked(false);
+       bottomCB->setChecked(false);
+       pageCB->setChecked(false);
+       herepossiblyCB->setChecked(false);
+       ignoreCB->setChecked(false);
+}
+
+
+void QFloatDialog::spanClicked()
+{
+       bool const span(spanCB->isChecked());
+
+       if (!defaultsCB->isChecked()) {
+               herepossiblyCB->setEnabled(!span);
+               heredefinitelyCB->setEnabled(!span);
+       }
+
+       if (!span)
+               return;
+
+       herepossiblyCB->setChecked(false);
+       heredefinitelyCB->setChecked(false);
+}