From: Shamus Hammons Date: Wed, 28 Apr 2021 02:44:25 +0000 (-0500) Subject: It was bound to happen. :-/ X-Git-Tag: v3.0.0~1 X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=guemap;a=commitdiff_plain;h=ef8d1d969c2a64b95417ac4097a21cc7bdcb946b It was bound to happen. :-/ --- diff --git a/src/mapdialog.cpp b/src/mapdialog.cpp new file mode 100644 index 0000000..ee72c8e --- /dev/null +++ b/src/mapdialog.cpp @@ -0,0 +1,43 @@ +// +// GUEmap +// Copyright 1997-2007 by Christopher J. Madsen +// (C) 2019 James Hammons +// +// GUEmap is licensed under either version 2 of the GPL, or (at your option) +// any later version. See LICENSE file for details. +// +// mapdialog.cpp: Dialog for changing GUEmap global map settings +// + +#include "mapdialog.h" + + +MapDialog::MapDialog(QWidget * parent/*= 0*/): QDialog(parent), navMode("Navigation Mode"), displayGrid("Display Grid"), showCorners("Show Corners"), showPages("Show Pages") +{ + QFormLayout * fl = new QFormLayout; + + fl->addRow("Title:", &title); + fl->addRow("Comment:", &comment); + fl->addRow("", &navMode); + fl->addRow("", &displayGrid); + fl->addRow("", &showCorners); + fl->addRow("", &showPages); + + buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); + + connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())); + connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); + + QVBoxLayout * mainLayout = new QVBoxLayout; + mainLayout->addLayout(fl); + mainLayout->addWidget(buttonBox); + setLayout(mainLayout); + + setWindowTitle(tr("Map Settings")); +} + + +MapDialog::~MapDialog() +{ +} + diff --git a/src/mapdialog.h b/src/mapdialog.h new file mode 100644 index 0000000..ccac7ab --- /dev/null +++ b/src/mapdialog.h @@ -0,0 +1,27 @@ +#ifndef __MAPDIALOG_H__ +#define __MAPDIALOG_H__ + +#include + +class MapDialog: public QDialog +{ + Q_OBJECT + + public: + MapDialog(QWidget * parent = 0); + ~MapDialog(); + + private: + QDialogButtonBox * buttonBox; + + public: + QLineEdit title; + QTextEdit comment; + QCheckBox navMode; + QCheckBox displayGrid; + QCheckBox showCorners; + QCheckBox showPages; +}; + +#endif // __MAPDIALOG_H__ +