summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Cord-Landwehr <cordlandwehr@kde.org>2016-10-30 13:05:55 (GMT)
committerAndreas Cord-Landwehr <cordlandwehr@kde.org>2016-10-30 13:08:41 (GMT)
commit8fbc2d7c37cd3f5494b02adc0092786f02ca780c (patch)
tree281de08cce6ba9e12cea48cc38ac0dbc3758093b
parent59936cf7181dc4d367e4778235f0614e0d762c82 (diff)
Remove atom label combobox
Avagadro2 lost functionality to display atom names in rewrite.
-rw-r--r--compoundviewer/kalziumglwidget.cpp34
-rw-r--r--compoundviewer/kalziumglwidget.h1
-rw-r--r--src/tools/moleculeview.cpp9
-rw-r--r--src/tools/moleculeviewerwidget.ui56
4 files changed, 9 insertions, 91 deletions
diff --git a/compoundviewer/kalziumglwidget.cpp b/compoundviewer/kalziumglwidget.cpp
index 94b178d..12cde41 100644
--- a/compoundviewer/kalziumglwidget.cpp
+++ b/compoundviewer/kalziumglwidget.cpp
@@ -110,37 +110,3 @@ bool KalziumGLWidget::openFile(const QString &file)
update();
return true;
}
-
-void KalziumGLWidget::setLabels(int style)
-{
- //FIXME:Avogadro2
-// // Use the QSettings framework to configure the label engine
-// foreach (Avogadro::Engine *engine, engines()) {
-// if (engine->name() == "Label") {
-// QSettings settings;
-// int atomType = 0;
-// int bondType = 0;
-// bool enabled = false;
-// // We need to use
-// switch(style) {
-// case 0: // Display no labels
-// enabled = false;
-// break;
-// case 1: // Display the atom symbol
-// enabled = true;
-// atomType = 3;
-// break;
-// case 2: // Display the atom name
-// enabled = true;
-// atomType = 2;
-// break;
-// default:
-// engine->setEnabled(false);
-// }
-// settings.setValue("atomLabel", atomType);
-// settings.setValue("bondLabel", bondType);
-// settings.setValue("enabled", enabled);
-// engine->readSettings(settings);
-// }
-// }
-}
diff --git a/compoundviewer/kalziumglwidget.h b/compoundviewer/kalziumglwidget.h
index 6fbb446..c6928ff 100644
--- a/compoundviewer/kalziumglwidget.h
+++ b/compoundviewer/kalziumglwidget.h
@@ -25,7 +25,6 @@ public:
virtual ~KalziumGLWidget();
public slots:
- void setLabels(int style);
bool openFile(const QString &file);
protected:
diff --git a/src/tools/moleculeview.cpp b/src/tools/moleculeview.cpp
index af58ee0..bc65476 100644
--- a/src/tools/moleculeview.cpp
+++ b/src/tools/moleculeview.cpp
@@ -71,10 +71,6 @@ MoleculeDialog::MoleculeDialog(QWidget * parent)
ui.setupUi(mainWidget());
- //default to atom symbols
- ui.labelsCombo->setCurrentIndex(1);
- ui.glWidget->setLabels(1);
-
// Attempt to set up the UFF forcefield
m_forceField = OBForceField::FindForceField("UFF");
if (!m_forceField) {
@@ -95,14 +91,11 @@ MoleculeDialog::MoleculeDialog(QWidget * parent)
ui.styleCombo->addItems({"Wireframe", "Ball and Stick", "Van der Waals"});
slotUpdateScenePlugin();
connect(ui.styleCombo, static_cast<void (QComboBox::*)(const QString&)>(&QComboBox::currentIndexChanged),
- this, &MoleculeDialog::slotUpdateScenePlugin);
+ this, &MoleculeDialog::slotUpdateScenePlugin);
connect(ui.tabWidget, &QTabWidget::currentChanged,
this, &MoleculeDialog::setViewEdit);
- connect(ui.labelsCombo, static_cast<void (QComboBox::*)(int)>(&KComboBox::activated),
- ui.glWidget, &KalziumGLWidget::setLabels);
-
// Editing parameters
connect(ui.elementCombo, static_cast<void (QComboBox::*)(int)>(&KComboBox::currentIndexChanged),
this, &MoleculeDialog::slotElementChanged);
diff --git a/src/tools/moleculeviewerwidget.ui b/src/tools/moleculeviewerwidget.ui
index 4f719bf..347d393 100644
--- a/src/tools/moleculeviewerwidget.ui
+++ b/src/tools/moleculeviewerwidget.ui
@@ -45,59 +45,20 @@
<item row="0" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
- <widget class="QComboBox" name="styleCombo"/>
- </item>
- </layout>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_5">
- <property name="text">
- <string>Labels:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- <property name="buddy">
- <cstring>styleCombo</cstring>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout_4">
- <item>
- <widget class="KComboBox" name="labelsCombo">
- <item>
- <property name="text">
- <string comment="No element labels">None</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Element symbols</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Element names</string>
- </property>
- </item>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_7">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
+ <widget class="QComboBox" name="styleCombo">
+ <property name="minimumSize">
<size>
- <width>40</width>
- <height>20</height>
+ <width>160</width>
+ <height>0</height>
</size>
</property>
- </spacer>
+ </widget>
</item>
</layout>
</item>
+ <item row="1" column="1">
+ <layout class="QHBoxLayout" name="horizontalLayout_4"/>
+ </item>
</layout>
</item>
<item>
@@ -393,7 +354,6 @@
<tabstops>
<tabstop>tabWidget</tabstop>
<tabstop>styleCombo</tabstop>
- <tabstop>labelsCombo</tabstop>
<tabstop>elementCombo</tabstop>
<tabstop>bondCombo</tabstop>
<tabstop>hydrogenBox</tabstop>