From: Marcus Eggenberger Date: Mon, 3 Nov 2008 12:59:10 +0000 (+0100) Subject: Fixing BR #227 - removing context menu of the buffer view preview in the settingspage X-Git-Tag: 0.3.1~85 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=3e8cae7c0724d878ef0e7361d709711750164473 Fixing BR #227 - removing context menu of the buffer view preview in the settingspage --- diff --git a/src/qtui/settingspages/bufferviewsettingspage.ui b/src/qtui/settingspages/bufferviewsettingspage.ui index b37e45d8..6bba3c2c 100644 --- a/src/qtui/settingspages/bufferviewsettingspage.ui +++ b/src/qtui/settingspages/bufferviewsettingspage.ui @@ -211,7 +211,7 @@ - + @@ -219,9 +219,9 @@ - BufferView + PreviewBufferView QTreeView -
bufferview.h
+
settingspages/previewbufferview.h
diff --git a/src/qtui/settingspages/previewbufferview.h b/src/qtui/settingspages/previewbufferview.h new file mode 100644 index 00000000..cd741e7e --- /dev/null +++ b/src/qtui/settingspages/previewbufferview.h @@ -0,0 +1,37 @@ +/*************************************************************************** + * Copyright (C) 2005-08 by the Quassel Project * + * devel@quassel-irc.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) version 3. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#ifndef PREVIEWBUFFERVIEW_H +#define PREVIEWBUFFERVIEW_H + +#include "bufferview.h" + +class PreviewBufferView : public BufferView { + Q_OBJECT + +public: + PreviewBufferView(QWidget *parent = 0) : BufferView(parent) {} + +protected: + virtual void keyPressEvent(QKeyEvent *event) { QTreeView::keyPressEvent(event); } + virtual void contextMenuEvent(QContextMenuEvent *) {} +}; + +#endif //PREVIEWBUFFERVIEW_H diff --git a/src/qtui/settingspages/settingspages.inc b/src/qtui/settingspages/settingspages.inc index 9549d99e..7dc6e1a0 100644 --- a/src/qtui/settingspages/settingspages.inc +++ b/src/qtui/settingspages/settingspages.inc @@ -5,5 +5,5 @@ set(SETTINGSPAGES aliases appearance bufferview color fonts general highlight id # Specify additional files (e.g. for subdialogs) here! set(SP_SOURCES aliasesmodel.cpp notificationssettingspage.cpp) -set(SP_HEADERS aliasesmodel.h notificationssettingspage.h) +set(SP_HEADERS aliasesmodel.h notificationssettingspage.h previewbufferview.h) set(SP_FORMS buffervieweditdlg.ui createidentitydlg.ui saveidentitiesdlg.ui networkeditdlg.ui nickeditdlg.ui servereditdlg.ui)