Blokkal
an Extendable KDE Blogging Client
SourceForge.net Logo

stdaction.h

00001 /***************************************************************************
00002  *   Copyright (C) 2006 - 2008 by Martin Mueller                           *
00003  *   orvio@orvio.de                                                        *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 #ifndef BLOKKAL_UISTDACTION_H
00021 #define BLOKKAL_UISTDACTION_H
00022 
00023 #include "../blokkal_export.h"
00024 
00025 #include <kstdaction.h>
00026 
00027 class KAction;
00028 class KActionCollection;
00029 class QObject;
00030 
00031 namespace KSettings {
00032 class Dialog;
00033 }
00034 
00035 namespace Blokkal {
00036 namespace Ui {
00037 
00044 class BLOKKAL_EXPORT StdAction {
00045 public:
00049         enum StdActions {
00050                 Bold, 
00051                 Italic, 
00052                 Underline, 
00053                 Strike, 
00054                 Link, 
00055                 Image, 
00056                 Post, 
00057         };
00058 
00068         static KAction * create( Blokkal::Ui::StdAction::StdActions id, const char * name, const QObject * receiver, const char * slot, KActionCollection * parent = 0 );
00069 
00078         static KAction * bold( const QObject * receiver, const char * slot, KActionCollection * parent = 0, const char * name = "edit_bold" );
00079 
00088         static KAction * italic( const QObject * receiver, const char * slot, KActionCollection * parent = 0, const char * name = "edit_italic" );
00089 
00098         static KAction * underline( const QObject * receiver, const char * slot, KActionCollection * parent = 0, const char * name = "edit_underline" );
00099 
00108         static KAction * strike( const QObject * receiver, const char * slot, KActionCollection * parent = 0, const char * name = "edit_strike" );
00109 
00118         static KAction * link( const QObject * receiver, const char * slot, KActionCollection * parent = 0, const char * name = "edit_insertlink" );
00119 
00128         static KAction * image( const QObject * receiver, const char * slot, KActionCollection * parent = 0, const char * name = "edit_insertimage" );
00129 
00138         static KAction * post( const QObject * receiver, const char * slot, KActionCollection * parent = 0, const char * name = "file_postentry" );
00139 
00146         static KAction * preferences( KActionCollection * parent = 0, const char * name = KStandardAction::name( KStandardAction::Preferences ) );
00147 
00148 private:
00149         static KSettings::Dialog * m_preferencesDialog;
00150         StdAction( void );
00151         ~StdAction( void );
00152 
00153 };
00154 
00155 }
00156 
00157 }
00158 
00159 #endif