A slider for controlling things like bumpiness of map and tunnel sizes.
authornemo
Sat, 01 Nov 2014 11:20:37 -0400
changeset 10462 dd3cf0c91cc9
parent 10457 482c744b272c
child 10465 79fe4266b2ca
A slider for controlling things like bumpiness of map and tunnel sizes.
QTfrontend/res/css/qt.css
QTfrontend/ui/widget/mapContainer.cpp
QTfrontend/ui/widget/mapContainer.h
--- a/QTfrontend/res/css/qt.css	Thu Oct 30 18:47:51 2014 -0400
+++ b/QTfrontend/res/css/qt.css	Sat Nov 01 11:20:37 2014 -0400
@@ -275,6 +275,21 @@
 height: 6px;
 border-radius: 3px;
 }
+#mapFeatureSize {
+margin-left: 3px;
+}
+
+#mapFeatureSize::groove::horizontal {
+/* background-color: #141250; 
+background-color: rgba(20, 18, 80, 50%);
+*/
+background-color: rgba(0, 0, 0, 60%);
+}
+#mapFeatureSize::handle {
+/* background-color: #141250; */
+background-color: rgba(0, 0, 0, 60%);
+border-radius: 5px;
+}
 
 HatButton, ThemeButton {
 text-align: left;
--- a/QTfrontend/ui/widget/mapContainer.cpp	Thu Oct 30 18:47:51 2014 -0400
+++ b/QTfrontend/ui/widget/mapContainer.cpp	Sat Nov 01 11:20:37 2014 -0400
@@ -16,27 +16,28 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include <QPushButton>
+#include <QBitmap>
 #include <QBuffer>
-#include <QUuid>
-#include <QBitmap>
-#include <QPainter>
-#include <QLinearGradient>
 #include <QColor>
-#include <QTextStream>
-#include <QLabel>
-#include <QListView>
-#include <QVBoxLayout>
-#include <QIcon>
-#include <QLineEdit>
-#include <QStringListModel>
-#include <QListWidget>
-#include <QListWidgetItem>
 #include <QDebug>
 #include <QFile>
 #include <QFileDialog>
+#include <QIcon>
 #include <QInputDialog>
+#include <QLabel>
+#include <QLinearGradient>
+#include <QLineEdit>
+#include <QListView>
+#include <QListWidget>
+#include <QListWidgetItem>
 #include <QMessageBox>
+#include <QPainter>
+#include <QPushButton>
+#include <QSlider>
+#include <QStringListModel>
+#include <QTextStream>
+#include <QUuid>
+#include <QVBoxLayout>
 
 #include "hwconsts.h"
 #include "mapContainer.h"
@@ -152,6 +153,15 @@
     leftLayout->addWidget(mapPreview, 0);
     connect(mapPreview, SIGNAL(clicked()), this, SLOT(previewClicked()));
 
+    mapFeatureSize = new QSlider(Qt::Horizontal, this);
+    mapFeatureSize->setObjectName("mapFeatureSize");
+    //mapFeatureSize->setTickPosition(QSlider::TicksBelow);
+    mapFeatureSize->setMaximum(100);
+    mapFeatureSize->setMinimum(1);
+    mapFeatureSize->setFixedWidth(259);
+    mapFeatureSize->setValue(50);
+    leftLayout->addWidget(mapFeatureSize, 0);
+
     /* Bottom-Left layout */
 
     QVBoxLayout * bottomLeftLayout = new QVBoxLayout();
--- a/QTfrontend/ui/widget/mapContainer.h	Thu Oct 30 18:47:51 2014 -0400
+++ b/QTfrontend/ui/widget/mapContainer.h	Sat Nov 01 11:20:37 2014 -0400
@@ -20,13 +20,14 @@
 #ifndef _HWMAP_CONTAINER_INCLUDED
 #define _HWMAP_CONTAINER_INCLUDED
 
-#include <QWidget>
-#include <QGridLayout>
-#include <QVBoxLayout>
+#include <QByteArray>
 #include <QComboBox>
+#include <QGridLayout>
 #include <QLabel>
-#include <QByteArray>
 #include <QLineEdit>
+#include <QSlider>
+#include <QVBoxLayout>
+#include <QWidget>
 
 #include "DataManager.h"
 
@@ -117,6 +118,7 @@
     private:
         QVBoxLayout mainLayout;
         QPushButton* mapPreview;
+        QSlider* mapFeatureSize;
         QComboBox* chooseMap;
         MapModel * m_staticMapModel;
         MapModel * m_missionMapModel;