From c0cf369b92386b5984d350c883e899f78a53b4eb Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Sun, 17 Feb 2013 10:19:02 +0100 Subject: [PATCH] initial project import from KDevelop --- CMakeLists.txt | 10 ++ README | 44 ++++++ doc/CMakeLists.txt | 4 + doc/README.DOC | 13 ++ icons/CMakeLists.txt | 1 + icons/hi16-app-danbooru_client.png | Bin 0 -> 495 bytes icons/hi32-app-danbooru_client.png | Bin 0 -> 1139 bytes icons/hi48-app-danbooru_client.png | Bin 0 -> 1784 bytes kapp4.png | Bin 0 -> 9750 bytes src/CMakeLists.txt | 22 +++ src/Messages.sh | 3 + src/danbooru_client.cpp | 108 +++++++++++++++ src/danbooru_client.desktop | 103 ++++++++++++++ src/danbooru_client.h | 71 ++++++++++ src/danbooru_client.kcfg | 21 +++ src/danbooru_clientui.rc | 8 ++ src/danbooru_clientview.cpp | 60 ++++++++ src/danbooru_clientview.h | 73 ++++++++++ src/danbooru_clientview_base.ui | 211 +++++++++++++++++++++++++++++ src/main.cpp | 72 ++++++++++ src/prefs_base.ui | 153 +++++++++++++++++++++ src/settings.kcfgc | 6 + 22 files changed, 983 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 README create mode 100644 doc/CMakeLists.txt create mode 100644 doc/README.DOC create mode 100644 icons/CMakeLists.txt create mode 100644 icons/hi16-app-danbooru_client.png create mode 100644 icons/hi32-app-danbooru_client.png create mode 100644 icons/hi48-app-danbooru_client.png create mode 100644 kapp4.png create mode 100644 src/CMakeLists.txt create mode 100644 src/Messages.sh create mode 100644 src/danbooru_client.cpp create mode 100644 src/danbooru_client.desktop create mode 100644 src/danbooru_client.h create mode 100644 src/danbooru_client.kcfg create mode 100644 src/danbooru_clientui.rc create mode 100644 src/danbooru_clientview.cpp create mode 100644 src/danbooru_clientview.h create mode 100644 src/danbooru_clientview_base.ui create mode 100644 src/main.cpp create mode 100644 src/prefs_base.ui create mode 100644 src/settings.kcfgc diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..3f60b11 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,10 @@ +project(danbooru_client) + +find_package(KDE4 REQUIRED) +include (KDE4Defaults) + +include_directories( ${KDE4_INCLUDES} ${QT_INCLUDES} ) + +#add_subdirectory( doc ) +add_subdirectory( src ) +add_subdirectory( icons ) diff --git a/README b/README new file mode 100644 index 0000000..fa38328 --- /dev/null +++ b/README @@ -0,0 +1,44 @@ +How To Build This Template +-=-=-=-=-=-=-=-=-=-=-=-=-= + +--- On Unix: + +cd +mkdir build +cd build +cmake -DCMAKE_INSTALL_PREFIX=$KDEDIRS -DCMAKE_BUILD_TYPE=Debug .. <- do not forget the .. +make +make install or su -c 'make install' + +where $KDEDIRS points to your KDE installation prefix. + +to uninstall the project: +make uninstall or su -c 'make uninstall' + +Note: you can use another build path. Then cd in your build dir and: +export KDE_SRC=path_to_your_src +cmake $KDE_SRC -DCMAKE_INSTALL_PREFIX=$KDEDIRS -DCMAKE_BUILD_TYPE=Debug + +--- On Windows: + +cd +mkdir build +cd build +cmake -DCMAKE_INSTALL_PREFIX=%KDEDIRS% -DCMAKE_BUILD_TYPE=Debug .. <- do not forget the .. +[n]make +[n]make install + +where %KDEDIRS% points to your KDE installation prefix. + +to uninstall the project: +[n]make uninstall + +Note: use nmake if you're building with the Visual Studio compiler, or make +if you're using the minGW compiler + +---------------------------- +Please send all comments to: +Anne-Marie Mahfouf +annma@kde.org + +Last update: July 2009 diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt new file mode 100644 index 0000000..643ac16 --- /dev/null +++ b/doc/CMakeLists.txt @@ -0,0 +1,4 @@ +########### install files ############### +# + +kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR danbooru_client) diff --git a/doc/README.DOC b/doc/README.DOC new file mode 100644 index 0000000..b365dcf --- /dev/null +++ b/doc/README.DOC @@ -0,0 +1,13 @@ +How to add a documentation to your project: + +* copy a template from kdelibs/kdoctools/ to this directory + - article-template.docbook -> article for a short documentation e.g. for a plugin + - template.docbook -> book template for an application + rename the template to index.docbook + edit the content of index.docbook, never use an unmodified template + if you need help with the docbook format mail to the documentation team (kde-doc-english@kde.org) + +* if your documentation is finished, add the doc directory to the CMakeLists.txt in the parent dir + (uncomment the line "#add_subdirectory( doc )" + +* to get your documentation into the translation process, mail to the translation team (kde-i18n-doc@kde.org) diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt new file mode 100644 index 0000000..7affd27 --- /dev/null +++ b/icons/CMakeLists.txt @@ -0,0 +1 @@ +kde4_install_icons( ${ICON_INSTALL_DIR} ) diff --git a/icons/hi16-app-danbooru_client.png b/icons/hi16-app-danbooru_client.png new file mode 100644 index 0000000000000000000000000000000000000000..3d812df9c1b2b522afcdde169b368a549073ac1a GIT binary patch literal 495 zcmVMzCV_|S* zE^l&Yo9;Xs0004QNkloTT22#7>4}`k~jUPZmO#we}xbope}+ix+o#j)YMGv zK1ouvS}=9pbicK=6R-18;j}~ zyd7hVP)sK?gL}Wh;!=`tO@oXcBY<)ieHZ4`uME5O;_Mo0vilMaXEu?bA96$jFeTNc=Q!*jqk|L==I_ z8u*bv7`)~uA}UnhFMWgD$Cq0^9}N zU@^rRuO-No(L{^X#0!$lV$u^1wiC>k^CnYDjVw>f<>QsWG3(CUXKgL0qwA)Q20YOj l(F`*kE`_pT-nuf+{sAkSZCVn{u-pIu002ovPDHLkV1lq8)tLYQ literal 0 HcmV?d00001 diff --git a/icons/hi32-app-danbooru_client.png b/icons/hi32-app-danbooru_client.png new file mode 100644 index 0000000000000000000000000000000000000000..3f6bb9e733ed87bebc6e67497e19e73d1cc9548a GIT binary patch literal 1139 zcmV-(1dRKMP)kdg00002b3#c}2nbc| zMg#x=010qNS#tmY19kua19ky@)q>0b000?uMObuGZ)S9NVRB^vcXxL#X>MzCV_|S* zE^l&Yo9;Xs000B>NklCQcLEvDeLdhas7_aT-CBm+wFLyW+BmhM-yAIL+ zArSC)6Kjr;eB16`#Cb6qzIe6~0P%Z0umit0+3@@5?1iwCdEeTYWy%^Mc@79i<#I%A!C8ZcGm!YpTL(|1S>=&_Uyl&KE}-16v>Q z$J)yCt!1Q=j4#S0-0=%LB3wvA0oez%ML-&Qs-4BiTt^< z@IJ6Her51n6eX$*9u(JLtywLh-NO+}o_Bb|@r`8&&iE2{`#3rMhE ziG?6+BnaIv5+u3E6vYY?;27)IccM2jI1zyRiWXa-SROke4rr=Vz*MV9*Fk1|Vz-rv zDJ0@*$+U89IA9{B>usk%^fV^VrgP{}HpNv!a|?^Pt>tRPCUf;8i7&=%`qfW*;wI81 zApGezELU^IxjfDBGA4!2#pk-Ly)S}&tkQ*f?Kc4LKrEqP4S6cBNXk1$=+FKbL7M+TSZM-9c59LfeiagazMg6PR zZ=$DOr@WOZ%Y}qg1&uUzqQaV)f>uLCy-6UJ>e*Xk`UG!E3?4={8e5Bk#DaJ_Vobra zt`L%^`g(oP27U-a2+fbK0^2~k{VCz`d%=Tt^holQOF)^tR}gvjiSv`f!(m`&l%+Vc zp-j32MmOh<&y+EV=#qKx_j;L9PDe26CQYyXb-%_$vgLnX8QpBE!llei|J{NLH&fG3 zyc_xcOe(82n!66E?00A0**DcSd8-1y7SjEfGGGttz{edUCn>V5Si0p2HBEOgp~ih| z7h!ZGCx<(noJagzg#ff6ly6ec@LyV{a(Vz%s92!Y|Nb`yA%GUTU)-m(3jkYmr39T& zLWm%MTi}szAhYIE!X1YW`lBF}*5>9PZXr=ct5d`6{V(n@08NRkGC2SM002ovPDHLk FV1ft?4{HDb literal 0 HcmV?d00001 diff --git a/icons/hi48-app-danbooru_client.png b/icons/hi48-app-danbooru_client.png new file mode 100644 index 0000000000000000000000000000000000000000..4bd7f0cb1ce177bcfda77d905fe81f960dfd7e1e GIT binary patch literal 1784 zcmVMzCV_|S* zE^l&Yo9;Xs000JeNkl02M@v5CuYGqA|uQ{J^M*i6kZlF(46W6=;!45UG?_+5#=@R_SBAyZ1Go z&fLAzz3etiqVwh4-Mu^Woil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lI(M<+U6VaNQXPr~(X%mhr7)5BfQ(sT)x zr@F$8@aYtyo&=3pl+Pww=6mmlu7r_Ev12K$PHwxO3HfialLM!8a+x(+-tTO|$jc~8 JS4)Bd|37HQo@D?4 literal 0 HcmV?d00001 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..33b3a07 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,22 @@ +set(danbooru_client_SRCS + danbooru_client.cpp + main.cpp + danbooru_clientview.cpp + ) + +kde4_add_ui_files(danbooru_client_SRCS danbooru_clientview_base.ui prefs_base.ui) + +kde4_add_kcfg_files(danbooru_client_SRCS settings.kcfgc ) + +kde4_add_executable(danbooru_client ${danbooru_client_SRCS}) + +target_link_libraries(danbooru_client ${KDE4_KDEUI_LIBS} ) + +install(TARGETS danbooru_client ${INSTALL_TARGETS_DEFAULT_ARGS} ) + + +########### install files ############### + +install( PROGRAMS danbooru_client.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) +install( FILES danbooru_client.kcfg DESTINATION ${KCFG_INSTALL_DIR} ) +install( FILES danbooru_clientui.rc DESTINATION ${DATA_INSTALL_DIR}/danbooru_client ) diff --git a/src/Messages.sh b/src/Messages.sh new file mode 100644 index 0000000..9df36a2 --- /dev/null +++ b/src/Messages.sh @@ -0,0 +1,3 @@ +#! /usr/bin/env bash +$EXTRACTRC `find . -name \*.rc` >> rc.cpp +$XGETTEXT *.cpp -o $podir/danbooru_client.pot diff --git a/src/danbooru_client.cpp b/src/danbooru_client.cpp new file mode 100644 index 0000000..b18332a --- /dev/null +++ b/src/danbooru_client.cpp @@ -0,0 +1,108 @@ +/*************************************************************************** + * Copyright (C) %{CURRENT_YEAR} by %{AUTHOR} <%{EMAIL}> * + * * + * 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 . * + ***************************************************************************/ + +#include "danbooru_client.h" +#include "danbooru_clientview.h" +#include "settings.h" + +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include + +danbooru_client::danbooru_client() + : KXmlGuiWindow(), + m_view(new danbooru_clientView(this)), + m_printer(0) +{ + // accept dnd + setAcceptDrops(true); + + // tell the KXmlGuiWindow that this is indeed the main widget + setCentralWidget(m_view); + + // then, setup our actions + setupActions(); + + // add a status bar + statusBar()->show(); + + // a call to KXmlGuiWindow::setupGUI() populates the GUI + // with actions, using KXMLGUI. + // It also applies the saved mainwindow settings, if any, and ask the + // mainwindow to automatically save settings if changed: window size, + // toolbar position, icon size, etc. + setupGUI(); +} + +danbooru_client::~danbooru_client() +{ +} + +void danbooru_client::setupActions() +{ + KStandardAction::openNew(this, SLOT(fileNew()), actionCollection()); + KStandardAction::quit(qApp, SLOT(closeAllWindows()), actionCollection()); + + KStandardAction::preferences(this, SLOT(optionsPreferences()), actionCollection()); + + // custom menu and menu item - the slot is in the class danbooru_clientView + KAction *custom = new KAction(KIcon("colorize"), i18n("Swi&tch Colors"), this); + actionCollection()->addAction( QLatin1String("switch_action"), custom ); + connect(custom, SIGNAL(triggered(bool)), m_view, SLOT(switchColors())); +} + +void danbooru_client::fileNew() +{ + // this slot is called whenever the File->New menu is selected, + // the New shortcut is pressed (usually CTRL+N) or the New toolbar + // button is clicked + + // create a new window + (new danbooru_client)->show(); +} + +void danbooru_client::optionsPreferences() +{ + // The preference dialog is derived from prefs_base.ui + // + // compare the names of the widgets in the .ui file + // to the names of the variables in the .kcfg file + //avoid to have 2 dialogs shown + if ( KConfigDialog::showDialog( "settings" ) ) { + return; + } + KConfigDialog *dialog = new KConfigDialog(this, "settings", Settings::self()); + QWidget *generalSettingsDlg = new QWidget; + ui_prefs_base.setupUi(generalSettingsDlg); + dialog->addPage(generalSettingsDlg, i18n("General"), "package_setting"); + connect(dialog, SIGNAL(settingsChanged(QString)), m_view, SLOT(settingsChanged())); + dialog->setAttribute( Qt::WA_DeleteOnClose ); + dialog->show(); +} + +#include "danbooru_client.moc" diff --git a/src/danbooru_client.desktop b/src/danbooru_client.desktop new file mode 100644 index 0000000..70211a1 --- /dev/null +++ b/src/danbooru_client.desktop @@ -0,0 +1,103 @@ +[Desktop Entry] +Name=danbooru_client +Name[ast]=danbooru_client +Name[bg]=danbooru_client +Name[bs]=danbooru_client +Name[ca]=danbooru_client +Name[ca@valencia]=danbooru_client +Name[cs]=danbooru_client +Name[da]=danbooru_client +Name[de]=danbooru_client +Name[el]=danbooru_client +Name[en_GB]=danbooru_client +Name[eo]=danbooru_client +Name[es]=danbooru_client +Name[et]=danbooru_client +Name[fi]=danbooru_client +Name[fr]=danbooru_client +Name[ga]=danbooru_client +Name[gl]=danbooru_client +Name[hu]=danbooru_client +Name[it]=danbooru_client +Name[ja]=danbooru_client +Name[kk]=danbooru_client +Name[km]=danbooru_client +Name[ko]=danbooru_client +Name[lt]=danbooru_client +Name[lv]=danbooru_client +Name[nb]=danbooru_client +Name[nds]=danbooru_client +Name[nl]=danbooru_client +Name[nn]=danbooru_client +Name[pa]=danbooru_client +Name[pl]=danbooru_client +Name[pt]=danbooru_client +Name[pt_BR]=danbooru_client +Name[ro]=danbooru_client +Name[ru]=danbooru_client +Name[sk]=danbooru_client +Name[sq]=danbooru_client +Name[sr]=danbooru_client +Name[sr@ijekavian]=danbooru_client +Name[sr@ijekavianlatin]=danbooru_client +Name[sr@latin]=danbooru_client +Name[sv]=danbooru_client +Name[tr]=danbooru_client +Name[ug]=danbooru_client +Name[uk]=danbooru_client +Name[x-test]=xxdanbooru_clientxx +Name[zh_CN]=danbooru_client +Name[zh_TW]=danbooru_client +Exec=danbooru_client %i -caption "%c" +Icon=danbooru_client +Type=Application +X-DocPath=danbooru_client/index.html +GenericName=A KDE4 Application +GenericName[ast]=Una aplicación de KDE4 +GenericName[bg]=Програма за KDE4 +GenericName[bs]=KDE4 aplikacija +GenericName[ca]=Una aplicació del KDE4 +GenericName[ca@valencia]=Una aplicació del KDE4 +GenericName[cs]=Aplikace prostředí KDE +GenericName[da]=Et KDE4-program +GenericName[de]=Eine KDE-4-Anwendung +GenericName[el]=Μια εφαρμογή KDE4 +GenericName[en_GB]=A KDE4 Application +GenericName[es]=Una aplicación de KDE4 +GenericName[et]=KDE4 rakendus +GenericName[fi]=KDE4-sovellus +GenericName[fr]=Une application pour KDE4 +GenericName[ga]=Feidhmchlár KDE4 +GenericName[gl]=Un programa de KDE4 +GenericName[hu]=KDE4-alkalmazás +GenericName[it]=Un'applicazione di KDE 4 +GenericName[ja]=KDE 4 アプリケーション +GenericName[kk]=KDE4 қолданбасы +GenericName[km]=កម្មវិធី KDE4 +GenericName[ko]=KDE4 프로그램 +GenericName[lt]=KDE4 programa +GenericName[lv]=KDE4 lietotne +GenericName[nb]=Et KDE4-program +GenericName[nds]=En KDE4-Programm +GenericName[nl]=Een KDE4-programma +GenericName[nn]=Eit KDE 4-program +GenericName[pa]=KDE4 ਐਪਲੀਕੇਸ਼ਨ +GenericName[pl]=Program dla KDE4 +GenericName[pt]=Uma Aplicação do KDE4 +GenericName[pt_BR]=Um aplicativo do KDE4 +GenericName[ro]=O aplicație KDE4 +GenericName[ru]=Приложение KDE4 +GenericName[sk]=KDE4 aplikáca +GenericName[sq]=Një Program KDE 4 +GenericName[sr]=КДЕ‑4 програм +GenericName[sr@ijekavian]=КДЕ‑4 програм +GenericName[sr@ijekavianlatin]=KDE4 program +GenericName[sr@latin]=KDE4 program +GenericName[sv]=Ett KDE4-program +GenericName[tr]=Bir KDE4 Uygulaması +GenericName[ug]=ك د ئې(KDE) 4 پروگراممىسى +GenericName[uk]=Програма для KDE4 +GenericName[x-test]=xxA KDE4 Applicationxx +GenericName[zh_CN]=KDE4 应用程序 +GenericName[zh_TW]=KDE4 應用程式 +Terminal=false diff --git a/src/danbooru_client.h b/src/danbooru_client.h new file mode 100644 index 0000000..61cbc82 --- /dev/null +++ b/src/danbooru_client.h @@ -0,0 +1,71 @@ +/*************************************************************************** + * Copyright (C) %{CURRENT_YEAR} by %{AUTHOR} <%{EMAIL}> * + * * + * 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 DANBOORU_CLIENT_H +#define DANBOORU_CLIENT_H + + +#include + +#include "ui_prefs_base.h" + +class danbooru_clientView; +class QPrinter; +class KToggleAction; +class KUrl; + +/** + * This class serves as the main window for danbooru_client. It handles the + * menus, toolbars and status bars. + * + * @short Main window class + * @author %{AUTHOR} <%{EMAIL}> + * @version %{VERSION} + */ +class danbooru_client : public KXmlGuiWindow +{ + Q_OBJECT +public: + /** + * Default Constructor + */ + danbooru_client(); + + /** + * Default Destructor + */ + virtual ~danbooru_client(); + +private slots: + void fileNew(); + void optionsPreferences(); + +private: + void setupActions(); + +private: + Ui::prefs_base ui_prefs_base ; + danbooru_clientView *m_view; + + QPrinter *m_printer; + KToggleAction *m_toolbarAction; + KToggleAction *m_statusbarAction; +}; + +#endif // _DANBOORU_CLIENT_H_ diff --git a/src/danbooru_client.kcfg b/src/danbooru_client.kcfg new file mode 100644 index 0000000..a29faf0 --- /dev/null +++ b/src/danbooru_client.kcfg @@ -0,0 +1,21 @@ + + + + + + + black + + + + yellow + + + + 2 + + + diff --git a/src/danbooru_clientui.rc b/src/danbooru_clientui.rc new file mode 100644 index 0000000..0480f80 --- /dev/null +++ b/src/danbooru_clientui.rc @@ -0,0 +1,8 @@ + + + + &Move + + + + diff --git a/src/danbooru_clientview.cpp b/src/danbooru_clientview.cpp new file mode 100644 index 0000000..116d252 --- /dev/null +++ b/src/danbooru_clientview.cpp @@ -0,0 +1,60 @@ +/*************************************************************************** + * Copyright (C) %{CURRENT_YEAR} by %{AUTHOR} <%{EMAIL}> * + * * + * 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 . * + ***************************************************************************/ + +#include "danbooru_clientview.h" +#include "settings.h" + +#include +#include + +danbooru_clientView::danbooru_clientView(QWidget *) +{ + ui_danbooru_clientview_base.setupUi(this); + settingsChanged(); + setAutoFillBackground(true); +} + +danbooru_clientView::~danbooru_clientView() +{ + +} + +void danbooru_clientView::switchColors() +{ + // switch the foreground/background colors of the label + QColor color = Settings::col_background(); + Settings::setCol_background( Settings::col_foreground() ); + Settings::setCol_foreground( color ); + + settingsChanged(); +} + +void danbooru_clientView::settingsChanged() +{ + QPalette pal; + pal.setColor( QPalette::Window, Settings::col_background()); + pal.setColor( QPalette::WindowText, Settings::col_foreground()); + ui_danbooru_clientview_base.kcfg_sillyLabel->setPalette( pal ); + + // i18n : internationalization + ui_danbooru_clientview_base.kcfg_sillyLabel->setText( i18n("This project is %1 days old",Settings::val_time()) ); + emit signalChangeStatusbar( i18n("Settings changed") ); +} + +#include "danbooru_clientview.moc" diff --git a/src/danbooru_clientview.h b/src/danbooru_clientview.h new file mode 100644 index 0000000..1224267 --- /dev/null +++ b/src/danbooru_clientview.h @@ -0,0 +1,73 @@ +/*************************************************************************** + * Copyright (C) %{CURRENT_YEAR} by %{AUTHOR} <%{EMAIL}> * + * * + * 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 DANBOORU_CLIENTVIEW_H +#define DANBOORU_CLIENTVIEW_H + +#include + +#include "ui_danbooru_clientview_base.h" + +class QPainter; +class KUrl; + +/** + * This is the main view class for danbooru_client. Most of the non-menu, + * non-toolbar, and non-statusbar (e.g., non frame) GUI code should go + * here. + * + * @short Main view + * @author %{AUTHOR} <%{EMAIL}> + * @version %{VERSION} + */ + +class danbooru_clientView : public QWidget, public Ui::danbooru_clientview_base +{ + Q_OBJECT +public: + /** + * Default constructor + */ + danbooru_clientView(QWidget *parent); + + /** + * Destructor + */ + virtual ~danbooru_clientView(); + +private: + Ui::danbooru_clientview_base ui_danbooru_clientview_base; + +signals: + /** + * Use this signal to change the content of the statusbar + */ + void signalChangeStatusbar(const QString& text); + + /** + * Use this signal to change the content of the caption + */ + void signalChangeCaption(const QString& text); + +private slots: + void switchColors(); + void settingsChanged(); +}; + +#endif // danbooru_clientVIEW_H diff --git a/src/danbooru_clientview_base.ui b/src/danbooru_clientview_base.ui new file mode 100644 index 0000000..7bc2e7d --- /dev/null +++ b/src/danbooru_clientview_base.ui @@ -0,0 +1,211 @@ + +danbooru_clientview_base + + + + 0 + 0 + 315 + 233 + + + + kapp4_base + + + true + + + + 11 + + + 11 + + + 11 + + + 11 + + + 6 + + + 6 + + + + + + + + + + 255 + 255 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + + + 255 + 255 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + + + 119 + 119 + 119 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + + + Sans Serif + 12 + + + + true + + + hello, world + + + true + + + Qt::AlignCenter + + + false + + + + + + + + diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..54b8fd0 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,72 @@ +/*************************************************************************** + * Copyright (C) %{CURRENT_YEAR} by %{AUTHOR} <%{EMAIL}> * + * * + * 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 . * + ***************************************************************************/ + +#include "danbooru_client.h" +#include +#include +#include +#include + +static const char description[] = + I18N_NOOP("A KDE 4 Application"); + +static const char version[] = "%{VERSION}"; + +int main(int argc, char **argv) +{ + KAboutData about("danbooru_client", 0, ki18n("danbooru_client"), version, ki18n(description), + KAboutData::License_GPL, ki18n("(C) %{CURRENT_YEAR} %{AUTHOR}"), KLocalizedString(), 0, "%{EMAIL}"); + about.addAuthor( ki18n("%{AUTHOR}"), KLocalizedString(), "%{EMAIL}" ); + KCmdLineArgs::init(argc, argv, &about); + + KCmdLineOptions options; + options.add("+[URL]", ki18n( "Document to open" )); + KCmdLineArgs::addCmdLineOptions(options); + KApplication app; + + danbooru_client *widget = new danbooru_client; + + // see if we are starting with session management + if (app.isSessionRestored()) + { + RESTORE(danbooru_client); + } + else + { + // no session.. just start up normally + KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); + if (args->count() == 0) + { + //danbooru_client *widget = new danbooru_client; + widget->show(); + } + else + { + int i = 0; + for (; i < args->count(); i++) + { + //danbooru_client *widget = new danbooru_client; + widget->show(); + } + } + args->clear(); + } + + return app.exec(); +} diff --git a/src/prefs_base.ui b/src/prefs_base.ui new file mode 100644 index 0000000..23fa679 --- /dev/null +++ b/src/prefs_base.ui @@ -0,0 +1,153 @@ + + prefs_base + + + + 0 + 0 + 282 + 156 + + + + + + + Background color: + + + false + + + + + + + Choose a new background color + + + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Change the <span style=" font-weight:600;">background</span> color by clicking here and choose the new <span style=" color:#ff0000;">color</span> in the <span style=" font-style:italic;">color dialog</span>.</p></body></html> + + + + + + + + + + Project age: + + + false + + + + + + + Foreground color: + + + false + + + + + + + Choose a new foreground color + + + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Change the <span style=" font-weight:600;">foreground</span> color by clicking here and choose the new <span style=" color:#ff0000;">color</span> in the <span style=" font-style:italic;">color dialog</span>.</p></body></html> + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 41 + 20 + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 41 + 20 + + + + + + + + Set the project age (in days) + + + Change the project age (in days) by choosing a new number of days. + + + 1 + + + 2 + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 41 + 20 + + + + + + + + + KColorButton + QPushButton +
kcolorbutton.h
+
+
+ + kcolorbutton.h + + + +
diff --git a/src/settings.kcfgc b/src/settings.kcfgc new file mode 100644 index 0000000..cdd38f7 --- /dev/null +++ b/src/settings.kcfgc @@ -0,0 +1,6 @@ +# Code generation options for kconfig_compiler +File=danbooru_client.kcfg +ClassName=Settings +Singleton=true +Mutators=col_background,col_foreground +# will create the necessary code for setting those variables