diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 2bda8f7717adf28da4af0d34fb82f63d2868c31d (patch) | |
tree | 8d927b7b47a90c4adb646482a52613f58acd6f8c /ark/mainwindow.h | |
download | tdeutils-2bda8f7717adf28da4af0d34fb82f63d2868c31d.tar.gz tdeutils-2bda8f7717adf28da4af0d34fb82f63d2868c31d.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ark/mainwindow.h')
-rw-r--r-- | ark/mainwindow.h | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/ark/mainwindow.h b/ark/mainwindow.h new file mode 100644 index 0000000..2d25ed0 --- /dev/null +++ b/ark/mainwindow.h @@ -0,0 +1,112 @@ +/* + + ark -- archiver for the KDE project + + Copyright (C) 2002-2003: Georg Robbers <[email protected]> + Copyright (C) 2003: Helio Chissini de Castro <[email protected]> + + 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) any later version. + + 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +*/ + +#ifndef ARKMAINWINDOW_H +#define ARKMAINWINDOW_H + +// QT includes +#include <qstring.h> +#include <qpopupmenu.h> +#include <qtimer.h> + +// KDE includes +#include <kmainwindow.h> +#include <kparts/mainwindow.h> +#include <kparts/part.h> +#include <kprogress.h> + +class ArkWidget; + +class +MainWindow: public KParts::MainWindow +{ + Q_OBJECT +public: + MainWindow( QWidget *parent=0, const char *name=0 ); + virtual ~MainWindow(); + + void setExtractOnly ( bool b ); + void extractTo( const KURL & targetDirectory, const KURL & archive, bool guessName ); + void addToArchive( const KURL::List & filesToAdd, const QString & cwd = QString::null, + const KURL & archive = KURL(), bool askForName = false ); + +public slots: + void file_newWindow(); + void file_new(); + void openURL( const KURL & url, bool tempFile = false ); + void file_open(); + void file_reload(); + void editToolbars(); + void window_close(); + void file_quit(); + void file_close(); + void slotNewToolbarConfig(); + void slotConfigureKeyBindings(); + virtual void saveProperties( KConfig* config ); + virtual void readProperties( KConfig* config ); + void slotSaveProperties(); + void slotArchivePopup( const QPoint &pPoint); + void slotRemoveRecentURL( const KURL &url ); + void slotAddRecentURL( const KURL &url ); + void slotFixActionState( const bool & bHaveFiles ); + void slotDisableActions(); + void slotAddOpenArk( const KURL & _arkname ); + void slotRemoveOpenArk( const KURL & _arkname ); + +protected: + virtual bool queryClose(); // SM + +private: // methods + // disabling/enabling of buttons and menu items + void setupActions(); + void setupMenuBar(); + + void newCaption(const QString & filename); + bool arkAlreadyOpen( const KURL & url ); + + KURL getOpenURL( bool addOnly = false , const QString & caption = QString::null, + const QString & startDir = QString::null, + const QString & suggestedName = QString::null ); + + void startProgressDialog( const QString & text ); + +private slots: + void slotProgress(); + +private: // data + KParts::ReadWritePart *m_part; + ArkWidget *m_widget; //the parts widget + + KAction *newWindowAction; + KAction *newArchAction; + KAction *openAction; + KAction *closeAction; + KAction *reloadAction; + KRecentFilesAction *recent; + + //progress dialog for konqs service menus / commmand line + KProgressDialog *progressDialog; + QTimer *timer; +}; + +#endif /* ARKMAINWINDOW_H*/ |