Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
5dccb295
Commit
5dccb295
authored
8 years ago
by
Pospelov, Gennady
Browse files
Options
Downloads
Patches
Plain Diff
Unused ComboWidget removed.
parent
265c3eac
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GUI/coregui/Views/InstrumentWidgets/ComboWidget.cpp
+0
-92
0 additions, 92 deletions
GUI/coregui/Views/InstrumentWidgets/ComboWidget.cpp
GUI/coregui/Views/InstrumentWidgets/ComboWidget.h
+0
-51
0 additions, 51 deletions
GUI/coregui/Views/InstrumentWidgets/ComboWidget.h
with
0 additions
and
143 deletions
GUI/coregui/Views/InstrumentWidgets/ComboWidget.cpp
deleted
100644 → 0
+
0
−
92
View file @
265c3eac
// ************************************************************************** //
//
// BornAgain: simulate and fit scattering at grazing incidence
//
//! @file GUI/coregui/Views/InstrumentWidgets/ComboWidget.cpp
//! @brief Implements class ComboWidget
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2016
//! @authors Scientific Computing Group at MLZ Garching
//! @authors Céline Durniak, Marina Ganeva, David Li, Gennady Pospelov
//! @authors Walter Van Herck, Joachim Wuttke
//
// ************************************************************************** //
#include
"ComboWidget.h"
#include
"GUIHelpers.h"
#include
<QBoxLayout>
#include
<QComboBox>
#include
<QDoubleSpinBox>
#include
<QGridLayout>
#include
<QGroupBox>
#include
<QLabel>
#include
<QPushButton>
#include
<QSpinBox>
ComboWidget
::
ComboWidget
(
QString
item
,
QGridLayout
*
layout
,
QWidget
*
parent
)
:
QWidget
(
parent
)
,
m_collapsed
(
false
)
{
m_detailsLayout
=
layout
;
m_mainComboBox
=
new
QComboBox
();
m_mainComboBox
->
addItem
(
item
);
m_icon_collapse
=
new
QIcon
(
":/images/collapse_arrow.png"
);
m_icon_expand
=
new
QIcon
(
":/images/expand_arrow.png"
);
m_detailsButton
=
new
QPushButton
(
"Details"
);
m_detailsButton
->
setFixedWidth
(
75
);
//m_detailsButton->setLayoutDirection(Qt::RightToLeft);
//detailsButton->setCheckable(true);
m_detailsButton
->
setIcon
(
QIcon
(
m_collapsed
?
*
m_icon_expand
:
*
m_icon_collapse
));
m_detailsButton
->
setIconSize
(
QSize
(
16
,
16
));
QGridLayout
*
comboLayout
=
new
QGridLayout
;
comboLayout
->
addWidget
(
m_mainComboBox
,
0
,
0
);
comboLayout
->
addWidget
(
m_detailsButton
,
0
,
1
);
if
(
m_detailsLayout
)
{
comboLayout
->
addLayout
(
m_detailsLayout
,
1
,
0
);
}
connect
(
m_detailsButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
onDetailsButtonClicked
()));
// main layout
QVBoxLayout
*
mainLayout
=
new
QVBoxLayout
;
mainLayout
->
addLayout
(
comboLayout
);
setLayout
(
mainLayout
);
}
void
ComboWidget
::
onDetailsButtonClicked
()
{
setCollapse
(
!
m_collapsed
);
m_detailsButton
->
setIcon
(
QIcon
(
m_collapsed
?
*
m_icon_expand
:
*
m_icon_collapse
));
}
void
ComboWidget
::
setCollapse
(
bool
collapse
)
{
for
(
int
i
=
0
;
i
<
m_detailsLayout
->
count
();
++
i
)
{
m_detailsLayout
->
itemAt
(
i
)
->
widget
()
->
setVisible
(
!
collapse
);
}
m_collapsed
=
collapse
;
}
void
ComboWidget
::
addItem
(
QString
item
)
{
m_mainComboBox
->
addItem
(
item
);
}
This diff is collapsed.
Click to expand it.
GUI/coregui/Views/InstrumentWidgets/ComboWidget.h
deleted
100644 → 0
+
0
−
51
View file @
265c3eac
// ************************************************************************** //
//
// BornAgain: simulate and fit scattering at grazing incidence
//
//! @file GUI/coregui/Views/InstrumentWidgets/ComboWidget.h
//! @brief Defines class ComboWidget
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2016
//! @authors Scientific Computing Group at MLZ Garching
//! @authors Céline Durniak, Marina Ganeva, David Li, Gennady Pospelov
//! @authors Walter Van Herck, Joachim Wuttke
//
// ************************************************************************** //
#ifndef COMBOWIDGET_H
#define COMBOWIDGET_H
#include
"WinDllMacros.h"
#include
<QWidget>
class
QComboBox
;
class
QLabel
;
class
QSpinBox
;
class
QDoubleSpinBox
;
class
QGridLayout
;
class
QPushButton
;
class
BA_CORE_API_
ComboWidget
:
public
QWidget
{
Q_OBJECT
public:
ComboWidget
(
QString
item
,
QGridLayout
*
layout
=
0
,
QWidget
*
parent
=
0
);
void
addItem
(
QString
item
);
public
slots
:
void
onDetailsButtonClicked
();
private:
bool
m_collapsed
;
QGridLayout
*
m_detailsLayout
;
QComboBox
*
m_mainComboBox
;
QPushButton
*
m_detailsButton
;
QIcon
*
m_icon_collapse
,
*
m_icon_expand
;
void
setCollapse
(
bool
);
};
#endif // COMBOWIDGET_H
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment