Commit b10a6920 authored by Mehrdad Momeny's avatar Mehrdad Momeny

Importing Blogilo src into playground

It's A KDE Blogging Client
Formerly known as Bilbo!

svn path=/trunk/playground/pim/blogilo/; revision=1025621
parent a48e4e5d
project(blogilo)
cmake_minimum_required(VERSION 2.6)
find_package(KDE4 REQUIRED)
find_package(KdepimLibs REQUIRED)
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
add_subdirectory( src )
add_subdirectory( icons )
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) version 3 or any later version
accepted by the membership of KDE e.V. (or its successor approved
by the membership of KDE e.V.), which shall act as a proxy
defined in Section 14 of version 3 of the license.
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, see http://www.gnu.org/licenses/
Blogilo is a free/Open Source Blogging application, focused on simplicity and usability.
Requirements to build
-=-=-=-=-=-=-=-=-=-=-=-=-=
Blogilo depends on KDELibs, KDEPimLibs and Boost libraries.
You need KDELibs and KDEPimLibs and Boost library development packages. (e.g. for Kubuntu: kdelibs5-dev and kdepimlibs5-dev and libboost-dev)
How To Build The Project
-=-=-=-=-=-=-=-=-=-=-=-=-=
cd blogilo
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` ..
make
sudo make install OR su -c 'make install'
to uninstall the project:
make uninstall or su -c 'make uninstall'
kde4_install_icons( ${ICON_INSTALL_DIR} )
include (KDE4Defaults)
include_directories( ${QT_INCLUDES} ${KDEPIMLIBS_INCLUDE_DIR} ${KDE4_INCLUDES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
SET(QT_USE_QTSQL 1)
add_subdirectory(htmlconvertors)
IF(WIN32)
set(blogilo_SRCS
main.cpp
mainwindow.cpp
toolbox.cpp
addeditblog.cpp
postentry.cpp
dbman.cpp
global.cpp
bilbopost.cpp
bilboblog.cpp
backend.cpp
entriescountdialog.cpp
bilbomedia.cpp
addcategory.cpp
catcheckbox.cpp
sendtoblogdialog.cpp
waitwidget.cpp
blogsettings.cpp
uploadmediadialog.cpp
syncuploader.cpp
composer/bilbobrowser_win.cpp
composer/htmleditor.cpp
composer/stylegetter.cpp
composer/medialistwidget.cpp
composer/bilboeditor.cpp
composer/multilinetextedit.cpp
composer/dialogs/addeditlink.cpp
composer/dialogs/addmediadialog.cpp
composer/dialogs/addimagedialog.cpp
)
ELSE(WIN32)
set(blogilo_SRCS
main.cpp
mainwindow.cpp
toolbox.cpp
addeditblog.cpp
postentry.cpp
dbman.cpp
global.cpp
bilbopost.cpp
bilboblog.cpp
backend.cpp
entriescountdialog.cpp
bilbomedia.cpp
addcategory.cpp
catcheckbox.cpp
sendtoblogdialog.cpp
waitwidget.cpp
blogsettings.cpp
uploadmediadialog.cpp
syncuploader.cpp
composer/bilbobrowser.cpp
composer/htmleditor.cpp
composer/stylegetter.cpp
composer/medialistwidget.cpp
composer/bilboeditor.cpp
composer/multilinetextedit.cpp
composer/dialogs/addeditlink.cpp
composer/dialogs/addmediadialog.cpp
composer/dialogs/addimagedialog.cpp
)
ENDIF(WIN32)
kde4_add_ui_files(
blogilo_SRCS
toolboxbase.ui
addeditblogbase.ui
entriescountdialogbase.ui
addcategorybase.ui
settingsbase.ui
editorsettingsbase.ui
advancedsettingsbase.ui
sendtoblogbase.ui
waitwidgetbase.ui
blogsettingsbase.ui
uploadmediabase.ui
composer/dialogs/addmediadialogbase.ui
composer/dialogs/editimagebase.ui
composer/dialogs/addeditlinkbase.ui
)
kde4_add_kcfg_files( blogilo_SRCS settings.kcfgc)
kde4_add_app_icon(blogilo_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/../icons/hi*-app-blogilo.png")
kde4_add_executable( blogilo ${blogilo_SRCS})
IF(WIN32)
target_link_libraries( blogilo ${KDE4_KDEUI_LIBS} ${QT_QTSQL_LIBRARY} ${KDE4_KTEXTEDITOR_LIBS} ${QT_QTWEBKIT_LIBRARY} ${KDE4_KBLOG_LIBRARY} htmlconvertors )
ELSE(WIN32)
target_link_libraries( blogilo ${KDE4_KDEUI_LIBS} ${QT_QTSQL_LIBRARY} ${KDE4_KTEXTEDITOR_LIBS} ${KDE4_KHTML_LIBS} ${KDE4_KBLOG_LIBS} htmlconvertors )
ENDIF(WIN32)
install( TARGETS blogilo DESTINATION ${BIN_INSTALL_DIR} )
########### install files ###############
install( FILES ../blogilo.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
install( FILES blogilo.kcfg DESTINATION ${KCFG_INSTALL_DIR} )
install( FILES blogiloui.rc DESTINATION ${DATA_INSTALL_DIR}/blogilo )
#! /usr/bin/env bash
$EXTRACTRC `find . -name \*.rc -o -name \*.ui` >> rc.cpp
$XGETTEXT *.cpp -o $podir/bilbo.pot
rm -f rc.cpp
/***************************************************************************
* This file is part of the Bilbo Blogger. *
* Copyright (C) 2008-2009 Mehrdad Momeny <mehrdad.momeny@gmail.com> *
* Copyright (C) 2008-2009 Golnaz Nilieh <g382nilieh@gmail.com> *
* *
* 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 3 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., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "addcategory.h"
AddCategory::AddCategory( QWidget *parent )
: KDialog( parent )
{
QWidget *dialog = new QWidget( this );
ui.setupUi( dialog );
dialog->setAttribute( Qt::WA_DeleteOnClose );
this->setMainWidget( dialog );
}
#include "addcategory.moc"
/***************************************************************************
* This file is part of the Bilbo Blogger. *
* Copyright (C) 2008-2009 Mehrdad Momeny <mehrdad.momeny@gmail.com> *
* Copyright (C) 2008-2009 Golnaz Nilieh <g382nilieh@gmail.com> *
* *
* 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 3 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., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef ADDCATEGORY_H
#define ADDCATEGORY_H
#include <kdialog.h>
#include "ui_addcategorybase.h"
class AddCategory: public KDialog
{
Q_OBJECT
public:
AddCategory( QWidget *parent = 0 );
private:
Ui::AddCategoryBase ui;
};
#endif
<ui version="4.0" >
<class>AddCategoryBase</class>
<widget class="QWidget" name="AddCategoryBase" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>328</width>
<height>144</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout" >
<item row="0" column="0" >
<widget class="QLabel" name="label" >
<property name="text" >
<string>Category Name: </string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="KLineEdit" name="txtCategory" />
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>Category Slug: </string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="KLineEdit" name="txtSLug" />
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_4" >
<property name="text" >
<string>Parent Category:</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="KComboBox" name="comboParent" />
</item>
<item row="3" column="0" >
<widget class="QLabel" name="label_3" >
<property name="text" >
<string>Description:</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="KLineEdit" name="txtDescription" />
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KComboBox</class>
<extends>QComboBox</extends>
<header>kcombobox.h</header>
</customwidget>
<customwidget>
<class>KLineEdit</class>
<extends>QLineEdit</extends>
<header>klineedit.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
This diff is collapsed.
/***************************************************************************
* This file is part of the Bilbo Blogger. *
* Copyright (C) 2008-2009 Mehrdad Momeny <mehrdad.momeny@gmail.com> *
* Copyright (C) 2008-2009 Golnaz Nilieh <g382nilieh@gmail.com> *
* *
* 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 3 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., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef ADDEDITBLOG_H
#define ADDEDITBLOG_H
#include <KDialog>
#include "ui_addeditblogbase.h"
#include <kblog/blog.h>
#include "bilboblog.h"
class BilboBlog;
class KJob;
class WaitWidget;
/**
@author Mehrdad Momeny <mehrdad.momeny@gmail.com>
@author Golnaz Nilieh <g382nilieh@gmail.com>
*/
class AddEditBlog: public KDialog
{
Q_OBJECT
public:
/**
*
* @param blog_id id of blog we will edit it, for adding a blog this should be "-1"
* @param parent Parent
*/
AddEditBlog( int blog_id, QWidget *parent = 0, Qt::WFlags flags = 0 );
~AddEditBlog();
protected Q_SLOTS:
virtual void slotButtonClicked( int button );
void enableAutoConfBtn();
void enableOkButton( const QString & );
void autoConfigure();
void fetchBlogId();
void fetchedBlogId( const QList<QMap<QString, QString> >& list );
void fetchedProfileId( const QString& );
void handleFetchIDTimeout();
void handleFetchAPITimeout();
void handleFetchError( KBlog::Blog::ErrorType type, const QString& errorMsg );
void sltReturnPressed();
void setSupportedFeatures( BilboBlog::ApiType api );
void slotComboApiChanged( int index );
void gotHtml( KJob * );
void gotXmlRpcTest( KJob *job );
Q_SIGNALS:
void sigBlogAdded( const BilboBlog& );
void sigBlogEdited( const BilboBlog& );
private:
void showWaitWidget( QString text );
void hideWaitWidget();
Ui::AddEditBlogBase ui;
KTabWidget *mainW;
bool isNewBlog;
BilboBlog *bBlog;
KBlog::Blog *mBlog;
QTimer* mFetchProfileIdTimer;
QTimer* mFetchBlogIdTimer;
QTimer* mFetchAPITimer;
bool isIdFetched;
WaitWidget *wait;
QString tmpBlogUrl;
};
#endif
<ui version="4.0" >
<class>AddEditBlogBase</class>
<widget class="KTabWidget" name="AddEditBlogBase" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>395</width>
<height>335</height>
</rect>
</property>
<property name="currentIndex" >
<number>0</number>
</property>
<widget class="QWidget" name="tabBasic" >
<attribute name="title" >
<string>Basic</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_2" >
<item row="0" column="0" colspan="3" >
<widget class="QLabel" name="label_18" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Configuring your blog account...</string>
</property>
<property name="buddy" >
<cstring>txtUrl</cstring>
</property>
</widget>
</item>
<item row="2" column="0" colspan="3" >
<widget class="QLabel" name="label_4" >
<property name="sizePolicy" >
<sizepolicy vsizetype="MinimumExpanding" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>Please fill in these fields, and click the "AutoConfigure" button to program guess your blog settings.
You can set more options on Advanced tab.</string>
</property>
<property name="scaledContents" >
<bool>false</bool>
</property>
<property name="wordWrap" >
<bool>true</bool>
</property>
<property name="buddy" >
<cstring>txtUrl</cstring>
</property>
</widget>
</item>
<item row="3" column="0" colspan="3" >
<widget class="KSeparator" name="kseparator" />
</item>
<item row="4" column="0" >
<widget class="QLabel" name="label_9" >
<property name="text" >
<string>Title:</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="5" column="0" >
<widget class="QLabel" name="label" >
<property name="text" >
<string>Blog/Homepage URL:</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy" >
<cstring>txtUrl</cstring>
</property>
</widget>
</item>
<item row="5" column="1" colspan="2" >
<widget class="KLineEdit" name="txtUrl" >
<property name="text" >
<string>http://</string>
</property>
<property name="clickMessage" >
<string>http://YourHomePage.com</string>
</property>
<property name="showClearButton" stdset="0" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="6" column="1" colspan="2" >
<widget class="QLabel" name="label_17" >
<property name="font" >
<font>
<pointsize>8</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text" >
<string>e.g. : http://domain.com/blog/</string>
</property>
</widget>
</item>
<item row="7" column="0" >
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>Username:</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy" >
<cstring>txtUser</cstring>
</property>
</widget>
</item>
<item row="7" column="1" colspan="2" >
<widget class="KLineEdit" name="txtUser" />
</item>
<item row="8" column="0" >
<widget class="QLabel" name="label_3" >
<property name="text" >
<string>Password:</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy" >
<cstring>txtPass</cstring>
</property>
</widget>
</item>
<item row="8" column="1" colspan="2" >
<widget class="KLineEdit" name="txtPass" >
<property name="echoMode" >
<enum>QLineEdit::Password</enum>
</property>
<property name="urlDropsEnabled" >
<bool>false</bool>
</property>
<property name="showClearButton" stdset="0" >
<bool>true</bool>
</property>
<property name="passwordMode" >
<bool>true</bool>
</property>
</widget>
</item>