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

kget

  • sources
  • kde-4.12
  • kdenetwork
  • kget
  • transfer-plugins
  • contentfetch
dlgcontentfetchsettingwidget.h
Go to the documentation of this file.
1 /* This file is part of the KDE project
2 
3  Copyright (C) 2008 Ningyu Shi <shiningyu@gmail.com>
4 
5  This program is free software; you can redistribute it and/or
6  modify it under the terms of the GNU General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 */
10 #ifndef DLG_CONTENT_FETCH_SETTING_H
11 #define DLG_CONTENT_FETCH_SETTING_H
12 
13 #include <KCModule>
14 
15 #include "ui_dlgcontentfetchsettingwidget.h"
16 
17 #include <QPointer>
18 #include <kross/core/action.h>
19 
20 class DlgContentFetchSettingWidget : public KCModule
21 {
22  Q_OBJECT
23  public:
24  DlgContentFetchSettingWidget(QWidget * parent, const QVariantList &args);
25  ~DlgContentFetchSettingWidget();
26 
27  public slots:
28  virtual void save();
29  virtual void load();
30 
31  private slots:
32  void slotNewScript();
33  void slotEditScript();
34  void slotConfigureScript();
35  void slotRemoveScript();
36  void slotCheckConfigurable(QTreeWidgetItem *p_item,
37  int column);
38  void slotEnableChanged(QTreeWidgetItem* p_item,
39  int column);
40 
41  signals:
42  void configureScript(QWidget* widget, QObject* configadaptor);
43  void configurationAccepted(QWidget* widget, QObject* configadaptor);
44  private:
45  void addScriptItem(bool enabled, const QString &path, const QString &regexp,
46  const QString &description);
47  void loadContentFetchSetting();
48  void saveContentFetchSetting();
49 
50  Ui::DlgContentFetchSettingWidget ui;
51  QPointer<Kross::Action> m_p_action;
52 };
53 
54 class SettingWidgetAdaptor : public QWidget
55 {
56  Q_OBJECT
57  public:
58  explicit SettingWidgetAdaptor(QWidget* parent = 0) : QWidget(parent) {}
59  virtual ~SettingWidgetAdaptor() {}
60  public slots:
61  void setWidget(QWidget* widget)
62  {
63  widget->setParent(this);
64  // make this widget same size as the user supplied one
65  // this will make resize easier from outside.
66  resize(widget->size());
67  }
68 };
69 
70 #endif // DLG_CONTENT_FETCH_SETTING_H
SettingWidgetAdaptor::SettingWidgetAdaptor
SettingWidgetAdaptor(QWidget *parent=0)
Definition: dlgcontentfetchsettingwidget.h:58
QWidget
DlgContentFetchSettingWidget::~DlgContentFetchSettingWidget
~DlgContentFetchSettingWidget()
Definition: dlgcontentfetchsettingwidget.cpp:45
QObject
SettingWidgetAdaptor::setWidget
void setWidget(QWidget *widget)
Definition: dlgcontentfetchsettingwidget.h:61
DlgContentFetchSettingWidget::configurationAccepted
void configurationAccepted(QWidget *widget, QObject *configadaptor)
DlgContentFetchSettingWidget::DlgContentFetchSettingWidget
DlgContentFetchSettingWidget(QWidget *parent, const QVariantList &args)
Definition: dlgcontentfetchsettingwidget.cpp:23
SettingWidgetAdaptor::~SettingWidgetAdaptor
virtual ~SettingWidgetAdaptor()
Definition: dlgcontentfetchsettingwidget.h:59
DlgContentFetchSettingWidget::load
virtual void load()
Definition: dlgcontentfetchsettingwidget.cpp:218
DlgContentFetchSettingWidget::configureScript
void configureScript(QWidget *widget, QObject *configadaptor)
DlgContentFetchSettingWidget::save
virtual void save()
Definition: dlgcontentfetchsettingwidget.cpp:207
SettingWidgetAdaptor
Definition: dlgcontentfetchsettingwidget.h:54
DlgContentFetchSettingWidget
Definition: dlgcontentfetchsettingwidget.h:20
KCModule
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:53:17 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kget

Skip menu "kget"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

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