From 9442592230dc6c95685bc92f298068cf84eeef6f Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Sat, 20 Dec 2008 00:38:40 +0100 Subject: [PATCH] Add direct access to chatmon configuration to context menu --- src/qtui/chatmonitorview.cpp | 11 +++++++++++ src/qtui/chatmonitorview.h | 1 + 2 files changed, 12 insertions(+) diff --git a/src/qtui/chatmonitorview.cpp b/src/qtui/chatmonitorview.cpp index 6e007782..39439d90 100644 --- a/src/qtui/chatmonitorview.cpp +++ b/src/qtui/chatmonitorview.cpp @@ -29,10 +29,13 @@ #include "chatitem.h" #include "chatscene.h" #include "client.h" +#include "iconloader.h" #include "networkmodel.h" #include "buffermodel.h" #include "messagemodel.h" #include "qtuisettings.h" +#include "settingspagedlg.h" +#include "settingspages/chatmonitorsettingspage.h" ChatMonitorView::ChatMonitorView(ChatMonitorFilter *filter, QWidget *parent) : ChatView(filter, parent), @@ -61,6 +64,9 @@ void ChatMonitorView::addActionsToMenu(QMenu *menu, const QPointF &pos) { showBufferAction->setChecked(_filter->showFields() & ChatMonitorFilter::BufferField); showBufferAction->setData(ChatMonitorFilter::BufferField); } + + menu->addSeparator(); + menu->addAction(SmallIcon("configure"), tr("Configure..."), this, SLOT(showSettingsPage())); } void ChatMonitorView::mouseDoubleClickEvent(QMouseEvent *event) { @@ -93,3 +99,8 @@ void ChatMonitorView::showFieldsChanged(bool checked) { else _filter->removeShowField(showAction->data().toInt()); } + +void ChatMonitorView::showSettingsPage() { + SettingsPageDlg dlg(new ChatMonitorSettingsPage(), this); + dlg.exec(); +} diff --git a/src/qtui/chatmonitorview.h b/src/qtui/chatmonitorview.h index 8a012413..40342f40 100644 --- a/src/qtui/chatmonitorview.h +++ b/src/qtui/chatmonitorview.h @@ -37,6 +37,7 @@ protected: private slots: void showFieldsChanged(bool checked); + void showSettingsPage(); private: ChatMonitorFilter *_filter; -- 2.20.1