• 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
mainwindow.h
Go to the documentation of this file.
1 /* This file is part of the KDE project
2 
3  Copyright (C) 2002 by Patrick Charbonnier <pch@freeshell.org>
4  Based On Caitoo v.0.7.3 (c) 1998 - 2000, Matej Koss
5  Copyright (C) 2006 Dario Massarin <nekkar@libero.it>
6  Copyright (C) 2009 - 2010 Matthias Fuchs <mat69@gmx.net>
7 
8  This program is free software; you can redistribute it and/or
9  modify it under the terms of the GNU General Public
10  License as published by the Free Software Foundation; either
11  version 2 of the License, or (at your option) any later version.
12 */
13 
14 #ifndef MAINWINDOW_H
15 #define MAINWINDOW_H
16 
17 #include <ktoggleaction.h>
18 #include <kxmlguiwindow.h>
19 #include <kurl.h>
20 
21 #include <kstatusnotifieritem.h>
22 #include "ui/tray.h"
23 #include "core/transfer.h"
24 #include "core/transfergroup.h"
25 
26 #ifdef HAVE_QCA2
27 #include <QtCrypto>
28 #endif
29 
30 class ViewsContainer;
31 class DropTarget;
32 class DBusKgetWrapper;
33 class HttpServer;
34 class KGet;
35 
41 class MainWindow : public KXmlGuiWindow
42 {
43  friend class DBusKGetWrapper;
44 
45 Q_OBJECT
46 public:
47  explicit MainWindow(bool showMainwindow = true, bool startWithoutAnimation = false, bool doTesting = false, QWidget *parent = 0);
48  ~MainWindow();
49 
50  virtual void setSystemTrayDownloading(bool running);
51 
52  //no slot, to make sure that MainWindow is correctly initialized before any transfers get added
53  void init();
54 
55 public slots:
56  void slotQuit();
57  void slotImportUrl(const QString &url);
58  void slotUpdateTitlePercent();
59 
60 protected:
61  // ignore/accept quit events
62  virtual void closeEvent(QCloseEvent *);
63  virtual void hideEvent(QHideEvent *);
64  virtual void showEvent(QShowEvent *);
65 
66  // drag and drop
67  virtual void dragEnterEvent(QDragEnterEvent *);
68  virtual void dropEvent(QDropEvent *);
69 
70  // set sensitive initial size
71  virtual QSize sizeHint() const;
72 
73 private slots:
74  // slots connected to actions
75  void slotToggleDropTarget();
76  void slotNewTransfer();
77  void slotImportTransfers();
78  void slotExportTransfers();
79  void slotPreferences();
80  void slotDeleteGroup();
81  void slotRenameGroup();
82  void slotSetIconGroup();
83  void slotStartDownload();
84  void slotStopDownload();
85  void slotConfigureNotifications();
86  void slotToggleAutoPaste();
87  void slotTrayKonquerorIntegration(bool);
88  void slotKonquerorIntegration( bool );
89  void slotShowMenubar();
90  void slotTransferGroupSettings();
91  void slotTransferSettings();
92  void slotCreateMetalink();
93  void slotPriorityTop();
94  void slotPriorityBottom();
95  void slotPriorityUp();
96  void slotPriorityDown();
97  void slotDownloadFinishedActions();
98 
99  // transfers slots
100  void slotStopAllDownload();
101  void slotStopSelectedDownload();
102  void slotStartAllDownload();
103  void slotStartSelectedDownload();
104  void slotDeleteSelected();
105  void slotDeleteSelectedIncludingFiles();
106  void slotRedownloadSelected();
107  void slotTransfersOpenDest();
108  void slotTransfersOpenFile();
109  void slotTransfersShowDetails();
110  void slotTransfersCopySourceUrl();
111  void slotDeleteFinished();
112 
113  // misc slots
114  void slotSaveMyself();
115  void slotNewToolbarConfig();
116  void slotNewConfig();
117  void slotCheckClipboard();
118  void slotTransferHistory();
119 
120  // import links slots
121  void slotShowListLinks();
122 
123  //Model changes
124  void slotTransfersChanged(QMap<TransferHandler*, Transfer::ChangesFlags> transfers);
125  void slotGroupsChanged(QMap<TransferGroupHandler*, TransferGroup::ChangesFlags> groups);
126 
127 private:
131  int transfersPercent();
132 
133  // one-time functions
134  void setupActions();
135 
136  KGet * m_kget;
137 
138  // internal widgets
139  ViewsContainer * m_viewsContainer;
140 
141  // separated widgets
142  DropTarget * m_drop;
143  Tray * m_dock;
144 
145  // actions
146  KToggleAction * m_autoPasteAction;
147  KToggleAction * m_menubarAction;
148  KToggleAction * m_konquerorIntegration;
149 
150  // for autopaste function
151  QString lastClipboard;
152  // timer for checking clipboard - autopaste function
153  QTimer *clipboardTimer;
154 
155  bool m_startWithoutAnimation;
156  bool m_doTesting; // UnitTest flag
157 
158  HttpServer *m_webinterface;
159 
160 #ifdef HAVE_QCA2
161  QCA::Initializer m_qcaInit;
162 #endif //HAVE_QCA2
163 };
164 
165 #endif
MainWindow::dropEvent
virtual void dropEvent(QDropEvent *)
Definition: mainwindow.cpp:1189
MainWindow::hideEvent
virtual void hideEvent(QHideEvent *)
Definition: mainwindow.cpp:1173
MainWindow::slotQuit
void slotQuit()
Definition: mainwindow.cpp:563
QWidget
MainWindow::dragEnterEvent
virtual void dragEnterEvent(QDragEnterEvent *)
Definition: mainwindow.cpp:1183
MainWindow::sizeHint
virtual QSize sizeHint() const
Definition: mainwindow.cpp:115
Tray
This class implements the main tray icon for kget.
Definition: tray.h:27
MainWindow::closeEvent
virtual void closeEvent(QCloseEvent *)
widget events
Definition: mainwindow.cpp:1160
MainWindow::MainWindow
MainWindow(bool showMainwindow=true, bool startWithoutAnimation=false, bool doTesting=false, QWidget *parent=0)
Definition: mainwindow.cpp:62
ViewsContainer
Definition: viewscontainer.h:22
KXmlGuiWindow
MainWindow::init
void init()
Definition: mainwindow.cpp:403
MainWindow::slotUpdateTitlePercent
void slotUpdateTitlePercent()
Definition: mainwindow.cpp:513
DropTarget
Definition: droptarget.h:32
transfergroup.h
DBusKGetWrapper::transfers
QVariantMap transfers() const
Definition: dbuskgetwrapper.cpp:110
tray.h
HttpServer
Definition: httpserver.h:22
MainWindow::setSystemTrayDownloading
virtual void setSystemTrayDownloading(bool running)
Definition: mainwindow.cpp:1106
DBusKGetWrapper
Definition: dbuskgetwrapper.h:32
MainWindow::slotImportUrl
void slotImportUrl(const QString &url)
Definition: mainwindow.cpp:1152
transfer.h
MainWindow::~MainWindow
~MainWindow()
Definition: mainwindow.cpp:100
KGet
This is our KGet class.
Definition: kget.h:67
MainWindow
The main window of KGet.
Definition: mainwindow.h:41
MainWindow::showEvent
virtual void showEvent(QShowEvent *)
Definition: mainwindow.cpp:1178
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