1 /* This file is part of the KDE project
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>
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public
9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version.
16 #include <ktoggleaction.h>
17 #include <kxmlguiwindow.h>
24 class DBusModelObserver
;
27 * The main window of KGet.
29 * Can be collapsed or expanded.
31 class MainWindow
: public KXmlGuiWindow
35 explicit MainWindow(bool showMainwindow
= true, bool startWithoutAnimation
= false, QWidget
*parent
= 0);
38 // from the DBUS interface
39 virtual void addTransfers(const QString
& src
, const QString
& destDir
= QString(),
41 virtual bool dropTargetVisible() const;
42 virtual void setDropTargetVisible( bool setVisible
);
43 virtual void setOfflineMode( bool online
);
44 virtual bool offlineMode() const;
45 virtual QVariantMap
transfers() const;
46 virtual int transfersSpeed() const;
48 KSystemTrayIcon
*systemTray() const { return m_dock
;};
54 // ignore/accept quit events
55 virtual void closeEvent( QCloseEvent
* );
58 virtual void dragEnterEvent(QDragEnterEvent
*);
59 virtual void dropEvent(QDropEvent
*);
62 // slots connected to actions
63 void slotToggleDropTarget();
64 void slotNewTransfer();
65 void slotImportTransfers();
66 void slotExportTransfers();
67 void slotPreferences();
68 void slotDeleteGroup();
69 void slotRenameGroup();
70 void slotStartDownload();
71 void slotStopDownload();
72 void slotConfigureNotifications();
73 void slotConfigureKeys();
74 void slotConfigureToolbars();
75 void slotToggleAutoPaste();
76 void slotTrayKonquerorIntegration(bool);
77 void slotKonquerorIntegration( bool );
78 void slotShowMenubar();
81 void slotStopAllDownload();
82 void slotStopSelectedDownload();
83 void slotStartAllDownload();
84 void slotStartSelectedDownload();
85 void slotDeleteSelected();
86 void slotTransfersOpenDest();
87 void slotTransfersShowDetails();
88 void slotTransfersCopySourceUrl();
91 void slotDelayedInit();
92 void slotSaveMyself();
93 void slotNewToolbarConfig();
95 void slotCheckClipboard();
102 ViewsContainer
* m_viewsContainer
;
103 // dbus modelObserver to export the transfer percents
104 DBusModelObserver
*m_dbusModelObserver
;
111 KToggleAction
* m_autoPasteAction
;
112 KToggleAction
* m_menubarAction
;
113 KToggleAction
* m_konquerorIntegration
;
115 // for autopaste function
116 QString lastClipboard
;
117 // timer for checking clipboard - autopaste function
118 QTimer
*clipboardTimer
;
120 bool m_startWithoutAnimation
;