+
+// ==============================
+// NickList Dock
+// ==============================
+NickListDock::NickListDock(const QString& title, QWidget* parent)
+ : QDockWidget(title, parent)
+{
+ // THIS STUFF IS NEEDED FOR NICKLIST AUTOHIDE...
+ // AS THIS BRINGS LOTS OF FUCKUPS WITH IT IT'S DEACTIVATED FOR NOW...
+
+ // QAction *toggleView = toggleViewAction();
+ // disconnect(toggleView, SIGNAL(triggered(bool)), this, 0);
+ // toggleView->setChecked(QtUiSettings().value("ShowNickList", QVariant(true)).toBool());
+
+ // // reconnecting the closebuttons clicked signal to the action
+ // foreach(QAbstractButton *button, findChildren<QAbstractButton *>()) {
+ // if(disconnect(button, SIGNAL(clicked()), this, SLOT(close())))
+ // connect(button, SIGNAL(clicked()), toggleView, SLOT(trigger()));
+ // }
+}
+
+void NickListDock::setLocked(bool locked)
+{
+ if (locked) {
+ setFeatures(nullptr);
+ }
+ else {
+ setFeatures(QDockWidget::DockWidgetClosable | QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable);
+ }
+}
+
+// NickListDock::~NickListDock() {
+// QtUiSettings().setValue("ShowNickList", toggleViewAction()->isChecked());
+// }
+
+// bool NickListDock::event(QEvent *event) {
+// switch (event->type()) {
+// case QEvent::Hide:
+// case QEvent::Show:
+// emit visibilityChanged(event->type() == QEvent::Show);
+// return QWidget::event(event);
+// default:
+// return QDockWidget::event(event);
+// }
+// }