2 This file is part of Blogilo, A KDE Blogging Client
4 Copyright (C) 2008-2010 Mehrdad Momeny <mehrdad.momeny@gmail.com>
5 Copyright (C) 2008-2010 Golnaz Nilieh <g382nilieh@gmail.com>
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation; either version 2 of
10 the License or (at your option) version 3 or any later version
11 accepted by the membership of KDE e.V. (or its successor approved
12 by the membership of KDE e.V.), which shall act as a proxy
13 defined in Section 14 of version 3 of the license.
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, see http://www.gnu.org/licenses/
28 #include "bilbopost.h"
29 #include "bilboblog.h"
31 #include <kxmlguiwindow.h>
35 class KStatusNotifierItem
;
44 Main window of blogilo...
46 @author Mehrdad Momeny <mehrdad.momeny@gmail.com>
47 @author Golnaz Nilieh <g382nilieh@gmail.com>
51 class StorageServiceManager
;
54 class MainWindow
: public KXmlGuiWindow
63 void mediaFilesUploaded( int count
);
64 void settingsChanged();
67 void slotOpenCurrentBlogInBrowser();
68 void slotSettingsChanged();
69 void slotCreateNewPost();
71 void slotPostTitleChanged( const QString
& title
);
72 void slotToggleToolboxVisible( bool isVisible
);
73 void slotToolboxVisibilityChanged( bool isVisible
);
74 void slotActivePostChanged( int tabIndex
);
75 void slotNewPostOpened( BilboPost
&newPost
, int blog_id
);
77 void slotPublishPost();
80 * Remove widget at position @p pos from main tab wigdet
82 void slotRemovePostEntry( int post
);
84 void slotSavePostLocally();
86 void slotError( const QString
&errorMessage
);
89 To open temporary posts and that posts are open at previous quit.
92 void uploadMediaObject();
94 void optionsPreferences();
95 void postManipulationDone( bool isError
, const QString
&customMessage
);
96 void slotBusy( bool isBusy
);
97 void slotShowStatusMessage(const QString
&message
, bool isPermanent
);
98 void currentBlogChanged( QAction
* );
100 void slotBlogAdded( const BilboBlog
&blog
);
101 void slotBlogEdited( const BilboBlog
&blog
);
102 void slotBlogRemoved( int blog_id
);
104 void slotDialogDestroyed( QObject
*win
);
106 void slotCloseTabClicked();
107 void slotRemoveAllExclude(int);
109 void slotUploadFileDone(const QString
&serviceName
, const QString
&filename
);
110 void slotUploadFileFailed(const QString
&serviceName
, const QString
&filename
);
111 void slotActionFailed(const QString
&serviceName
, const QString
&filename
);
114 void keyPressEvent( QKeyEvent
* event
);
115 void closeEvent( QCloseEvent
*event
);
118 void setCurrentBlog( int blog_id
);
120 void setupSystemTray();
122 void initStorageService();
123 void setupStatusBar();
125 Create a new post entry,
126 and return pointer to it's widget (Actually return value is a PostEntry instance)
128 QWidget
* createPostEntry(int blog_id
, const BilboPost
& post
);
131 QDockWidget
*toolboxDock
;
132 QPointer
<PostEntry
> activePost
;
133 KStatusNotifierItem
*systemTray
;
134 PostsTabWidget
*tabPosts
;
136 int previousActivePostIndex
;
138 int busyNumber
;///If this is 0 so there isn't any progress! otherwise there is! so progressbar will show
139 QProgressBar
*progress
;
141 KSelectAction
*blogs
;
143 QToolButton
*mCloseTabButton
;
144 QToolButton
*mNewTabButton
;
145 PimCommon::StorageServiceManager
*mStorageManager
;