]> Shamusworld >> Repos - guemap/commitdiff
It was bound to happen. :-/
authorShamus Hammons <jlhamm@acm.org>
Wed, 28 Apr 2021 02:44:25 +0000 (21:44 -0500)
committerShamus Hammons <jlhamm@acm.org>
Wed, 28 Apr 2021 02:44:25 +0000 (21:44 -0500)
src/mapdialog.cpp [new file with mode: 0644]
src/mapdialog.h [new file with mode: 0644]

diff --git a/src/mapdialog.cpp b/src/mapdialog.cpp
new file mode 100644 (file)
index 0000000..ee72c8e
--- /dev/null
@@ -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 (file)
index 0000000..ccac7ab
--- /dev/null
@@ -0,0 +1,27 @@
+#ifndef __MAPDIALOG_H__
+#define __MAPDIALOG_H__
+
+#include <QtWidgets>
+
+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__
+