summaryrefslogtreecommitdiff
path: root/src/modinfodialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modinfodialog.cpp')
-rw-r--r--src/modinfodialog.cpp54
1 files changed, 0 insertions, 54 deletions
diff --git a/src/modinfodialog.cpp b/src/modinfodialog.cpp
index 743f76b0..065058fc 100644
--- a/src/modinfodialog.cpp
+++ b/src/modinfodialog.cpp
@@ -79,60 +79,6 @@ static bool operator<(const ModFileListWidget &LHS, const ModFileListWidget &RHS
const int max_scan_for_context_menu = 50;
-ExpanderWidget::ExpanderWidget()
- : m_button(nullptr), m_content(nullptr), opened_(false)
-{
-}
-
-ExpanderWidget::ExpanderWidget(QToolButton* button, QWidget* content)
- : ExpanderWidget()
-{
- set(button, content);
-}
-
-void ExpanderWidget::set(QToolButton* button, QWidget* content, bool o)
-{
- m_button = button;
- m_content = content;
-
- m_button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
- QObject::connect(m_button, &QToolButton::clicked, [&]{ toggle(); });
-
- toggle(o);
-}
-
-void ExpanderWidget::toggle()
-{
- if (opened()) {
- toggle(false);
- }
- else {
- toggle(true);
- }
-}
-
-void ExpanderWidget::toggle(bool b)
-{
- if (b) {
- m_button->setArrowType(Qt::DownArrow);
- m_content->show();
- } else {
- m_button->setArrowType(Qt::RightArrow);
- m_content->hide();
- }
-
- // the state has to be remembered instead of using m_content's visibility
- // because saving the state in saveConflictExpandersState() happens after the
- // dialog is closed, which marks all the widgets hidden
- opened_ = b;
-}
-
-bool ExpanderWidget::opened() const
-{
- return opened_;
-}
-
-
class ElideLeftDelegate : public QStyledItemDelegate
{
public: