• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

messageviewer

  • sources
  • kde-4.12
  • kdepim
  • messageviewer
  • adblock
adblockblockableitemsdialog.cpp
Go to the documentation of this file.
1 /*
2  Copyright (c) 2013 Montel Laurent <montel@kde.org>
3 
4  This program is free software; you can redistribute it and/or modify it
5  under the terms of the GNU General Public License, version 2, as
6  published by the Free Software Foundation.
7 
8  This program is distributed in the hope that it will be useful, but
9  WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License along
14  with this program; if not, write to the Free Software Foundation, Inc.,
15  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17 
18 #include "adblockblockableitemsdialog.h"
19 #include "adblockblockableitemswidget.h"
20 
21 #include <KLocale>
22 #include <KTreeWidgetSearchLine>
23 #include <KMenu>
24 
25 #include <QVBoxLayout>
26 #include <QTreeWidget>
27 #include <QWebFrame>
28 
29 using namespace MessageViewer;
30 AdBlockBlockableItemsDialog::AdBlockBlockableItemsDialog(QWidget *parent)
31  : KDialog(parent)
32 {
33  setCaption( i18n("Blockable Items") );
34  setButtons( Ok|Cancel );
35 
36  mBlockableItems = new AdBlockBlockableItemsWidget;
37 
38  setMainWidget(mBlockableItems);
39  readConfig();
40 }
41 
42 AdBlockBlockableItemsDialog::~AdBlockBlockableItemsDialog()
43 {
44  writeConfig();
45 }
46 
47 void AdBlockBlockableItemsDialog::setWebFrame(QWebFrame *frame)
48 {
49  mBlockableItems->setWebFrame(frame);
50 }
51 
52 void AdBlockBlockableItemsDialog::saveFilters()
53 {
54  mBlockableItems->saveFilters();
55 }
56 
57 void AdBlockBlockableItemsDialog::writeConfig()
58 {
59  KConfigGroup group( KGlobal::config(), "AdBlockBlockableItemsDialog" );
60  group.writeEntry( "Size", size() );
61 }
62 
63 void AdBlockBlockableItemsDialog::readConfig()
64 {
65  KConfigGroup group( KGlobal::config(), "AdBlockBlockableItemsDialog" );
66  const QSize sizeDialog = group.readEntry( "Size", QSize(500,300) );
67  if ( sizeDialog.isValid() ) {
68  resize( sizeDialog );
69  }
70 }
71 
72 
73 #include "adblockblockableitemsdialog.moc"
adblockblockableitemswidget.h
MessageViewer::AdBlockBlockableItemsDialog::setWebFrame
void setWebFrame(QWebFrame *frame)
Definition: adblockblockableitemsdialog.cpp:47
MessageViewer::AdBlockBlockableItemsWidget::setWebFrame
void setWebFrame(QWebFrame *frame)
Definition: adblockblockableitemswidget.cpp:77
QWidget
MessageViewer::AdBlockBlockableItemsWidget::saveFilters
void saveFilters()
Definition: adblockblockableitemswidget.cpp:274
MessageViewer::AdBlockBlockableItemsDialog::AdBlockBlockableItemsDialog
AdBlockBlockableItemsDialog(QWidget *parent=0)
Definition: adblockblockableitemsdialog.cpp:30
KDialog
MessageViewer::AdBlockBlockableItemsWidget
Definition: adblockblockableitemswidget.h:27
adblockblockableitemsdialog.h
MessageViewer::AdBlockBlockableItemsDialog::~AdBlockBlockableItemsDialog
~AdBlockBlockableItemsDialog()
Definition: adblockblockableitemsdialog.cpp:42
MessageViewer::AdBlockBlockableItemsDialog::saveFilters
void saveFilters()
Definition: adblockblockableitemsdialog.cpp:52
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:57 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

messageviewer

Skip menu "messageviewer"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal