From: Kaushal M Date: Wed, 14 Jul 2010 08:47:48 +0000 (+0530) Subject: Initial Commit. X-Git-Url: http://git.maemo.org/git/?p=onlineservices;a=commitdiff_plain;h=HEAD;hp=e3f8ac15b2beb8c1b8513132401a75648488de62 Initial Commit. --- diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6cc844b --- /dev/null +++ b/Makefile @@ -0,0 +1,354 @@ +############################################################################# +# Makefile for building: onlineServicesStandAlone +# Generated by qmake (2.01a) (Qt 4.6.3) on: Wed Jul 14 10:32:20 2010 +# Project: onlineServicesStandAlone.pro +# Template: app +# Command: /usr/bin/qmake -unix -o Makefile onlineServicesStandAlone.pro +############################################################################# + +####### Compiler, tools and options + +CC = gcc +CXX = g++ +DEFINES = -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED +CFLAGS = -m64 -pipe -march=x86-64 -mtune=generic -O2 -pipe -Wall -W -D_REENTRANT $(DEFINES) +CXXFLAGS = -m64 -pipe -march=x86-64 -mtune=generic -O2 -pipe -Wall -W -D_REENTRANT $(DEFINES) +INCPATH = -I/usr/share/qt/mkspecs/linux-g++-64 -I. -I/usr/include/QtCore -I/usr/include/QtNetwork -I/usr/include/QtGui -I/usr/include/QtXml -I/usr/include -I. -I. -I. +LINK = g++ +LFLAGS = -m64 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-O1 +LIBS = $(SUBLIBS) -L/usr/lib -lQtXml -lQtGui -lQtNetwork -lQtCore -lpthread +AR = ar cqs +RANLIB = +QMAKE = /usr/bin/qmake +TAR = tar -cf +COMPRESS = gzip -9f +COPY = cp -f +SED = sed +COPY_FILE = $(COPY) +COPY_DIR = $(COPY) -r +STRIP = strip +INSTALL_FILE = install -m 644 -p +INSTALL_DIR = $(COPY_DIR) +INSTALL_PROGRAM = install -m 755 -p +DEL_FILE = rm -f +SYMLINK = ln -f -s +DEL_DIR = rmdir +MOVE = mv -f +CHK_DIR_EXISTS= test -d +MKDIR = mkdir -p + +####### Output directory + +OBJECTS_DIR = ./ + +####### Files + +SOURCES = googlecontenthandler.cpp \ + googledocument.cpp \ + googledocumentlist.cpp \ + googledocumentservice.cpp \ + loginwindow.cpp \ + main.cpp \ + slideshare.cpp \ + slidesharelistdialog.cpp \ + slideshareuploaddialog.cpp \ + googlelistdialog.cpp \ + mimetypes.cpp \ + googleuploaddialog.cpp moc_googledocumentservice.cpp \ + moc_loginwindow.cpp \ + moc_slideshare.cpp \ + moc_slidesharelistdialog.cpp \ + moc_slideshareuploaddialog.cpp \ + moc_googlelistdialog.cpp \ + moc_googleuploaddialog.cpp +OBJECTS = googlecontenthandler.o \ + googledocument.o \ + googledocumentlist.o \ + googledocumentservice.o \ + loginwindow.o \ + main.o \ + slideshare.o \ + slidesharelistdialog.o \ + slideshareuploaddialog.o \ + googlelistdialog.o \ + mimetypes.o \ + googleuploaddialog.o \ + moc_googledocumentservice.o \ + moc_loginwindow.o \ + moc_slideshare.o \ + moc_slidesharelistdialog.o \ + moc_slideshareuploaddialog.o \ + moc_googlelistdialog.o \ + moc_googleuploaddialog.o +DIST = /usr/share/qt/mkspecs/common/g++.conf \ + /usr/share/qt/mkspecs/common/unix.conf \ + /usr/share/qt/mkspecs/common/linux.conf \ + /usr/share/qt/mkspecs/qconfig.pri \ + /usr/share/qt/mkspecs/features/qt_functions.prf \ + /usr/share/qt/mkspecs/features/qt_config.prf \ + /usr/share/qt/mkspecs/features/exclusive_builds.prf \ + /usr/share/qt/mkspecs/features/default_pre.prf \ + /usr/share/qt/mkspecs/features/release.prf \ + /usr/share/qt/mkspecs/features/default_post.prf \ + /usr/share/qt/mkspecs/features/warn_on.prf \ + /usr/share/qt/mkspecs/features/qt.prf \ + /usr/share/qt/mkspecs/features/unix/thread.prf \ + /usr/share/qt/mkspecs/features/moc.prf \ + /usr/share/qt/mkspecs/features/resources.prf \ + /usr/share/qt/mkspecs/features/uic.prf \ + /usr/share/qt/mkspecs/features/yacc.prf \ + /usr/share/qt/mkspecs/features/lex.prf \ + /usr/share/qt/mkspecs/features/include_source_dir.prf \ + onlineServicesStandAlone.pro +QMAKE_TARGET = onlineServicesStandAlone +DESTDIR = +TARGET = onlineServicesStandAlone + +first: all +####### Implicit rules + +.SUFFIXES: .o .c .cpp .cc .cxx .C + +.cpp.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.cc.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.cxx.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.C.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.c.o: + $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" + +####### Build rules + +all: Makefile $(TARGET) + +$(TARGET): ui_authenticationdialog.h ui_filelistdialog.h ui_uploaddialog.h $(OBJECTS) + $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) + +Makefile: onlineServicesStandAlone.pro /usr/share/qt/mkspecs/linux-g++-64/qmake.conf /usr/share/qt/mkspecs/common/g++.conf \ + /usr/share/qt/mkspecs/common/unix.conf \ + /usr/share/qt/mkspecs/common/linux.conf \ + /usr/share/qt/mkspecs/qconfig.pri \ + /usr/share/qt/mkspecs/features/qt_functions.prf \ + /usr/share/qt/mkspecs/features/qt_config.prf \ + /usr/share/qt/mkspecs/features/exclusive_builds.prf \ + /usr/share/qt/mkspecs/features/default_pre.prf \ + /usr/share/qt/mkspecs/features/release.prf \ + /usr/share/qt/mkspecs/features/default_post.prf \ + /usr/share/qt/mkspecs/features/warn_on.prf \ + /usr/share/qt/mkspecs/features/qt.prf \ + /usr/share/qt/mkspecs/features/unix/thread.prf \ + /usr/share/qt/mkspecs/features/moc.prf \ + /usr/share/qt/mkspecs/features/resources.prf \ + /usr/share/qt/mkspecs/features/uic.prf \ + /usr/share/qt/mkspecs/features/yacc.prf \ + /usr/share/qt/mkspecs/features/lex.prf \ + /usr/share/qt/mkspecs/features/include_source_dir.prf \ + /usr/lib/libQtXml.prl \ + /usr/lib/libQtGui.prl \ + /usr/lib/libQtNetwork.prl \ + /usr/lib/libQtCore.prl + $(QMAKE) -unix -o Makefile onlineServicesStandAlone.pro +/usr/share/qt/mkspecs/common/g++.conf: +/usr/share/qt/mkspecs/common/unix.conf: +/usr/share/qt/mkspecs/common/linux.conf: +/usr/share/qt/mkspecs/qconfig.pri: +/usr/share/qt/mkspecs/features/qt_functions.prf: +/usr/share/qt/mkspecs/features/qt_config.prf: +/usr/share/qt/mkspecs/features/exclusive_builds.prf: +/usr/share/qt/mkspecs/features/default_pre.prf: +/usr/share/qt/mkspecs/features/release.prf: +/usr/share/qt/mkspecs/features/default_post.prf: +/usr/share/qt/mkspecs/features/warn_on.prf: +/usr/share/qt/mkspecs/features/qt.prf: +/usr/share/qt/mkspecs/features/unix/thread.prf: +/usr/share/qt/mkspecs/features/moc.prf: +/usr/share/qt/mkspecs/features/resources.prf: +/usr/share/qt/mkspecs/features/uic.prf: +/usr/share/qt/mkspecs/features/yacc.prf: +/usr/share/qt/mkspecs/features/lex.prf: +/usr/share/qt/mkspecs/features/include_source_dir.prf: +/usr/lib/libQtXml.prl: +/usr/lib/libQtGui.prl: +/usr/lib/libQtNetwork.prl: +/usr/lib/libQtCore.prl: +qmake: FORCE + @$(QMAKE) -unix -o Makefile onlineServicesStandAlone.pro + +dist: + @$(CHK_DIR_EXISTS) .tmp/onlineServicesStandAlone1.0.0 || $(MKDIR) .tmp/onlineServicesStandAlone1.0.0 + $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/onlineServicesStandAlone1.0.0/ && $(COPY_FILE) --parents googlecontenthandler.h googledocument.h googledocumentlist.h googledocumentservice.h loginwindow.h slideshare.h slidesharelistdialog.h slideshareuploaddialog.h slideshareDocument.h mimetypes.h googlelistdialog.h googleuploaddialog.h .tmp/onlineServicesStandAlone1.0.0/ && $(COPY_FILE) --parents googlecontenthandler.cpp googledocument.cpp googledocumentlist.cpp googledocumentservice.cpp loginwindow.cpp main.cpp slideshare.cpp slidesharelistdialog.cpp slideshareuploaddialog.cpp googlelistdialog.cpp mimetypes.cpp googleuploaddialog.cpp .tmp/onlineServicesStandAlone1.0.0/ && $(COPY_FILE) --parents authenticationdialog.ui filelistdialog.ui uploaddialog.ui .tmp/onlineServicesStandAlone1.0.0/ && (cd `dirname .tmp/onlineServicesStandAlone1.0.0` && $(TAR) onlineServicesStandAlone1.0.0.tar onlineServicesStandAlone1.0.0 && $(COMPRESS) onlineServicesStandAlone1.0.0.tar) && $(MOVE) `dirname .tmp/onlineServicesStandAlone1.0.0`/onlineServicesStandAlone1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/onlineServicesStandAlone1.0.0 + + +clean:compiler_clean + -$(DEL_FILE) $(OBJECTS) + -$(DEL_FILE) *~ core *.core + + +####### Sub-libraries + +distclean: clean + -$(DEL_FILE) $(TARGET) + -$(DEL_FILE) Makefile + + +check: first + +mocclean: compiler_moc_header_clean compiler_moc_source_clean + +mocables: compiler_moc_header_make_all compiler_moc_source_make_all + +compiler_moc_header_make_all: moc_googledocumentservice.cpp moc_loginwindow.cpp moc_slideshare.cpp moc_slidesharelistdialog.cpp moc_slideshareuploaddialog.cpp moc_googlelistdialog.cpp moc_googleuploaddialog.cpp +compiler_moc_header_clean: + -$(DEL_FILE) moc_googledocumentservice.cpp moc_loginwindow.cpp moc_slideshare.cpp moc_slidesharelistdialog.cpp moc_slideshareuploaddialog.cpp moc_googlelistdialog.cpp moc_googleuploaddialog.cpp +moc_googledocumentservice.cpp: googledocumentservice.h + /usr/bin/moc $(DEFINES) $(INCPATH) googledocumentservice.h -o moc_googledocumentservice.cpp + +moc_loginwindow.cpp: ui_authenticationdialog.h \ + loginwindow.h + /usr/bin/moc $(DEFINES) $(INCPATH) loginwindow.h -o moc_loginwindow.cpp + +moc_slideshare.cpp: slideshare.h + /usr/bin/moc $(DEFINES) $(INCPATH) slideshare.h -o moc_slideshare.cpp + +moc_slidesharelistdialog.cpp: slideshare.h \ + slidesharelistdialog.h + /usr/bin/moc $(DEFINES) $(INCPATH) slidesharelistdialog.h -o moc_slidesharelistdialog.cpp + +moc_slideshareuploaddialog.cpp: slideshareuploaddialog.h + /usr/bin/moc $(DEFINES) $(INCPATH) slideshareuploaddialog.h -o moc_slideshareuploaddialog.cpp + +moc_googlelistdialog.cpp: googledocumentservice.h \ + googlelistdialog.h + /usr/bin/moc $(DEFINES) $(INCPATH) googlelistdialog.h -o moc_googlelistdialog.cpp + +moc_googleuploaddialog.cpp: googleuploaddialog.h + /usr/bin/moc $(DEFINES) $(INCPATH) googleuploaddialog.h -o moc_googleuploaddialog.cpp + +compiler_rcc_make_all: +compiler_rcc_clean: +compiler_image_collection_make_all: qmake_image_collection.cpp +compiler_image_collection_clean: + -$(DEL_FILE) qmake_image_collection.cpp +compiler_moc_source_make_all: +compiler_moc_source_clean: +compiler_uic_make_all: ui_authenticationdialog.h ui_filelistdialog.h ui_uploaddialog.h +compiler_uic_clean: + -$(DEL_FILE) ui_authenticationdialog.h ui_filelistdialog.h ui_uploaddialog.h +ui_authenticationdialog.h: authenticationdialog.ui + /usr/bin/uic authenticationdialog.ui -o ui_authenticationdialog.h + +ui_filelistdialog.h: filelistdialog.ui + /usr/bin/uic filelistdialog.ui -o ui_filelistdialog.h + +ui_uploaddialog.h: uploaddialog.ui + /usr/bin/uic uploaddialog.ui -o ui_uploaddialog.h + +compiler_yacc_decl_make_all: +compiler_yacc_decl_clean: +compiler_yacc_impl_make_all: +compiler_yacc_impl_clean: +compiler_lex_make_all: +compiler_lex_clean: +compiler_clean: compiler_moc_header_clean compiler_uic_clean + +####### Compile + +googlecontenthandler.o: googlecontenthandler.cpp googledocumentlist.h \ + googledocument.h \ + googlecontenthandler.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o googlecontenthandler.o googlecontenthandler.cpp + +googledocument.o: googledocument.cpp googledocument.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o googledocument.o googledocument.cpp + +googledocumentlist.o: googledocumentlist.cpp googledocumentlist.h \ + googledocument.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o googledocumentlist.o googledocumentlist.cpp + +googledocumentservice.o: googledocumentservice.cpp googledocumentservice.h \ + googledocumentlist.h \ + googledocument.h \ + googlecontenthandler.h \ + mimetypes.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o googledocumentservice.o googledocumentservice.cpp + +loginwindow.o: loginwindow.cpp loginwindow.h \ + ui_authenticationdialog.h \ + googledocumentservice.h \ + googlelistdialog.h \ + slideshare.h \ + slidesharelistdialog.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o loginwindow.o loginwindow.cpp + +main.o: main.cpp loginwindow.h \ + ui_authenticationdialog.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp + +slideshare.o: slideshare.cpp slideshare.h \ + slideshareDocument.h \ + mimetypes.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o slideshare.o slideshare.cpp + +slidesharelistdialog.o: slidesharelistdialog.cpp slidesharelistdialog.h \ + slideshare.h \ + ui_filelistdialog.h \ + slideshareuploaddialog.h \ + slideshareDocument.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o slidesharelistdialog.o slidesharelistdialog.cpp + +slideshareuploaddialog.o: slideshareuploaddialog.cpp slideshareuploaddialog.h \ + ui_uploaddialog.h \ + slideshare.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o slideshareuploaddialog.o slideshareuploaddialog.cpp + +googlelistdialog.o: googlelistdialog.cpp googlelistdialog.h \ + googledocumentservice.h \ + ui_filelistdialog.h \ + googledocument.h \ + googleuploaddialog.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o googlelistdialog.o googlelistdialog.cpp + +mimetypes.o: mimetypes.cpp mimetypes.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o mimetypes.o mimetypes.cpp + +googleuploaddialog.o: googleuploaddialog.cpp googleuploaddialog.h \ + ui_uploaddialog.h \ + googledocumentservice.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o googleuploaddialog.o googleuploaddialog.cpp + +moc_googledocumentservice.o: moc_googledocumentservice.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_googledocumentservice.o moc_googledocumentservice.cpp + +moc_loginwindow.o: moc_loginwindow.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_loginwindow.o moc_loginwindow.cpp + +moc_slideshare.o: moc_slideshare.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_slideshare.o moc_slideshare.cpp + +moc_slidesharelistdialog.o: moc_slidesharelistdialog.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_slidesharelistdialog.o moc_slidesharelistdialog.cpp + +moc_slideshareuploaddialog.o: moc_slideshareuploaddialog.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_slideshareuploaddialog.o moc_slideshareuploaddialog.cpp + +moc_googlelistdialog.o: moc_googlelistdialog.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_googlelistdialog.o moc_googlelistdialog.cpp + +moc_googleuploaddialog.o: moc_googleuploaddialog.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_googleuploaddialog.o moc_googleuploaddialog.cpp + +####### Install + +install: FORCE + +uninstall: FORCE + +FORCE: + diff --git a/OfficeInterface.h b/OfficeInterface.h new file mode 100644 index 0000000..cd4bb06 --- /dev/null +++ b/OfficeInterface.h @@ -0,0 +1,59 @@ +/* + * This file is part of Maemo 5 Office UI for KOffice + * + * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). + * + * Contact: Lassi Nieminen + * + * 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 St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + */ + +#ifndef OFFICEINTERFACE_H +#define OFFICEINTERFACE_H + +#include +#include +#include + +class OfficeInterface +{ +public: + + virtual ~OfficeInterface() {} + + // This is used to give information about the currently active doc to the plugin + // 0 if there is no document open + virtual void setDocument(void *doc) = 0; + + // Asks the plugin to create it's view for the main program to use + virtual QWidget *view() = 0; + + // Should return the name of the plugin + virtual QString pluginName() = 0; + + // Should return list of document types in presence of which this plugin + // should be shown in the menubar. + // Possible values : All, presentation, document, spreadsheet + // + // NOTE: this is not actually used yet in the main program and may be extented + // in the future. + virtual QStringList pluginSupportTypes() = 0; +}; + +Q_DECLARE_INTERFACE(OfficeInterface, "com.office.Freoffice.OfficeInterface/1.0") + +#endif diff --git a/authenticationdialog.ui b/authenticationdialog.ui new file mode 100644 index 0000000..f5fc7d0 --- /dev/null +++ b/authenticationdialog.ui @@ -0,0 +1,86 @@ + + + Dialog + + + + 0 + 0 + 449 + 135 + + + + Account Signin + + + + + + You need to supply Username and Password to access documents + + + false + + + + + + + + + Site: + + + + + + + + + + Username: + + + + + + + @gmail.com + + + + + + + Password: + + + + + + + + + + + + + QLineEdit::Password + + + + + + + + + Sign In + + + + + + + + diff --git a/authenticator.cpp b/authenticator.cpp new file mode 100644 index 0000000..3dd244d --- /dev/null +++ b/authenticator.cpp @@ -0,0 +1,34 @@ +/* + * This file is part of Maemo 5 Office UI for KOffice + * + * Copyright (C) 2010 Manikandaprasad N C . + * + * + * 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 St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + */ + +#include +#include +#include "authenticator.h" + +NetworkHandler::NetworkHandler(QObject * parent) + : QObject(parent), + loggedin(false) +{ + //QNetworkProxy proxy(QNetworkProxy::HttpProxy, "nokes.nokia.com", 8080); + //networkManager.setProxy(proxy); +} diff --git a/authenticator.h b/authenticator.h new file mode 100644 index 0000000..4bae24b --- /dev/null +++ b/authenticator.h @@ -0,0 +1,45 @@ +/* + * This file is part of Maemo 5 Office UI for KOffice + * + * Copyright (C) 2010 Manikandaprasad N C . + * + * + * 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 St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + */ + +#ifndef AUTHENTICATOR_H +#define AUTHENTICATOR_H + +#include +#include + +class NetworkHandler : public QObject +{ + Q_OBJECT + +public: + NetworkHandler(QObject * parent = 0); + +signals: + void receivedFeed(); + +protected: + QNetworkAccessManager networkManager;; + bool loggedin; +}; + +#endif // AUTHENTICATOR_H diff --git a/filelistdialog.o b/filelistdialog.o new file mode 100644 index 0000000..9bcfc46 Binary files /dev/null and b/filelistdialog.o differ diff --git a/filelistdialog.ui b/filelistdialog.ui new file mode 100644 index 0000000..90afc2e --- /dev/null +++ b/filelistdialog.ui @@ -0,0 +1,106 @@ + + + fileListDialog + + + + 0 + 0 + 640 + 480 + + + + FileList + + + + + + QTabWidget::Rounded + + + 1 + + + + Documents + + + + + + + + + + Presentations + + + + + + + + + + Spreadsheets + + + + + + + + + + Others + + + + + + + + + + + + + 0 + + + false + + + + + + + + + &Upload + + + + + + + &Refresh List + + + + + + + &Download + + + + + + + + + + diff --git a/googlecontenthandler.cpp b/googlecontenthandler.cpp new file mode 100644 index 0000000..4a73953 --- /dev/null +++ b/googlecontenthandler.cpp @@ -0,0 +1,157 @@ +/* + * Copyright (c) 2010 Mani Chandrasekar + * + * 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 + +#include "googledocumentlist.h" +#include "googledocument.h" +#include "googlecontenthandler.h" + +GoogleContentHandler::GoogleContentHandler() + : m_docList(0), + m_docEntry(0) +{ + m_docList = new GoogleDocumentList(); +} + +bool GoogleContentHandler::characters ( const QString & ch ) +{ + if (!insideEntry) { + if (QString::compare(m_nodeStack.top(), "title", Qt::CaseInsensitive) == 0) { + if (m_nodeStack.count() == 2) + m_docList->setTitle(ch); + } + else if (QString::compare(m_nodeStack.top(), "name", Qt::CaseInsensitive) == 0) { + if (m_nodeStack.count() == 3) + m_docList->setAuthor(ch); + } + else if (QString::compare(m_nodeStack.top(), "email", Qt::CaseInsensitive) == 0) { + if (m_nodeStack.count() == 3) + m_docList->setEmail(ch); + } + } + else + { + if (m_docEntry == 0) + return true; + + if (QString::compare(m_nodeStack.top(), "title", Qt::CaseInsensitive) == 0) { + m_docEntry->setTitle(ch); + } + else if (QString::compare(m_nodeStack.top(), "name", Qt::CaseInsensitive) == 0) { + m_docEntry->setAuthor(ch); + } + else if (QString::compare(m_nodeStack.top(), "resourceId", Qt::CaseInsensitive) == 0) { + m_docEntry->setId(ch); + } + } + return true; +} + +bool GoogleContentHandler::endDocument () +{ + //qDebug() << "GoogleContentHandler::endDocument()"; + return true; +} + +bool GoogleContentHandler::endElement ( const QString & namespaceURI, const QString & localName, const QString & qName ) +{ + //printName(localName); + QString element = m_nodeStack.pop(); + if (QString::compare(element, "entry") == 0) { + insideEntry = false; + m_docList->append(m_docEntry); + m_docEntry = 0; + } + return true; +} + +bool GoogleContentHandler::endPrefixMapping ( const QString & prefix ) +{ + return true; +} + +QString GoogleContentHandler::errorString () const +{ + return QString(); +} + +bool GoogleContentHandler::ignorableWhitespace ( const QString & ch ) +{ + return true; +} + +bool GoogleContentHandler::processingInstruction ( const QString & target, const QString & data ) +{ + return true; +} + +void GoogleContentHandler::setDocumentLocator ( QXmlLocator * locator ) +{ +} + +bool GoogleContentHandler::skippedEntity ( const QString & name ) +{ + return true; +} + +bool GoogleContentHandler::startDocument () +{ + return true; +} + +bool GoogleContentHandler::startElement ( const QString & namespaceURI, const QString & localName, + const QString & qName, const QXmlAttributes & atts ) +{ + m_nodeStack.push(localName); + + if ((m_nodeStack.count() == 1) && (m_docList != 0)) { //Feed element + m_docList->setEtag(atts.value("gd:etag")); + } + + if (QString::compare(localName, "entry", Qt::CaseInsensitive) == 0 ) { + m_docEntry = new GoogleDocument(); + m_docEntry->setEtag(atts.value("gd:etag")); + insideEntry = true; + } + if ( insideEntry && (QString::compare(localName, "content", Qt::CaseInsensitive) == 0 ) && (m_docEntry != 0)) { + m_docEntry->setDocumentUrl(atts.value("src")); + } + + //printName(localName); + + return true; +} + +bool GoogleContentHandler::startPrefixMapping ( const QString & prefix, const QString & uri ) +{ + //qDebug() << "GoogleContentHandler::startPrefixMapping() " << prefix << uri; + return true; +} + +void GoogleContentHandler::printName(const QString & name) +{ + int count = m_nodeStack.count(); + QString indent; + for (int i=0; i < count; i++) + indent.append("\t"); + indent.append(name); + + if (insideEntry); +// qDebug() << indent; +} diff --git a/googlecontenthandler.h b/googlecontenthandler.h new file mode 100644 index 0000000..90973b6 --- /dev/null +++ b/googlecontenthandler.h @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2010 Mani Chandrasekar + * + * 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 GOOGLECONTENTHANDLER_H +#define GOOGLECONTENTHANDLER_H + +#include +#include + +class GoogleDocumentList; +class GoogleDocument; + +class GoogleContentHandler : public QXmlContentHandler +{ +public: + GoogleContentHandler(); + + virtual bool characters ( const QString & ch ); + virtual bool endDocument (); + virtual bool endElement ( const QString & namespaceURI, const QString & localName, const QString & qName ); + virtual bool endPrefixMapping ( const QString & prefix ); + virtual QString errorString () const; + virtual bool ignorableWhitespace ( const QString & ch ); + virtual bool processingInstruction ( const QString & target, const QString & data ); + virtual void setDocumentLocator ( QXmlLocator * locator ); + virtual bool skippedEntity ( const QString & name ); + virtual bool startDocument (); + virtual bool startElement ( const QString & namespaceURI, const QString & localName, const QString & qName, const QXmlAttributes & atts ); + virtual bool startPrefixMapping ( const QString & prefix, const QString & uri ); + + GoogleDocumentList *documentList() { return m_docList; } + +private: + QStack m_nodeStack; + bool insideEntry; + GoogleDocumentList *m_docList; + GoogleDocument *m_docEntry; + + void printName(const QString & name); +}; + +#endif // GOOGLECONTENTHANDLER_H diff --git a/googlecontenthandler.o b/googlecontenthandler.o new file mode 100644 index 0000000..c7f3e6a Binary files /dev/null and b/googlecontenthandler.o differ diff --git a/googledocument.cpp b/googledocument.cpp new file mode 100644 index 0000000..cc9f38e --- /dev/null +++ b/googledocument.cpp @@ -0,0 +1,90 @@ +/* + * This file is part of Maemo 5 Office UI for KOffice + * + * Copyright (C) 2010 Manikandaprasad N C . + * + * + * 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 St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + */ + +#include "googledocument.h" + +GoogleDocument::GoogleDocument() +{ +} + +void GoogleDocument::setEtag(const QString & etag) +{ + m_etag = etag; +} + +QString GoogleDocument::etag () +{ + return m_etag; +} + +void GoogleDocument::setId (const QString & id) +{ + m_id = id; + + setDocumentType(id.left(id.indexOf(":"))); +} + +QString GoogleDocument::id () +{ + return m_id; +} + +void GoogleDocument::setTitle (const QString & title) +{ + m_title = title; +} + +QString GoogleDocument::title () +{ + return m_title; +} + +void GoogleDocument::setAuthor (const QString & author) +{ + m_author = author; +} + +QString GoogleDocument::author () +{ + return m_author; +} + +void GoogleDocument::setDocumentType (const QString & docType) +{ + m_docType = docType; +} + +QString GoogleDocument::documentType () +{ + return m_docType; +} + +void GoogleDocument::setDocumentUrl (const QString & url) +{ + m_documetUrl = url; +} + +QString GoogleDocument::documentUrl () +{ + return m_documetUrl; +} diff --git a/googledocument.h b/googledocument.h new file mode 100644 index 0000000..1ac1077 --- /dev/null +++ b/googledocument.h @@ -0,0 +1,61 @@ +/* + * This file is part of Maemo 5 Office UI for KOffice + * + * Copyright (C) 2010 Manikandaprasad N C . + * + * + * 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 St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + */ + +#ifndef GOOGLEDOCUMENT_H +#define GOOGLEDOCUMENT_H + +#include + +class GoogleDocument : public QObject +{ +public: + GoogleDocument(); + + void setEtag(const QString & etag); + QString etag (); + + void setId (const QString & id); + QString id (); + + void setTitle (const QString & title); + QString title (); + + void setAuthor (const QString & author); + QString author (); + + void setDocumentType (const QString & docType); + QString documentType (); + + void setDocumentUrl (const QString & url); + QString documentUrl (); + +private: + QString m_etag; + QString m_id; + QString m_title; + QString m_author; + QString m_docType; + QString m_documetUrl; +}; + +#endif // GOOGLEDOCUMENT_H diff --git a/googledocument.o b/googledocument.o new file mode 100644 index 0000000..412b31e Binary files /dev/null and b/googledocument.o differ diff --git a/googledocumentlist.cpp b/googledocumentlist.cpp new file mode 100644 index 0000000..64f7ad3 --- /dev/null +++ b/googledocumentlist.cpp @@ -0,0 +1,99 @@ +/* + * This file is part of Maemo 5 Office UI for KOffice + * + * Copyright (C) 2010 Manikandaprasad N C . + * + * + * 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 St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + */ + +#include "googledocumentlist.h" +#include "googledocument.h" + +#include +#include + +GoogleDocumentList::GoogleDocumentList() +{ + docModel = new QStandardItemModel(0, 2); +} + +void GoogleDocumentList::setEtag(const QString &etag) +{ + m_etag = etag; +} + +QString GoogleDocumentList::etag () +{ + return m_etag; +} + +void GoogleDocumentList::setEmail (const QString &email) +{ + m_email = email; +} + +QString GoogleDocumentList::email () +{ + return m_email; +} + +void GoogleDocumentList::setTitle (const QString &title) +{ + m_title = title; +} + +QString GoogleDocumentList::title () +{ + return m_title; +} + +void GoogleDocumentList::setAuthor (const QString &author) +{ + m_author = author; +} + +QString GoogleDocumentList::author () +{ + return m_author; +} + +void GoogleDocumentList::append(GoogleDocument *entry) +{ + if (entry != 0 ) { + m_entries.append(entry); + + //count = docModel->rowCount(); + docModel->insertRow(0); + docModel->setData(docModel->index(0, 0), entry->title()); + docModel->setData(docModel->index(0, 1), entry->documentUrl()); +// qDebug() << "Resource ID : " << entry->id(); +// qDebug() << "Title : " << entry->title(); +// qDebug() << "Author : " << entry->author(); +// qDebug() << "Url : " << entry->documentUrl(); + } +} + +QList GoogleDocumentList::entries() +{ + return m_entries; +} + +int GoogleDocumentList::documentsCount() +{ + return m_entries.count(); +} diff --git a/googledocumentlist.h b/googledocumentlist.h new file mode 100644 index 0000000..927c092 --- /dev/null +++ b/googledocumentlist.h @@ -0,0 +1,68 @@ +/* + * This file is part of Maemo 5 Office UI for KOffice + * + * Copyright (C) 2010 Manikandaprasad N C . + * + * + * 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 St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + */ + +#ifndef GOOGLEDOCUMENTLIST_H +#define GOOGLEDOCUMENTLIST_H + +#include +#include +#include + +class GoogleDocument; + +class GoogleDocumentList : public QObject +{ +public: + GoogleDocumentList(); + + void setEtag(const QString &etag); + QString etag (); + + void setEmail (const QString &email); + QString email (); + + void setTitle (const QString &title); + QString title (); + + void setAuthor (const QString &author); + QString author (); + + void append(GoogleDocument *entry); + int documentsCount(); + + QList entries (); + + QStandardItemModel * documentModel() { return docModel; } + +private: + QString m_author; + QString m_email; + QString m_title; + QString m_etag; + + QList m_entries; + + QStandardItemModel *docModel; +}; + +#endif // GOOGLEDOCUMENTLIST_H diff --git a/googledocumentlist.o b/googledocumentlist.o new file mode 100644 index 0000000..e8b3fda Binary files /dev/null and b/googledocumentlist.o differ diff --git a/googledocumentservice.cpp b/googledocumentservice.cpp new file mode 100644 index 0000000..7578a85 --- /dev/null +++ b/googledocumentservice.cpp @@ -0,0 +1,229 @@ +/* + * Copyright (c) 2010 Mani Chandrasekar + * + * 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 +#include +#include + +#include "googledocumentservice.h" +#include "googledocumentlist.h" +#include "googledocument.h" +#include "googlecontenthandler.h" +#include "mimetypes.h" +const QString GoogleDocumentService::GOOGLE_DOCUMENT_URL = "docs.google.com"; +const QString GoogleDocumentService::GOOGLE_SPREADSHEET_URL = "spreadsheets.google.com"; + +GoogleDocumentService::GoogleDocumentService() + : newInformation(true) + ,waitingForDoc(false) + , uploadingDoc(false) + , loggedin(false) + , haveDocAuthToken(false) +{ + saveFileName = 0; + connect(&networkManager, SIGNAL(finished(QNetworkReply*)), + this, SLOT(handleNetworkData(QNetworkReply*))); + gHandler = new GoogleContentHandler(); + xmlReader.setContentHandler(gHandler); +} + +void GoogleDocumentService::clientLogin(const QString & username, const QString & password) +{ + QByteArray data; + data.append(QString("Email="+username+"&Passwd="+password).toUtf8()); + + if(!haveDocAuthToken) { + data.append(QString("&service=writely&source=KOfficev2").toUtf8()); + this->username = username; + this->password = password; + } + else { + data.append(QString("&service=wise&source=KOfficev2").toUtf8()); + } + QNetworkRequest req(QUrl("https://www.google.com/accounts/ClientLogin")); + req.setRawHeader("Host", "www.google.com"); + req.setRawHeader("GData-Version", "3.0"); + req.setRawHeader("Content-Type", "application/x-www-form-urlencoded"); + req.setHeader(QNetworkRequest::ContentLengthHeader, data.length()); + + networkManager.post(req, data); +} + +void GoogleDocumentService::listDocuments() +{ + qDebug() << ">>>>>>>>>>>>>> List Documents" ; + authToken = docAuthToken; + QNetworkRequest requestHeader(QUrl("https://docs.google.com/feeds/default/private/full")); + requestHeader.setRawHeader("Host", "docs.google.com"); + requestHeader.setRawHeader("User-Agent", "KOffice"); + requestHeader.setRawHeader("GData-Version", "3.0"); + requestHeader.setRawHeader("Content-Type", "application/atom+xml"); + requestHeader.setRawHeader("Authorization", authToken.toUtf8()); + + networkManager.get(requestHeader); +} + +void GoogleDocumentService::handleNetworkData(QNetworkReply *networkReply) +{ + QUrl url = networkReply->url(); + bool ok = false; + if (!networkReply->error()) { + if (!loggedin) { + QByteArray m_data = networkReply->readAll(); + QString text(m_data.data()); + text = text.right(text.length()-text.indexOf("Auth=")-5); + authToken = QString("GoogleLogin auth=")+text.left(text.indexOf("\n")); + if (authToken.length() > 20) { + if(!haveDocAuthToken) { + docAuthToken = authToken; + haveDocAuthToken = true; + clientLogin(this->username, this->password); + return; + } + spreadAuthToken = authToken; + authToken = ""; + loggedin = true; + qDebug() << ">>>>>>>>>>>>>> Login success" ; + emit userAuthenticated(loggedin); + } + else { + qDebug() << ">>>>>>>>>>>>>> Login failed" ; + emit userAuthenticated(false); + } + } + else if (waitingForDoc) { + QByteArray data = networkReply->readAll(); + QFile file(*saveFileName); + file.open(QIODevice::WriteOnly); + file.write(data); + file.close(); + qDebug() << ">>>>>>>>>>>>>> Received Document!!!!! " << file.fileName(); + waitingForDoc = false; + emit downloadDone(true); + } + else if (uploadingDoc) { + uploadingDoc = false; + qDebug() << ">>>>>>>>>>>>>> Upload done" ; + emit uploadDone(true); + } + else { + qDebug() << ">>>>>>>>>>>>>> Revieved List" ; + gHandler = new GoogleContentHandler(); + xmlReader.setContentHandler(gHandler); + QByteArray data = networkReply->readAll(); + xmlInput.setData(data); + ok = xmlReader.parse(&xmlInput, true); + prepareLists(); + } + } + else { + qDebug() << networkReply->readAll(); + if(!loggedin) + emit userAuthenticated(false); + else if (waitingForDoc) { + emit downloadDone(false); + waitingForDoc = false; + } + else if (uploadingDoc) { + emit uploadDone(false); + uploadingDoc = false; + } + else + emit listDone(false); + } + networkReply->deleteLater(); +} + +void GoogleDocumentService::prepareLists() +{ + presentationList.clear(); + documentList.clear(); + spreadsheetList.clear(); + othersList.clear(); + QList gList = gHandler->documentList()->entries(); + foreach(GoogleDocument *i, gList) { + if("presentation" == i->documentType()) + presentationList.append(i); + else if("spreadsheet" == i->documentType()) + spreadsheetList.append(i); + else if("document" == i->documentType()) + documentList.append(i); + else + othersList.append(i); + } + qDebug() << ">>>>>>>>>>>>>> Lists Done" ; + emit listDone(true); +} + + +void GoogleDocumentService::downloadDocument(GoogleDocument *doc, QString *saveFileName) +{ + this->saveFileName = saveFileName; + authToken = docAuthToken; + QString url = doc->documentUrl(); + QString type = doc->documentType(); + qDebug() << type << "=" << url; + url.replace("docId", "docID", Qt::CaseInsensitive); + QString exportFormat = ""; + + if (QString::compare(type, "spreadsheet") == 0 ) { + exportFormat = "&exportFormat=ods&format=ods"; + authToken = spreadAuthToken; + } + else if (QString::compare(type, "presentation") == 0 ) + exportFormat = "&exportFormat=ppt&format=ppt"; + else if (QString::compare(type, "document") == 0) + exportFormat = "&exportFormat=odt&format=odt"; + + QUrl documentUrl(url + exportFormat); + + QNetworkRequest requestHeader(documentUrl); + requestHeader.setRawHeader("User-Agent", "KOffice"); + requestHeader.setRawHeader("GData-Version", "3.0"); + requestHeader.setRawHeader("Authorization", authToken.toUtf8()); + + QNetworkReply *reply = networkManager.get(requestHeader); + connect(reply, SIGNAL(downloadProgress(qint64,qint64)), this, SIGNAL(downloadProgress(qint64,qint64))); + waitingForDoc = true; + qDebug() << ">>>>>>>>>>>>>> Downloading file" ; +} + +void GoogleDocumentService::uploadDocument(QString *filename, QString *title) +{ + authToken = docAuthToken; + QFile file(*filename); + file.open(QFile::ReadOnly); + QByteArray data = file.readAll(); + file.close(); + QUrl url; + url.setUrl("https://docs.google.com/feeds/default/private/full"); + + QNetworkRequest requestHeader(url); + requestHeader.setRawHeader("User-Agent", "KOffice"); + requestHeader.setRawHeader("GData-Version", "3.0"); + requestHeader.setRawHeader("Authorization", authToken.toUtf8()); + requestHeader.setRawHeader("Content-Type", MimeTypes::getMimeType(QFileInfo(*filename).suffix()).toUtf8()); + requestHeader.setRawHeader("Content-Length", QString::number(data.length()).toUtf8()); + requestHeader.setRawHeader("Slug", QUrl::toPercentEncoding(*title)); + + QNetworkReply *reply = networkManager.post(requestHeader, data); + connect(reply, SIGNAL(uploadProgress(qint64, qint64)), this, SIGNAL(uploadProgress(qint64,qint64))); + uploadingDoc = true; + qDebug() << ">>>>>>>>>>>>>> Uploading file" ; +} + diff --git a/googledocumentservice.h b/googledocumentservice.h new file mode 100644 index 0000000..83939d9 --- /dev/null +++ b/googledocumentservice.h @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2010 Mani Chandrasekar + * Kaushal M + * + * 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 GOOGLEDOCUMENTSERVICE_H +#define GOOGLEDOCUMENTSERVICE_H + +#include +#include +#include +#include +//#include "documentlistwindow.h" + +class GoogleDocumentList; +class GoogleDocument; +class GoogleContentHandler; +//class DocumentListWindow; + +class GoogleDocumentService : public QObject +{ + Q_OBJECT + +public: + GoogleDocumentService(); + void clientLogin(const QString & username, const QString & password); + void listDocuments(); + void prepareLists(); + void uploadDocument(QString *filename, QString *title); + void downloadDocument (GoogleDocument *, QString *saveFileName); + bool alreadyAuthenticated() { return loggedin; } + + QList documentList; + QList presentationList; + QList spreadsheetList; + QList othersList; + +signals: + void userAuthenticated(bool success); + void listDone(bool); + void downloadDone(bool); + void uploadDone(bool); + void downloadProgress(qint64 bytesSent, qint64 bytesTotal); + void uploadProgress(qint64 bytesSent, qint64 bytesTotal); + +private slots: + void handleNetworkData(QNetworkReply *networkReply); + +private: + QXmlSimpleReader xmlReader; + QXmlInputSource xmlInput; + bool newInformation; + bool waitingForDoc; + bool uploadingDoc; + bool loggedin; + bool haveDocAuthToken; + GoogleContentHandler *gHandler; + QString authToken; + QString docAuthToken; + QString spreadAuthToken; + QString *saveFileName; + QString username; + QString password; + QNetworkAccessManager networkManager; + + static const QString GOOGLE_DOCUMENT_URL; + static const QString GOOGLE_SPREADSHEET_URL; +}; + +#endif // GOOGLEDOCUMENTSERVICE_H diff --git a/googledocumentservice.o b/googledocumentservice.o new file mode 100644 index 0000000..842f1f0 Binary files /dev/null and b/googledocumentservice.o differ diff --git a/googlelistdialog.cpp b/googlelistdialog.cpp new file mode 100644 index 0000000..bbfbf4b --- /dev/null +++ b/googlelistdialog.cpp @@ -0,0 +1,186 @@ +/* + * Copyright (c) 2010 Kaushal M + * + * 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 "googlelistdialog.h" +#include "ui_filelistdialog.h" + +#include "googledocument.h" +#include "googleuploaddialog.h" + +#include +#include +#include + +googleListDialog::googleListDialog(GoogleDocumentService *service, QWidget *parent): + QDialog(parent), + ui(new Ui::fileListDialog) +{ + ui->setupUi(this); + this->setWindowTitle("Google Docs"); + this->service = service; + ui->listTab->setCurrentIndex(0); + ui->downloadProgressBar->setVisible(false); + + connect(ui->downloadButton, SIGNAL(clicked()), this, SLOT(downloadButtonClickedSlot())); + connect(ui->uploadButton, SIGNAL(clicked()), this, SLOT(uploadButtonClickedSlot())); + connect(ui->refreshButton, SIGNAL(clicked()), this, SLOT(refreshList())); + connect(service, SIGNAL(listDone(bool)), this, SLOT(fillList(bool))); + connect(service, SIGNAL(downloadDone(bool)), this, SLOT(downloadDoneSlot(bool))); + connect(service, SIGNAL(downloadProgress(qint64,qint64)), this, SLOT(updateProgressBar(qint64,qint64))); + refreshList(); +} + +void googleListDialog::changeEvent(QEvent *e) +{ + QDialog::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +void googleListDialog::refreshList() +{ + ui->listTab->setEnabled(false); + ui->downloadButton->setEnabled(false); + ui->uploadButton->setEnabled(false); + ui->refreshButton->setEnabled(false); + ui->downloadProgressBar->setMinimum(0); + ui->downloadProgressBar->setMaximum(0); + ui->downloadProgressBar->setVisible(true); + service->listDocuments(); +} + +void googleListDialog::fillList(bool status) +{ + if(status) { + ui->documentList->clear(); + ui->presentationList->clear(); + ui->spreadsheetList->clear(); + ui->othersList->clear(); + + QList list; + + list = service->documentList; + foreach(GoogleDocument *i, list) { + ui->documentList->addItem(i->title()); + } + + list = service->presentationList; + foreach(GoogleDocument *i, list) { + ui->presentationList->addItem(i->title()); + } + + list = service->spreadsheetList; + foreach(GoogleDocument *i, list) { + ui->spreadsheetList->addItem(i->title()); + } + + list = service->othersList; + foreach(GoogleDocument *i, list) { + ui->othersList->addItem(i->title()); + } + } + else { + QMessageBox::information(this, tr("Error"), tr("An error occured while fetching document list")); + } + ui->downloadProgressBar->setMaximum(100); + ui->downloadProgressBar->setVisible(false); + ui->listTab->setEnabled(true); + ui->downloadButton->setEnabled(true); + ui->uploadButton->setEnabled(true); + ui->refreshButton->setEnabled(true); +} + +void googleListDialog::downloadButtonClickedSlot() +{ + QList list; + QListWidget *tmp = 0; + switch(ui->listTab->currentIndex()) { + case 0: + tmp = ui->documentList; + list = service->documentList; + break; + case 1: + tmp = ui->presentationList; + list = service->presentationList; + break; + case 2: + tmp = ui->spreadsheetList; + list = service->spreadsheetList; + break; + case 3: + tmp = ui->othersList; + list = service->othersList; + } + + if(-1 == tmp->currentRow()) { + QMessageBox::information(this, QString("No selection"), QString("Please select a file from the list")); + return; + } + GoogleDocument *doc = list[tmp->currentRow()]; + QString format = ""; + if("presentation" == doc->documentType()) { + format = ".ppt"; + } + else if("document" == doc->documentType()) { + format = ".odt"; + } + else if("spreadsheet" == doc->documentType()) { + format = ".ods"; + } + QString filename = QFileDialog::getSaveFileName(this,"Save File",QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation) + "/" + doc->title() + format, "(*" + format + ")"); + if("" == filename) + return; + service->downloadDocument(doc, new QString(filename)); + ui->listTab->setEnabled(false); + ui->uploadButton->setEnabled(false); + ui->downloadButton->setEnabled(false); + ui->refreshButton->setEnabled(false); + ui->downloadProgressBar->setVisible(true); +} + +void googleListDialog::uploadButtonClickedSlot() +{ + googleUploadDialog *ud = new googleUploadDialog(service, this); + ud->show(); + connect(ud, SIGNAL(accepted()), this, SLOT(refreshList())); +} + +void googleListDialog::downloadDoneSlot(bool status) +{ + ui->downloadProgressBar->setVisible(false); + ui->downloadProgressBar->setValue(0); + ui->listTab->setEnabled(true); + ui->downloadButton->setEnabled(true); + ui->refreshButton->setEnabled(true); + ui->uploadButton->setEnabled(true); + if(status) + QMessageBox::information(this, "Download done", "The file has finished downloading"); + else + QMessageBox::information(this, tr("Error"), tr("An error occured while downloading the document")); +} + +void googleListDialog::updateProgressBar(qint64 bytesDone, qint64 bytesTotal) +{ + int value = (bytesDone * 100) / bytesTotal; + ui->downloadProgressBar->setValue(value); +} diff --git a/googlelistdialog.h b/googlelistdialog.h new file mode 100644 index 0000000..b2e9630 --- /dev/null +++ b/googlelistdialog.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2010 Kaushal M + * + * 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 GOOGLELISTDIALOG_H +#define GOOGLELISTDIALOG_H + +#include +#include + +namespace Ui { + class fileListDialog; +} + +class googleListDialog : public QDialog +{ + Q_OBJECT +public: + googleListDialog(GoogleDocumentService *service, QWidget *parent = 0); + +protected: + void changeEvent(QEvent *e); + +private slots: + void downloadButtonClickedSlot(); + void uploadButtonClickedSlot(); + void fillList(bool); + void downloadDoneSlot(bool); + void updateProgressBar(qint64, qint64); + void refreshList(); + +private: + Ui::fileListDialog *ui; + GoogleDocumentService *service; +}; + +#endif // GOOGLELISTDIALOG_H diff --git a/googlelistdialog.o b/googlelistdialog.o new file mode 100644 index 0000000..aadc0a3 Binary files /dev/null and b/googlelistdialog.o differ diff --git a/googleuploaddialog.cpp b/googleuploaddialog.cpp new file mode 100644 index 0000000..eac0ee3 --- /dev/null +++ b/googleuploaddialog.cpp @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2010 Kaushal M + * + * 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 "googleuploaddialog.h" +#include "ui_uploaddialog.h" + +#include "googledocumentservice.h" + +#include +#include + +googleUploadDialog::googleUploadDialog(GoogleDocumentService *service, QWidget *parent): + QDialog(parent), + ui(new Ui::uploadDialog) +{ + this->service = service; + ui->setupUi(this); + ui->descriptionBox->setVisible(false); + ui->tagsEdit->setVisible(false); + ui->label_3->setVisible(false); + ui->label_4->setVisible(false); + + connect(service, SIGNAL(uploadProgress(qint64,qint64)), this, SLOT(uploadProgressSlot(qint64,qint64))); + connect(ui->fileSelectButton, SIGNAL(clicked()), this, SLOT(showFileDialog())); + connect(ui->uploadButton, SIGNAL(clicked()), this, SLOT(uploadButtonClickedSlot())); +} + +googleUploadDialog::~googleUploadDialog() +{ + disconnect(service, SIGNAL(uploadDone(bool)), this, SLOT(uploadDoneSlot(bool))); + delete ui; +} + +void googleUploadDialog::changeEvent(QEvent *e) +{ + QDialog::changeEvent(e); + switch(e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +void googleUploadDialog::uploadProgressSlot(qint64 bytesSent, qint64 bytesTotal) +{ + int value = (bytesSent * 100) / bytesTotal; + ui->uploadProgress->setValue(value); +} + +void googleUploadDialog::showFileDialog() +{ + QString filter = "Supported Files (odt doc ppt xls)(*.odt *.doc *.ppt *.xls);; Documents (odt doc)(*.odt *.doc);; Presentations (ppt)(*.ppt) ;; Spreadsheets(xls)(*.xls)"; + QString filename = QFileDialog::getOpenFileName(this,QString("Select File"),tr(""),filter); + ui->fileSelectEdit->setText(filename); +} + +void googleUploadDialog::uploadButtonClickedSlot() +{ + if(ui->fileSelectEdit->text() == "" || ui->titleEdit->text() == "") + { + QMessageBox::information(this,"Incomplete parameters","Please enter both filename and title"); + return; + } + else + { + ui->fileSelectButton->setEnabled(false); + ui->titleEdit->setEnabled(false); + ui->uploadButton->setEnabled(false); + ui->uploadLabel->setText(tr("Uploading file..")); + service->uploadDocument(&ui->fileSelectEdit->text(), &ui->titleEdit->text()); + connect(service, SIGNAL(uploadDone(bool)), this, SLOT(uploadDoneSlot(bool))); + } +} + +void googleUploadDialog::uploadDoneSlot(bool status) +{ + if(!status) { + ui->uploadLabel->setText(tr("Upload failed")); + ui->uploadProgress->setValue(0); + } + else { + ui->uploadLabel->setText(tr("Upload completed")); + } + ui->doneButton->setEnabled(true); +} diff --git a/googleuploaddialog.h b/googleuploaddialog.h new file mode 100644 index 0000000..86093ce --- /dev/null +++ b/googleuploaddialog.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2010 Kaushal M + * + * 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 GOOGLEUPLOADDIALOG_H +#define GOOGLEUPLOADDIALOG_H + +#include + +class GoogleDocumentService; +namespace Ui { + class uploadDialog; +} + +class googleUploadDialog : public QDialog +{ + Q_OBJECT +public: + googleUploadDialog(GoogleDocumentService *service, QWidget *parent = 0); + ~googleUploadDialog(); + +protected: + void changeEvent(QEvent *); + +private: + Ui::uploadDialog *ui; + GoogleDocumentService *service; + +private slots: + void uploadProgressSlot(qint64 bytesSent, qint64 bytesTotal); + void showFileDialog(); + void uploadButtonClickedSlot(); + void uploadDoneSlot(bool); +}; + +#endif // GOOGLEUPLOADDIALOG_H diff --git a/googleuploaddialog.o b/googleuploaddialog.o new file mode 100644 index 0000000..985db3d Binary files /dev/null and b/googleuploaddialog.o differ diff --git a/loginwindow.cpp b/loginwindow.cpp new file mode 100644 index 0000000..bc8db14 --- /dev/null +++ b/loginwindow.cpp @@ -0,0 +1,139 @@ +/* + * This file is part of Maemo 5 Office UI for KOffice + * + * Copyright (C) 2010 Manikandaprasad N C . + * + * + * 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 St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + */ + +#include "loginwindow.h" +#include "googledocumentservice.h" +#include "googlelistdialog.h" +#include "slideshare.h" +#include "slidesharelistdialog.h" + +#include +#include + +#include +#include + +LoginWindow::LoginWindow(QWidget *parent) + : QDialog(parent), + m_authDialog(new Ui_Dialog) +{ + m_authDialog->setupUi(this); + + QStringList onlineServices; + onlineServices << "Google Documents"; + // Add services here + onlineServices << "Slide Share"; + m_authDialog->comboBox->addItems(onlineServices); + + connect(m_authDialog->loginButton, SIGNAL(clicked()), this, SLOT(loginService())); + connect(m_authDialog->comboBox, SIGNAL(activated(int)), this, SLOT(serviceSelected(int))); + + m_authDialog->userEdit->setFocus(); + show(); +} + +void LoginWindow::loginService() +{ + disableWidgets(); + if (0 == m_authDialog->comboBox->currentIndex()) { + gdoc = new GoogleDocumentService(); + setShowProgressIndicator(true); + gdoc->clientLogin(m_authDialog->userEdit->text(), m_authDialog->passwordEdit->text()); + connect(gdoc, SIGNAL(userAuthenticated(bool)), this, SLOT(authenticated(bool))); + } + if (1 == m_authDialog->comboBox->currentIndex()) + { + service = new SlideShare(this); + service->setApikey(new QString("KhSMYyiF")); + service->setsecretKey(new QString("HDXhAC5g")); + service->setUsername(new QString(m_authDialog->userEdit->text())); + service->setPassword(new QString(m_authDialog->passwordEdit->text())); + service->login(); + connect(service,SIGNAL(loginDone(bool)), this, SLOT(slideShareLoginDoneSlot(bool))); + } +} + +void LoginWindow::serviceSelected(int index) +{ + if (index == 0) { + m_authDialog->userEdit->setText("@gmail.com"); + m_authDialog->passwordEdit->clear(); + } else if (index == 1) { + m_authDialog->userEdit->clear(); + m_authDialog->passwordEdit->clear(); + } + m_authDialog->userEdit->setFocus(); +} + +void LoginWindow::authenticated(bool success) +{ + if (success) { + googleListDialog *ld = new googleListDialog(gdoc, this); + this->accept();; + ld->show(); + } + else { + QMessageBox::information(this, tr("Login Failed"), tr("Check your username & password")); + enableWidgets(); + } +} + +void LoginWindow::setShowProgressIndicator(bool visible) +{ + unsigned long val = visible ? 1 : 0; + Atom atom = XInternAtom(QX11Info::display(), + "_HILDON_WM_WINDOW_PROGRESS_INDICATOR", False); + XChangeProperty(QX11Info::display(), winId(), atom, XA_INTEGER, + 32, PropModeReplace, + (unsigned char *) &val, 1); +} + +void LoginWindow::slideShareLoginDoneSlot(bool loginStatus) +{if(loginStatus == false) + { + QMessageBox::information(this, tr("Login Failed"), tr("Check your username & password")); + enableWidgets(); + } + else + { + slideshareListDialog * fi = new slideshareListDialog(service, this); + this->accept(); + fi->show(); + } +} + +void LoginWindow::enableWidgets() +{ + m_authDialog->loginButton->setEnabled(true); + m_authDialog->userEdit->setEnabled(true); + m_authDialog->passwordEdit->setEnabled(true); + m_authDialog->comboBox->setEnabled(true); +} + +void LoginWindow::disableWidgets() +{ + m_authDialog->loginButton->setEnabled(false); + m_authDialog->userEdit->setEnabled(false); + m_authDialog->passwordEdit->setEnabled(false); + m_authDialog->comboBox->setEnabled(false); +} diff --git a/loginwindow.h b/loginwindow.h new file mode 100644 index 0000000..ae98d53 --- /dev/null +++ b/loginwindow.h @@ -0,0 +1,57 @@ +/* + * This file is part of Maemo 5 Office UI for KOffice + * + * Copyright (C) 2010 Manikandaprasad N C . + * + * + * 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 St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + */ + +#ifndef LOGINWINDOW_H +#define LOGINWINDOW_H + +#include + +#include "ui_authenticationdialog.h" + +class SlideShare; +class GoogleDocumentService; + +class LoginWindow : public QDialog +{ + Q_OBJECT + +public: + LoginWindow(QWidget *parent = 0); + GoogleDocumentService * googleService() { return gdoc; } + void setShowProgressIndicator(bool visible); + +private slots: + void loginService(); + void serviceSelected(int index); + void authenticated(bool success); + void slideShareLoginDoneSlot(bool loginStatus); + +private: + Ui_Dialog *m_authDialog; + GoogleDocumentService *gdoc; + SlideShare *service; + void enableWidgets(); + void disableWidgets(); +}; + +#endif // LOGINWINDOW_H diff --git a/loginwindow.o b/loginwindow.o new file mode 100644 index 0000000..d3637a0 Binary files /dev/null and b/loginwindow.o differ diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..459ef6e --- /dev/null +++ b/main.cpp @@ -0,0 +1,11 @@ +#include + +#include "loginwindow.h" + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + LoginWindow *login = new LoginWindow(); + + return app.exec(); +} diff --git a/main.o b/main.o new file mode 100644 index 0000000..a533409 Binary files /dev/null and b/main.o differ diff --git a/mimetypes.cpp b/mimetypes.cpp new file mode 100644 index 0000000..9124f7b --- /dev/null +++ b/mimetypes.cpp @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2010 Kaushal M + * + * 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 "mimetypes.h" + +QString MimeTypes::getMimeType(const QString & extension) +{ + QHash mimelist; + mimelist["odt"] = "application/vnd.oasis.opendocument.text"; + mimelist["doc"] = "application/msword"; + mimelist["odp"] = "application/vnd.oasis.opendocument.presentation"; + mimelist["ppt"] = "application/vnd.ms-powerpoint"; + mimelist["ods"] = "application/x-vnd.oasis.opendocument.spreadsheet"; + mimelist["xls"] = "application/ms-excel"; + return mimelist[extension]; +} diff --git a/mimetypes.h b/mimetypes.h new file mode 100644 index 0000000..8c93a08 --- /dev/null +++ b/mimetypes.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2010 Kaushal M + * + * 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 MIMETYPES_H +#define MIMETYPES_H + +#include +#include +class MimeTypes +{ +public: + static QString getMimeType(const QString &); +}; + +#endif // MIMETYPES_H diff --git a/mimetypes.o b/mimetypes.o new file mode 100644 index 0000000..381403a Binary files /dev/null and b/mimetypes.o differ diff --git a/moc_googledocumentservice.cpp b/moc_googledocumentservice.cpp new file mode 100644 index 0000000..3c32780 --- /dev/null +++ b/moc_googledocumentservice.cpp @@ -0,0 +1,141 @@ +/**************************************************************************** +** Meta object code from reading C++ file 'googledocumentservice.h' +** +** Created: Wed Jul 14 10:32:38 2010 +** by: The Qt Meta Object Compiler version 62 (Qt 4.6.3) +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +#include "googledocumentservice.h" +#if !defined(Q_MOC_OUTPUT_REVISION) +#error "The header file 'googledocumentservice.h' doesn't include ." +#elif Q_MOC_OUTPUT_REVISION != 62 +#error "This file was generated using the moc from 4.6.3. It" +#error "cannot be used with the include files from this version of Qt." +#error "(The moc has changed too much.)" +#endif + +QT_BEGIN_MOC_NAMESPACE +static const uint qt_meta_data_GoogleDocumentService[] = { + + // content: + 4, // revision + 0, // classname + 0, 0, // classinfo + 7, 14, // methods + 0, 0, // properties + 0, 0, // enums/sets + 0, 0, // constructors + 0, // flags + 6, // signalCount + + // signals: signature, parameters, type, tag, flags + 31, 23, 22, 22, 0x05, + 55, 22, 22, 22, 0x05, + 70, 22, 22, 22, 0x05, + 89, 22, 22, 22, 0x05, + 127, 106, 22, 22, 0x05, + 159, 106, 22, 22, 0x05, + + // slots: signature, parameters, type, tag, flags + 202, 189, 22, 22, 0x08, + + 0 // eod +}; + +static const char qt_meta_stringdata_GoogleDocumentService[] = { + "GoogleDocumentService\0\0success\0" + "userAuthenticated(bool)\0listDone(bool)\0" + "downloadDone(bool)\0uploadDone(bool)\0" + "bytesSent,bytesTotal\0" + "downloadProgress(qint64,qint64)\0" + "uploadProgress(qint64,qint64)\0" + "networkReply\0handleNetworkData(QNetworkReply*)\0" +}; + +const QMetaObject GoogleDocumentService::staticMetaObject = { + { &QObject::staticMetaObject, qt_meta_stringdata_GoogleDocumentService, + qt_meta_data_GoogleDocumentService, 0 } +}; + +#ifdef Q_NO_DATA_RELOCATION +const QMetaObject &GoogleDocumentService::getStaticMetaObject() { return staticMetaObject; } +#endif //Q_NO_DATA_RELOCATION + +const QMetaObject *GoogleDocumentService::metaObject() const +{ + return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject; +} + +void *GoogleDocumentService::qt_metacast(const char *_clname) +{ + if (!_clname) return 0; + if (!strcmp(_clname, qt_meta_stringdata_GoogleDocumentService)) + return static_cast(const_cast< GoogleDocumentService*>(this)); + return QObject::qt_metacast(_clname); +} + +int GoogleDocumentService::qt_metacall(QMetaObject::Call _c, int _id, void **_a) +{ + _id = QObject::qt_metacall(_c, _id, _a); + if (_id < 0) + return _id; + if (_c == QMetaObject::InvokeMetaMethod) { + switch (_id) { + case 0: userAuthenticated((*reinterpret_cast< bool(*)>(_a[1]))); break; + case 1: listDone((*reinterpret_cast< bool(*)>(_a[1]))); break; + case 2: downloadDone((*reinterpret_cast< bool(*)>(_a[1]))); break; + case 3: uploadDone((*reinterpret_cast< bool(*)>(_a[1]))); break; + case 4: downloadProgress((*reinterpret_cast< qint64(*)>(_a[1])),(*reinterpret_cast< qint64(*)>(_a[2]))); break; + case 5: uploadProgress((*reinterpret_cast< qint64(*)>(_a[1])),(*reinterpret_cast< qint64(*)>(_a[2]))); break; + case 6: handleNetworkData((*reinterpret_cast< QNetworkReply*(*)>(_a[1]))); break; + default: ; + } + _id -= 7; + } + return _id; +} + +// SIGNAL 0 +void GoogleDocumentService::userAuthenticated(bool _t1) +{ + void *_a[] = { 0, const_cast(reinterpret_cast(&_t1)) }; + QMetaObject::activate(this, &staticMetaObject, 0, _a); +} + +// SIGNAL 1 +void GoogleDocumentService::listDone(bool _t1) +{ + void *_a[] = { 0, const_cast(reinterpret_cast(&_t1)) }; + QMetaObject::activate(this, &staticMetaObject, 1, _a); +} + +// SIGNAL 2 +void GoogleDocumentService::downloadDone(bool _t1) +{ + void *_a[] = { 0, const_cast(reinterpret_cast(&_t1)) }; + QMetaObject::activate(this, &staticMetaObject, 2, _a); +} + +// SIGNAL 3 +void GoogleDocumentService::uploadDone(bool _t1) +{ + void *_a[] = { 0, const_cast(reinterpret_cast(&_t1)) }; + QMetaObject::activate(this, &staticMetaObject, 3, _a); +} + +// SIGNAL 4 +void GoogleDocumentService::downloadProgress(qint64 _t1, qint64 _t2) +{ + void *_a[] = { 0, const_cast(reinterpret_cast(&_t1)), const_cast(reinterpret_cast(&_t2)) }; + QMetaObject::activate(this, &staticMetaObject, 4, _a); +} + +// SIGNAL 5 +void GoogleDocumentService::uploadProgress(qint64 _t1, qint64 _t2) +{ + void *_a[] = { 0, const_cast(reinterpret_cast(&_t1)), const_cast(reinterpret_cast(&_t2)) }; + QMetaObject::activate(this, &staticMetaObject, 5, _a); +} +QT_END_MOC_NAMESPACE diff --git a/moc_googledocumentservice.o b/moc_googledocumentservice.o new file mode 100644 index 0000000..db1b586 Binary files /dev/null and b/moc_googledocumentservice.o differ diff --git a/moc_googlelistdialog.cpp b/moc_googlelistdialog.cpp new file mode 100644 index 0000000..361d71b --- /dev/null +++ b/moc_googlelistdialog.cpp @@ -0,0 +1,93 @@ +/**************************************************************************** +** Meta object code from reading C++ file 'googlelistdialog.h' +** +** Created: Wed Jul 14 10:32:42 2010 +** by: The Qt Meta Object Compiler version 62 (Qt 4.6.3) +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +#include "googlelistdialog.h" +#if !defined(Q_MOC_OUTPUT_REVISION) +#error "The header file 'googlelistdialog.h' doesn't include ." +#elif Q_MOC_OUTPUT_REVISION != 62 +#error "This file was generated using the moc from 4.6.3. It" +#error "cannot be used with the include files from this version of Qt." +#error "(The moc has changed too much.)" +#endif + +QT_BEGIN_MOC_NAMESPACE +static const uint qt_meta_data_googleListDialog[] = { + + // content: + 4, // revision + 0, // classname + 0, 0, // classinfo + 6, 14, // methods + 0, 0, // properties + 0, 0, // enums/sets + 0, 0, // constructors + 0, // flags + 0, // signalCount + + // slots: signature, parameters, type, tag, flags + 18, 17, 17, 17, 0x08, + 46, 17, 17, 17, 0x08, + 72, 17, 17, 17, 0x08, + 87, 17, 17, 17, 0x08, + 112, 110, 17, 17, 0x08, + 145, 17, 17, 17, 0x08, + + 0 // eod +}; + +static const char qt_meta_stringdata_googleListDialog[] = { + "googleListDialog\0\0downloadButtonClickedSlot()\0" + "uploadButtonClickedSlot()\0fillList(bool)\0" + "downloadDoneSlot(bool)\0,\0" + "updateProgressBar(qint64,qint64)\0" + "refreshList()\0" +}; + +const QMetaObject googleListDialog::staticMetaObject = { + { &QDialog::staticMetaObject, qt_meta_stringdata_googleListDialog, + qt_meta_data_googleListDialog, 0 } +}; + +#ifdef Q_NO_DATA_RELOCATION +const QMetaObject &googleListDialog::getStaticMetaObject() { return staticMetaObject; } +#endif //Q_NO_DATA_RELOCATION + +const QMetaObject *googleListDialog::metaObject() const +{ + return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject; +} + +void *googleListDialog::qt_metacast(const char *_clname) +{ + if (!_clname) return 0; + if (!strcmp(_clname, qt_meta_stringdata_googleListDialog)) + return static_cast(const_cast< googleListDialog*>(this)); + return QDialog::qt_metacast(_clname); +} + +int googleListDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a) +{ + _id = QDialog::qt_metacall(_c, _id, _a); + if (_id < 0) + return _id; + if (_c == QMetaObject::InvokeMetaMethod) { + switch (_id) { + case 0: downloadButtonClickedSlot(); break; + case 1: uploadButtonClickedSlot(); break; + case 2: fillList((*reinterpret_cast< bool(*)>(_a[1]))); break; + case 3: downloadDoneSlot((*reinterpret_cast< bool(*)>(_a[1]))); break; + case 4: updateProgressBar((*reinterpret_cast< qint64(*)>(_a[1])),(*reinterpret_cast< qint64(*)>(_a[2]))); break; + case 5: refreshList(); break; + default: ; + } + _id -= 6; + } + return _id; +} +QT_END_MOC_NAMESPACE diff --git a/moc_googlelistdialog.o b/moc_googlelistdialog.o new file mode 100644 index 0000000..3405070 Binary files /dev/null and b/moc_googlelistdialog.o differ diff --git a/moc_googleuploaddialog.cpp b/moc_googleuploaddialog.cpp new file mode 100644 index 0000000..68a6f0a --- /dev/null +++ b/moc_googleuploaddialog.cpp @@ -0,0 +1,88 @@ +/**************************************************************************** +** Meta object code from reading C++ file 'googleuploaddialog.h' +** +** Created: Wed Jul 14 10:32:42 2010 +** by: The Qt Meta Object Compiler version 62 (Qt 4.6.3) +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +#include "googleuploaddialog.h" +#if !defined(Q_MOC_OUTPUT_REVISION) +#error "The header file 'googleuploaddialog.h' doesn't include ." +#elif Q_MOC_OUTPUT_REVISION != 62 +#error "This file was generated using the moc from 4.6.3. It" +#error "cannot be used with the include files from this version of Qt." +#error "(The moc has changed too much.)" +#endif + +QT_BEGIN_MOC_NAMESPACE +static const uint qt_meta_data_googleUploadDialog[] = { + + // content: + 4, // revision + 0, // classname + 0, 0, // classinfo + 4, 14, // methods + 0, 0, // properties + 0, 0, // enums/sets + 0, 0, // constructors + 0, // flags + 0, // signalCount + + // slots: signature, parameters, type, tag, flags + 41, 20, 19, 19, 0x08, + 75, 19, 19, 19, 0x08, + 92, 19, 19, 19, 0x08, + 118, 19, 19, 19, 0x08, + + 0 // eod +}; + +static const char qt_meta_stringdata_googleUploadDialog[] = { + "googleUploadDialog\0\0bytesSent,bytesTotal\0" + "uploadProgressSlot(qint64,qint64)\0" + "showFileDialog()\0uploadButtonClickedSlot()\0" + "uploadDoneSlot(bool)\0" +}; + +const QMetaObject googleUploadDialog::staticMetaObject = { + { &QDialog::staticMetaObject, qt_meta_stringdata_googleUploadDialog, + qt_meta_data_googleUploadDialog, 0 } +}; + +#ifdef Q_NO_DATA_RELOCATION +const QMetaObject &googleUploadDialog::getStaticMetaObject() { return staticMetaObject; } +#endif //Q_NO_DATA_RELOCATION + +const QMetaObject *googleUploadDialog::metaObject() const +{ + return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject; +} + +void *googleUploadDialog::qt_metacast(const char *_clname) +{ + if (!_clname) return 0; + if (!strcmp(_clname, qt_meta_stringdata_googleUploadDialog)) + return static_cast(const_cast< googleUploadDialog*>(this)); + return QDialog::qt_metacast(_clname); +} + +int googleUploadDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a) +{ + _id = QDialog::qt_metacall(_c, _id, _a); + if (_id < 0) + return _id; + if (_c == QMetaObject::InvokeMetaMethod) { + switch (_id) { + case 0: uploadProgressSlot((*reinterpret_cast< qint64(*)>(_a[1])),(*reinterpret_cast< qint64(*)>(_a[2]))); break; + case 1: showFileDialog(); break; + case 2: uploadButtonClickedSlot(); break; + case 3: uploadDoneSlot((*reinterpret_cast< bool(*)>(_a[1]))); break; + default: ; + } + _id -= 4; + } + return _id; +} +QT_END_MOC_NAMESPACE diff --git a/moc_googleuploaddialog.o b/moc_googleuploaddialog.o new file mode 100644 index 0000000..878be8a Binary files /dev/null and b/moc_googleuploaddialog.o differ diff --git a/moc_loginwindow.cpp b/moc_loginwindow.cpp new file mode 100644 index 0000000..ad01a4b --- /dev/null +++ b/moc_loginwindow.cpp @@ -0,0 +1,88 @@ +/**************************************************************************** +** Meta object code from reading C++ file 'loginwindow.h' +** +** Created: Wed Jul 14 11:34:00 2010 +** by: The Qt Meta Object Compiler version 62 (Qt 4.6.3) +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +#include "loginwindow.h" +#if !defined(Q_MOC_OUTPUT_REVISION) +#error "The header file 'loginwindow.h' doesn't include ." +#elif Q_MOC_OUTPUT_REVISION != 62 +#error "This file was generated using the moc from 4.6.3. It" +#error "cannot be used with the include files from this version of Qt." +#error "(The moc has changed too much.)" +#endif + +QT_BEGIN_MOC_NAMESPACE +static const uint qt_meta_data_LoginWindow[] = { + + // content: + 4, // revision + 0, // classname + 0, 0, // classinfo + 4, 14, // methods + 0, 0, // properties + 0, 0, // enums/sets + 0, 0, // constructors + 0, // flags + 0, // signalCount + + // slots: signature, parameters, type, tag, flags + 13, 12, 12, 12, 0x08, + 34, 28, 12, 12, 0x08, + 63, 55, 12, 12, 0x08, + 95, 83, 12, 12, 0x08, + + 0 // eod +}; + +static const char qt_meta_stringdata_LoginWindow[] = { + "LoginWindow\0\0loginService()\0index\0" + "serviceSelected(int)\0success\0" + "authenticated(bool)\0loginStatus\0" + "slideShareLoginDoneSlot(bool)\0" +}; + +const QMetaObject LoginWindow::staticMetaObject = { + { &QDialog::staticMetaObject, qt_meta_stringdata_LoginWindow, + qt_meta_data_LoginWindow, 0 } +}; + +#ifdef Q_NO_DATA_RELOCATION +const QMetaObject &LoginWindow::getStaticMetaObject() { return staticMetaObject; } +#endif //Q_NO_DATA_RELOCATION + +const QMetaObject *LoginWindow::metaObject() const +{ + return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject; +} + +void *LoginWindow::qt_metacast(const char *_clname) +{ + if (!_clname) return 0; + if (!strcmp(_clname, qt_meta_stringdata_LoginWindow)) + return static_cast(const_cast< LoginWindow*>(this)); + return QDialog::qt_metacast(_clname); +} + +int LoginWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) +{ + _id = QDialog::qt_metacall(_c, _id, _a); + if (_id < 0) + return _id; + if (_c == QMetaObject::InvokeMetaMethod) { + switch (_id) { + case 0: loginService(); break; + case 1: serviceSelected((*reinterpret_cast< int(*)>(_a[1]))); break; + case 2: authenticated((*reinterpret_cast< bool(*)>(_a[1]))); break; + case 3: slideShareLoginDoneSlot((*reinterpret_cast< bool(*)>(_a[1]))); break; + default: ; + } + _id -= 4; + } + return _id; +} +QT_END_MOC_NAMESPACE diff --git a/moc_loginwindow.o b/moc_loginwindow.o new file mode 100644 index 0000000..cbd533b Binary files /dev/null and b/moc_loginwindow.o differ diff --git a/moc_slideshare.cpp b/moc_slideshare.cpp new file mode 100644 index 0000000..aa260ee --- /dev/null +++ b/moc_slideshare.cpp @@ -0,0 +1,141 @@ +/**************************************************************************** +** Meta object code from reading C++ file 'slideshare.h' +** +** Created: Wed Jul 14 10:32:39 2010 +** by: The Qt Meta Object Compiler version 62 (Qt 4.6.3) +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +#include "slideshare.h" +#if !defined(Q_MOC_OUTPUT_REVISION) +#error "The header file 'slideshare.h' doesn't include ." +#elif Q_MOC_OUTPUT_REVISION != 62 +#error "This file was generated using the moc from 4.6.3. It" +#error "cannot be used with the include files from this version of Qt." +#error "(The moc has changed too much.)" +#endif + +QT_BEGIN_MOC_NAMESPACE +static const uint qt_meta_data_SlideShare[] = { + + // content: + 4, // revision + 0, // classname + 0, 0, // classinfo + 9, 14, // methods + 0, 0, // properties + 0, 0, // enums/sets + 0, 0, // constructors + 0, // flags + 6, // signalCount + + // signals: signature, parameters, type, tag, flags + 33, 12, 11, 11, 0x05, + 65, 12, 11, 11, 0x05, + 95, 11, 11, 11, 0x05, + 111, 11, 11, 11, 0x05, + 124, 11, 11, 11, 0x05, + 135, 11, 11, 11, 0x05, + + // slots: signature, parameters, type, tag, flags + 150, 11, 11, 11, 0x08, + 163, 11, 11, 11, 0x08, + 175, 11, 11, 11, 0x08, + + 0 // eod +}; + +static const char qt_meta_stringdata_SlideShare[] = { + "SlideShare\0\0bytesSent,bytesTotal\0" + "downloadProgress(qint64,qint64)\0" + "uploadProgress(qint64,qint64)\0" + "loginDone(bool)\0uploadDone()\0listDone()\0" + "downloadDone()\0afterLogin()\0parseList()\0" + "saveFile()\0" +}; + +const QMetaObject SlideShare::staticMetaObject = { + { &QObject::staticMetaObject, qt_meta_stringdata_SlideShare, + qt_meta_data_SlideShare, 0 } +}; + +#ifdef Q_NO_DATA_RELOCATION +const QMetaObject &SlideShare::getStaticMetaObject() { return staticMetaObject; } +#endif //Q_NO_DATA_RELOCATION + +const QMetaObject *SlideShare::metaObject() const +{ + return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject; +} + +void *SlideShare::qt_metacast(const char *_clname) +{ + if (!_clname) return 0; + if (!strcmp(_clname, qt_meta_stringdata_SlideShare)) + return static_cast(const_cast< SlideShare*>(this)); + return QObject::qt_metacast(_clname); +} + +int SlideShare::qt_metacall(QMetaObject::Call _c, int _id, void **_a) +{ + _id = QObject::qt_metacall(_c, _id, _a); + if (_id < 0) + return _id; + if (_c == QMetaObject::InvokeMetaMethod) { + switch (_id) { + case 0: downloadProgress((*reinterpret_cast< qint64(*)>(_a[1])),(*reinterpret_cast< qint64(*)>(_a[2]))); break; + case 1: uploadProgress((*reinterpret_cast< qint64(*)>(_a[1])),(*reinterpret_cast< qint64(*)>(_a[2]))); break; + case 2: loginDone((*reinterpret_cast< bool(*)>(_a[1]))); break; + case 3: uploadDone(); break; + case 4: listDone(); break; + case 5: downloadDone(); break; + case 6: afterLogin(); break; + case 7: parseList(); break; + case 8: saveFile(); break; + default: ; + } + _id -= 9; + } + return _id; +} + +// SIGNAL 0 +void SlideShare::downloadProgress(qint64 _t1, qint64 _t2) +{ + void *_a[] = { 0, const_cast(reinterpret_cast(&_t1)), const_cast(reinterpret_cast(&_t2)) }; + QMetaObject::activate(this, &staticMetaObject, 0, _a); +} + +// SIGNAL 1 +void SlideShare::uploadProgress(qint64 _t1, qint64 _t2) +{ + void *_a[] = { 0, const_cast(reinterpret_cast(&_t1)), const_cast(reinterpret_cast(&_t2)) }; + QMetaObject::activate(this, &staticMetaObject, 1, _a); +} + +// SIGNAL 2 +void SlideShare::loginDone(bool _t1) +{ + void *_a[] = { 0, const_cast(reinterpret_cast(&_t1)) }; + QMetaObject::activate(this, &staticMetaObject, 2, _a); +} + +// SIGNAL 3 +void SlideShare::uploadDone() +{ + QMetaObject::activate(this, &staticMetaObject, 3, 0); +} + +// SIGNAL 4 +void SlideShare::listDone() +{ + QMetaObject::activate(this, &staticMetaObject, 4, 0); +} + +// SIGNAL 5 +void SlideShare::downloadDone() +{ + QMetaObject::activate(this, &staticMetaObject, 5, 0); +} +QT_END_MOC_NAMESPACE diff --git a/moc_slideshare.o b/moc_slideshare.o new file mode 100644 index 0000000..2b8aa60 Binary files /dev/null and b/moc_slideshare.o differ diff --git a/moc_slidesharelistdialog.cpp b/moc_slidesharelistdialog.cpp new file mode 100644 index 0000000..948ab63 --- /dev/null +++ b/moc_slidesharelistdialog.cpp @@ -0,0 +1,93 @@ +/**************************************************************************** +** Meta object code from reading C++ file 'slidesharelistdialog.h' +** +** Created: Wed Jul 14 10:32:40 2010 +** by: The Qt Meta Object Compiler version 62 (Qt 4.6.3) +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +#include "slidesharelistdialog.h" +#if !defined(Q_MOC_OUTPUT_REVISION) +#error "The header file 'slidesharelistdialog.h' doesn't include ." +#elif Q_MOC_OUTPUT_REVISION != 62 +#error "This file was generated using the moc from 4.6.3. It" +#error "cannot be used with the include files from this version of Qt." +#error "(The moc has changed too much.)" +#endif + +QT_BEGIN_MOC_NAMESPACE +static const uint qt_meta_data_slideshareListDialog[] = { + + // content: + 4, // revision + 0, // classname + 0, 0, // classinfo + 6, 14, // methods + 0, 0, // properties + 0, 0, // enums/sets + 0, 0, // constructors + 0, // flags + 0, // signalCount + + // slots: signature, parameters, type, tag, flags + 22, 21, 21, 21, 0x08, + 50, 21, 21, 21, 0x08, + 76, 21, 21, 21, 0x08, + 87, 21, 21, 21, 0x08, + 108, 106, 21, 21, 0x08, + 141, 21, 21, 21, 0x08, + + 0 // eod +}; + +static const char qt_meta_stringdata_slideshareListDialog[] = { + "slideshareListDialog\0\0downloadButtonClickedSlot()\0" + "uploadButtonClickedSlot()\0fillList()\0" + "downloadDoneSlot()\0,\0" + "updateProgressBar(qint64,qint64)\0" + "refreshList()\0" +}; + +const QMetaObject slideshareListDialog::staticMetaObject = { + { &QDialog::staticMetaObject, qt_meta_stringdata_slideshareListDialog, + qt_meta_data_slideshareListDialog, 0 } +}; + +#ifdef Q_NO_DATA_RELOCATION +const QMetaObject &slideshareListDialog::getStaticMetaObject() { return staticMetaObject; } +#endif //Q_NO_DATA_RELOCATION + +const QMetaObject *slideshareListDialog::metaObject() const +{ + return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject; +} + +void *slideshareListDialog::qt_metacast(const char *_clname) +{ + if (!_clname) return 0; + if (!strcmp(_clname, qt_meta_stringdata_slideshareListDialog)) + return static_cast(const_cast< slideshareListDialog*>(this)); + return QDialog::qt_metacast(_clname); +} + +int slideshareListDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a) +{ + _id = QDialog::qt_metacall(_c, _id, _a); + if (_id < 0) + return _id; + if (_c == QMetaObject::InvokeMetaMethod) { + switch (_id) { + case 0: downloadButtonClickedSlot(); break; + case 1: uploadButtonClickedSlot(); break; + case 2: fillList(); break; + case 3: downloadDoneSlot(); break; + case 4: updateProgressBar((*reinterpret_cast< qint64(*)>(_a[1])),(*reinterpret_cast< qint64(*)>(_a[2]))); break; + case 5: refreshList(); break; + default: ; + } + _id -= 6; + } + return _id; +} +QT_END_MOC_NAMESPACE diff --git a/moc_slidesharelistdialog.o b/moc_slidesharelistdialog.o new file mode 100644 index 0000000..fb2526b Binary files /dev/null and b/moc_slidesharelistdialog.o differ diff --git a/moc_slideshareuploaddialog.cpp b/moc_slideshareuploaddialog.cpp new file mode 100644 index 0000000..e05b5cf --- /dev/null +++ b/moc_slideshareuploaddialog.cpp @@ -0,0 +1,88 @@ +/**************************************************************************** +** Meta object code from reading C++ file 'slideshareuploaddialog.h' +** +** Created: Wed Jul 14 10:32:41 2010 +** by: The Qt Meta Object Compiler version 62 (Qt 4.6.3) +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +#include "slideshareuploaddialog.h" +#if !defined(Q_MOC_OUTPUT_REVISION) +#error "The header file 'slideshareuploaddialog.h' doesn't include ." +#elif Q_MOC_OUTPUT_REVISION != 62 +#error "This file was generated using the moc from 4.6.3. It" +#error "cannot be used with the include files from this version of Qt." +#error "(The moc has changed too much.)" +#endif + +QT_BEGIN_MOC_NAMESPACE +static const uint qt_meta_data_slideshareUploadDialog[] = { + + // content: + 4, // revision + 0, // classname + 0, 0, // classinfo + 4, 14, // methods + 0, 0, // properties + 0, 0, // enums/sets + 0, 0, // constructors + 0, // flags + 0, // signalCount + + // slots: signature, parameters, type, tag, flags + 45, 24, 23, 23, 0x08, + 79, 23, 23, 23, 0x08, + 96, 23, 23, 23, 0x08, + 122, 23, 23, 23, 0x08, + + 0 // eod +}; + +static const char qt_meta_stringdata_slideshareUploadDialog[] = { + "slideshareUploadDialog\0\0bytesSent,bytesTotal\0" + "uploadProgressSlot(qint64,qint64)\0" + "showFileDialog()\0uploadButtonClickedSlot()\0" + "uploadDoneSlot()\0" +}; + +const QMetaObject slideshareUploadDialog::staticMetaObject = { + { &QDialog::staticMetaObject, qt_meta_stringdata_slideshareUploadDialog, + qt_meta_data_slideshareUploadDialog, 0 } +}; + +#ifdef Q_NO_DATA_RELOCATION +const QMetaObject &slideshareUploadDialog::getStaticMetaObject() { return staticMetaObject; } +#endif //Q_NO_DATA_RELOCATION + +const QMetaObject *slideshareUploadDialog::metaObject() const +{ + return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject; +} + +void *slideshareUploadDialog::qt_metacast(const char *_clname) +{ + if (!_clname) return 0; + if (!strcmp(_clname, qt_meta_stringdata_slideshareUploadDialog)) + return static_cast(const_cast< slideshareUploadDialog*>(this)); + return QDialog::qt_metacast(_clname); +} + +int slideshareUploadDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a) +{ + _id = QDialog::qt_metacall(_c, _id, _a); + if (_id < 0) + return _id; + if (_c == QMetaObject::InvokeMetaMethod) { + switch (_id) { + case 0: uploadProgressSlot((*reinterpret_cast< qint64(*)>(_a[1])),(*reinterpret_cast< qint64(*)>(_a[2]))); break; + case 1: showFileDialog(); break; + case 2: uploadButtonClickedSlot(); break; + case 3: uploadDoneSlot(); break; + default: ; + } + _id -= 4; + } + return _id; +} +QT_END_MOC_NAMESPACE diff --git a/moc_slideshareuploaddialog.o b/moc_slideshareuploaddialog.o new file mode 100644 index 0000000..18e8473 Binary files /dev/null and b/moc_slideshareuploaddialog.o differ diff --git a/onlineServices.pro.user b/onlineServices.pro.user new file mode 100644 index 0000000..bca3cd2 --- /dev/null +++ b/onlineServices.pro.user @@ -0,0 +1,321 @@ + + + + RunConfiguration0-BaseEnvironmentBase + 2 + + + RunConfiguration0-CommandLineArguments + + + + RunConfiguration0-ProFile + onlineServices.pro + + + RunConfiguration0-RunConfiguration.name + onlineServices + + + RunConfiguration0-UseDyldImageSuffix + false + + + RunConfiguration0-UseTerminal + false + + + RunConfiguration0-UserEnvironmentChanges + + + + RunConfiguration0-UserSetName + false + + + RunConfiguration0-UserSetWorkingDirectory + false + + + RunConfiguration0-UserWorkingDirectory + + + + RunConfiguration0-type + Qt4ProjectManager.Qt4RunConfiguration + + + activeRunConfiguration + 0 + + + activebuildconfiguration + Debug + + + buildConfiguration-Debug + + Debug + 2 + 0 + + 2 + + + + buildconfiguration-Debug-buildstep0 + + Debug + + ALSA_PLUGINS_DIR=/usr/lib/alsa-lib + DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-BoNqUNmSMH,guid=2d32e0a9a4d5f390c69468730000002f + DESKTOP_SESSION=kde + DISPLAY=:0.0 + DM_CONTROL=/var/run/xdmctl + GOARCH=amd64 + GOBIN=/usr/bin + GOOS=linux + GOROOT=/usr/lib/go + GPG_AGENT_INFO=/tmp/gpg-f3PyjE/S.gpg-agent:3130:1 + GS_LIB=/home/maemo/.fonts + GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/maemo/.gtkrc-2.0::/home/maemo/.kde4/share/config/gtkrc-2.0 + GTK_RC_FILES=/etc/gtk/gtkrc:/home/maemo/.gtkrc::/home/maemo/.kde4/share/config/gtkrc + G_BROKEN_FILENAMES=1 + HG=/usr/bin/hg + HISTCONTROL=erasedups + HISTSIZE=1000 + HOME=/home/maemo + INPUTRC=/etc/inputrc + KDEDIRS=:/home/maemo/koffice-inst + KDE_FULL_SESSION=true + KDE_MULTIHEAD=false + KDE_SESSION_UID=1000 + KDE_SESSION_VERSION=4 + LANG=en_US.UTF-8 + LD_LIBRARY_PATH=/usr/lib/qtcreator: + LESS=-R + LOGNAME=maemo + MALLOC_CHECK_=3 + MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins + PATH=/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/home/maemo/koffice-inst/bin + PKG_CONFIG_PATH=/usr/lib/pkgconfig + PS3=> + PS4=+ + PWD=/home/maemo/Documents + QTDIR=/usr/share/qt + QT_PLUGIN_PATH=/home/maemo/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/ + SESSION_MANAGER=local/arch:@/tmp/.ICE-unix/3171,unix/arch:/tmp/.ICE-unix/3171 + SHELL=/bin/bash + SHLVL=1 + SSH_AGENT_PID=3133 + SSH_AUTH_SOCK=/tmp/ssh-xujlLF3132/agent.3132 + USER=maemo + WINDOWPATH=7 + XCURSOR_THEME=Oxygen_Black + XDG_CACHE_HOME=/home/maemo/.cache + XDG_CONFIG_DIRS=/etc/xdg + XDG_CONFIG_HOME=/home/maemo/.config + XDG_DATA_DIRS=/usr/share:/usr/local/share + XDG_DATA_HOME=/home/maemo/.local/share + XDG_SESSION_COOKIE=34c09630a6ae9ad92365c03300000216-1278743272.464893-215627025 + XDM_MANAGED=method=classic + + + /home/maemo/Project/onlineServices/onlineServices.pro + -spec + linux-g++-64 + -r + CONFIG+=debug + + /usr/bin/qmake + false + /home/maemo/Project/onlineServices + + + + buildconfiguration-Debug-buildstep1 + + Debug + + ALSA_PLUGINS_DIR=/usr/lib/alsa-lib + DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-BoNqUNmSMH,guid=2d32e0a9a4d5f390c69468730000002f + DESKTOP_SESSION=kde + DISPLAY=:0.0 + DM_CONTROL=/var/run/xdmctl + GOARCH=amd64 + GOBIN=/usr/bin + GOOS=linux + GOROOT=/usr/lib/go + GPG_AGENT_INFO=/tmp/gpg-f3PyjE/S.gpg-agent:3130:1 + GS_LIB=/home/maemo/.fonts + GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/maemo/.gtkrc-2.0::/home/maemo/.kde4/share/config/gtkrc-2.0 + GTK_RC_FILES=/etc/gtk/gtkrc:/home/maemo/.gtkrc::/home/maemo/.kde4/share/config/gtkrc + G_BROKEN_FILENAMES=1 + HG=/usr/bin/hg + HISTCONTROL=erasedups + HISTSIZE=1000 + HOME=/home/maemo + INPUTRC=/etc/inputrc + KDEDIRS=:/home/maemo/koffice-inst + KDE_FULL_SESSION=true + KDE_MULTIHEAD=false + KDE_SESSION_UID=1000 + KDE_SESSION_VERSION=4 + LANG=en_US.UTF-8 + LD_LIBRARY_PATH=/usr/lib/qtcreator: + LESS=-R + LOGNAME=maemo + MALLOC_CHECK_=3 + MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins + PATH=/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/home/maemo/koffice-inst/bin + PKG_CONFIG_PATH=/usr/lib/pkgconfig + PS3=> + PS4=+ + PWD=/home/maemo/Documents + QTDIR=/usr/share/qt + QT_PLUGIN_PATH=/home/maemo/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/ + SESSION_MANAGER=local/arch:@/tmp/.ICE-unix/3171,unix/arch:/tmp/.ICE-unix/3171 + SHELL=/bin/bash + SHLVL=1 + SSH_AGENT_PID=3133 + SSH_AUTH_SOCK=/tmp/ssh-xujlLF3132/agent.3132 + USER=maemo + WINDOWPATH=7 + XCURSOR_THEME=Oxygen_Black + XDG_CACHE_HOME=/home/maemo/.cache + XDG_CONFIG_DIRS=/etc/xdg + XDG_CONFIG_HOME=/home/maemo/.config + XDG_DATA_DIRS=/usr/share:/usr/local/share + XDG_DATA_HOME=/home/maemo/.local/share + XDG_SESSION_COOKIE=34c09630a6ae9ad92365c03300000216-1278743272.464893-215627025 + XDM_MANAGED=method=classic + + false + + -w + + /usr/bin/make + true + /home/maemo/Project/onlineServices + + + + buildconfiguration-Debug-cleanstep0 + + Debug + + ALSA_PLUGINS_DIR=/usr/lib/alsa-lib + DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-GxNPxgLbpy,guid=2232915ea0e53881df5d3ea100000648 + DESKTOP_SESSION=kde + DISPLAY=:0.0 + DM_CONTROL=/var/run/xdmctl + GOARCH=amd64 + GOBIN=/usr/bin + GOOS=linux + GOROOT=/usr/lib/go + GPG_AGENT_INFO=/tmp/gpg-Bom7EH/S.gpg-agent:6352:1 + GS_LIB=/home/maemo/.fonts + GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/maemo/.gtkrc-2.0::/home/maemo/.kde4/share/config/gtkrc-2.0 + GTK_RC_FILES=/etc/gtk/gtkrc:/home/maemo/.gtkrc::/home/maemo/.kde4/share/config/gtkrc + G_BROKEN_FILENAMES=1 + HG=/usr/bin/hg + HISTCONTROL=erasedups + HISTSIZE=1000 + HOME=/home/maemo + INPUTRC=/etc/inputrc + KDEDIRS=:/home/maemo/koffice-inst + KDE_FULL_SESSION=true + KDE_MULTIHEAD=false + KDE_SESSION_UID=1000 + KDE_SESSION_VERSION=4 + LANG=en_US.UTF-8 + LD_LIBRARY_PATH=/usr/lib/qtcreator: + LESS=-R + LOGNAME=maemo + MALLOC_CHECK_=3 + MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins + PATH=/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/home/maemo/koffice-inst/bin + PKG_CONFIG_PATH=/usr/lib/pkgconfig + PS3=> + PS4=+ + PWD=/home/maemo/Documents + QTDIR=/usr/share/qt + QT_PLUGIN_PATH=/home/maemo/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/ + SESSION_MANAGER=local/arch:@/tmp/.ICE-unix/6413,unix/arch:/tmp/.ICE-unix/6413 + SHELL=/bin/bash + SHLVL=1 + SSH_AGENT_PID=6355 + SSH_AUTH_SOCK=/tmp/ssh-VApZNi6354/agent.6354 + USER=maemo + WINDOWPATH=8 + XCURSOR_THEME=Oxygen_Black + XDG_CACHE_HOME=/home/maemo/.cache + XDG_CONFIG_DIRS=/etc/xdg + XDG_CONFIG_HOME=/home/maemo/.config + XDG_DATA_DIRS=/usr/share:/usr/local/share + XDG_DATA_HOME=/home/maemo/.local/share + XDG_SESSION_COOKIE=34c09630a6ae9ad92365c03300000216-1278578918.559616-1566298267 + XDM_MANAGED=method=classic + + true + + clean + -w + + /usr/bin/make + true + /home/maemo/Project/onlineServices + true + + clean + + + + + buildconfigurations + + Debug + + + + buildstep0 + + + + + + + buildstep1 + + + + + + buildsteps + + trolltech.qt4projectmanager.qmake + trolltech.qt4projectmanager.make + + + + cleanstep0 + + + true + + + + cleansteps + + trolltech.qt4projectmanager.make + + + + defaultFileEncoding + UTF-8 + + + project + + + diff --git a/onlineServices.pro.user.1.3 b/onlineServices.pro.user.1.3 new file mode 100644 index 0000000..70b85f6 --- /dev/null +++ b/onlineServices.pro.user.1.3 @@ -0,0 +1,320 @@ + + + + RunConfiguration0-BaseEnvironmentBase + 2 + + + RunConfiguration0-CommandLineArguments + + + + RunConfiguration0-ProFile + onlineServices.pro + + + RunConfiguration0-RunConfiguration.name + onlineServices + + + RunConfiguration0-UseDyldImageSuffix + false + + + RunConfiguration0-UseTerminal + false + + + RunConfiguration0-UserEnvironmentChanges + + + + RunConfiguration0-UserSetName + false + + + RunConfiguration0-UserSetWorkingDirectory + false + + + RunConfiguration0-UserWorkingDirectory + + + + RunConfiguration0-type + Qt4ProjectManager.Qt4RunConfiguration + + + activeRunConfiguration + 0 + + + activebuildconfiguration + Debug + + + buildConfiguration-Debug + + Debug + 2 + 0 + 2 + + + + buildconfiguration-Debug-buildstep0 + + Debug + + ALSA_PLUGINS_DIR=/usr/lib/alsa-lib + DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-ZOdel41nVI,guid=6d7798108c63ef2016727e40000000b5 + DESKTOP_SESSION=default + DISPLAY=:0.0 + DM_CONTROL=/var/run/xdmctl + GOARCH=amd64 + GOBIN=/usr/bin + GOOS=linux + GOROOT=/usr/lib/go + GPG_AGENT_INFO=/tmp/gpg-C3HOkx/S.gpg-agent:3356:1 + GS_LIB=/home/maemo/.fonts + GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/maemo/.gtkrc-2.0:/home/maemo/.gtkrc-2.0-kde4:/home/maemo/.kdemod4/share/config/gtkrc-2.0 + GTK_RC_FILES=/etc/gtk/gtkrc:/home/maemo/.gtkrc::/home/maemo/.kdemod4/share/config/gtkrc + G_BROKEN_FILENAMES=1 + HG=/usr/bin/hg + HISTCONTROL=erasedups + HISTSIZE=1000 + HOME=/home/maemo + INPUTRC=/etc/inputrc + KDEDIRS=:/home/maemo/koffice-inst + KDE_FULL_SESSION=true + KDE_MULTIHEAD=false + KDE_SESSION_UID=1000 + KDE_SESSION_VERSION=4 + LANG=en_US.UTF-8 + LANGUAGE= + LD_LIBRARY_PATH=/usr/lib/qtcreator: + LESS=-R + LOGNAME=maemo + MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins + PATH=/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/home/maemo/koffice-inst/bin + PKG_CONFIG_PATH=/usr/lib/pkgconfig + PS3=> + PS4=+ + PWD=/home/maemo/Documents + QTDIR=/usr/share/qt + QT_PLUGIN_PATH=/home/maemo/.kdemod4/lib/kde4/plugins/:/usr/lib/kde4/plugins/ + SESSION_MANAGER=local/arch:@/tmp/.ICE-unix/3454,unix/arch:/tmp/.ICE-unix/3454 + SHELL=/bin/bash + SHLVL=1 + SSH_AGENT_PID=3359 + SSH_AUTH_SOCK=/tmp/ssh-ntNFdL3358/agent.3358 + USER=maemo + WINDOWPATH=7 + XCURSOR_THEME=Oxygen_Black + XDG_CACHE_HOME=/home/maemo/.cache + XDG_CONFIG_DIRS=/etc/xdg + XDG_CONFIG_HOME=/home/maemo/.config + XDG_DATA_DIRS=/usr/share:/usr/local/share + XDG_DATA_HOME=/home/maemo/.local/share + XDG_SESSION_COOKIE=34c09630a6ae9ad92365c03300000216-1278471612.809573-1127632378 + XDM_MANAGED=method=classic + + + /home/maemo/Project/onlineServices/onlineServices.pro + -spec + linux-g++-64 + -r + CONFIG+=debug + + /usr/bin/qmake + false + /home/maemo/Project/onlineServices + + + + buildconfiguration-Debug-buildstep1 + + Debug + + ALSA_PLUGINS_DIR=/usr/lib/alsa-lib + DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-ZOdel41nVI,guid=6d7798108c63ef2016727e40000000b5 + DESKTOP_SESSION=default + DISPLAY=:0.0 + DM_CONTROL=/var/run/xdmctl + GOARCH=amd64 + GOBIN=/usr/bin + GOOS=linux + GOROOT=/usr/lib/go + GPG_AGENT_INFO=/tmp/gpg-C3HOkx/S.gpg-agent:3356:1 + GS_LIB=/home/maemo/.fonts + GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/maemo/.gtkrc-2.0:/home/maemo/.gtkrc-2.0-kde4:/home/maemo/.kdemod4/share/config/gtkrc-2.0 + GTK_RC_FILES=/etc/gtk/gtkrc:/home/maemo/.gtkrc::/home/maemo/.kdemod4/share/config/gtkrc + G_BROKEN_FILENAMES=1 + HG=/usr/bin/hg + HISTCONTROL=erasedups + HISTSIZE=1000 + HOME=/home/maemo + INPUTRC=/etc/inputrc + KDEDIRS=:/home/maemo/koffice-inst + KDE_FULL_SESSION=true + KDE_MULTIHEAD=false + KDE_SESSION_UID=1000 + KDE_SESSION_VERSION=4 + LANG=en_US.UTF-8 + LANGUAGE= + LD_LIBRARY_PATH=/usr/lib/qtcreator: + LESS=-R + LOGNAME=maemo + MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins + PATH=/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/home/maemo/koffice-inst/bin + PKG_CONFIG_PATH=/usr/lib/pkgconfig + PS3=> + PS4=+ + PWD=/home/maemo/Documents + QTDIR=/usr/share/qt + QT_PLUGIN_PATH=/home/maemo/.kdemod4/lib/kde4/plugins/:/usr/lib/kde4/plugins/ + SESSION_MANAGER=local/arch:@/tmp/.ICE-unix/3454,unix/arch:/tmp/.ICE-unix/3454 + SHELL=/bin/bash + SHLVL=1 + SSH_AGENT_PID=3359 + SSH_AUTH_SOCK=/tmp/ssh-ntNFdL3358/agent.3358 + USER=maemo + WINDOWPATH=7 + XCURSOR_THEME=Oxygen_Black + XDG_CACHE_HOME=/home/maemo/.cache + XDG_CONFIG_DIRS=/etc/xdg + XDG_CONFIG_HOME=/home/maemo/.config + XDG_DATA_DIRS=/usr/share:/usr/local/share + XDG_DATA_HOME=/home/maemo/.local/share + XDG_SESSION_COOKIE=34c09630a6ae9ad92365c03300000216-1278471612.809573-1127632378 + XDM_MANAGED=method=classic + + false + + -w + + /usr/bin/make + true + /home/maemo/Project/onlineServices + + + + buildconfiguration-Debug-cleanstep0 + + Debug + + ALSA_PLUGINS_DIR=/usr/lib/alsa-lib + DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-ZOdel41nVI,guid=6d7798108c63ef2016727e40000000b5 + DESKTOP_SESSION=default + DISPLAY=:0.0 + DM_CONTROL=/var/run/xdmctl + GOARCH=amd64 + GOBIN=/usr/bin + GOOS=linux + GOROOT=/usr/lib/go + GPG_AGENT_INFO=/tmp/gpg-C3HOkx/S.gpg-agent:3356:1 + GS_LIB=/home/maemo/.fonts + GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/maemo/.gtkrc-2.0:/home/maemo/.gtkrc-2.0-kde4:/home/maemo/.kdemod4/share/config/gtkrc-2.0 + GTK_RC_FILES=/etc/gtk/gtkrc:/home/maemo/.gtkrc::/home/maemo/.kdemod4/share/config/gtkrc + G_BROKEN_FILENAMES=1 + HG=/usr/bin/hg + HISTCONTROL=erasedups + HISTSIZE=1000 + HOME=/home/maemo + INPUTRC=/etc/inputrc + KDEDIRS=:/home/maemo/koffice-inst + KDE_FULL_SESSION=true + KDE_MULTIHEAD=false + KDE_SESSION_UID=1000 + KDE_SESSION_VERSION=4 + LANG=en_US.UTF-8 + LANGUAGE= + LD_LIBRARY_PATH=/usr/lib/qtcreator: + LESS=-R + LOGNAME=maemo + MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins + PATH=/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/home/maemo/koffice-inst/bin + PKG_CONFIG_PATH=/usr/lib/pkgconfig + PS3=> + PS4=+ + PWD=/home/maemo/Documents + QTDIR=/usr/share/qt + QT_PLUGIN_PATH=/home/maemo/.kdemod4/lib/kde4/plugins/:/usr/lib/kde4/plugins/ + SESSION_MANAGER=local/arch:@/tmp/.ICE-unix/3454,unix/arch:/tmp/.ICE-unix/3454 + SHELL=/bin/bash + SHLVL=1 + SSH_AGENT_PID=3359 + SSH_AUTH_SOCK=/tmp/ssh-ntNFdL3358/agent.3358 + USER=maemo + WINDOWPATH=7 + XCURSOR_THEME=Oxygen_Black + XDG_CACHE_HOME=/home/maemo/.cache + XDG_CONFIG_DIRS=/etc/xdg + XDG_CONFIG_HOME=/home/maemo/.config + XDG_DATA_DIRS=/usr/share:/usr/local/share + XDG_DATA_HOME=/home/maemo/.local/share + XDG_SESSION_COOKIE=34c09630a6ae9ad92365c03300000216-1278471612.809573-1127632378 + XDM_MANAGED=method=classic + + true + + clean + -w + + /usr/bin/make + true + /home/maemo/Project/onlineServices + true + + clean + + + + + buildconfigurations + + Debug + + + + buildstep0 + + + + + + + buildstep1 + + + + + + buildsteps + + trolltech.qt4projectmanager.qmake + trolltech.qt4projectmanager.make + + + + cleanstep0 + + + true + + + + cleansteps + + trolltech.qt4projectmanager.make + + + + defaultFileEncoding + System + + + project + + + diff --git a/onlineServicesPlugin.pro b/onlineServicesPlugin.pro new file mode 100644 index 0000000..6e2e1a8 --- /dev/null +++ b/onlineServicesPlugin.pro @@ -0,0 +1,44 @@ +# ##################################################################### +# Automatically generated by qmake (2.01a) Sat Jul 10 12:41:16 2010 +# ##################################################################### +QT += network +QT += xml +TEMPLATE = lib +CONFIG += plugin +TARGET = OnlineServicesPlugin +target.path = /usr/lib/freoffice/ +INSTALLS += target +DEPENDPATH += . +INCLUDEPATH += . /usr/local/include/office /usr/include/office + +# Input +HEADERS += authenticator.h \ + googlecontenthandler.h \ + googledocument.h \ + googledocumentlist.h \ + googledocumentservice.h \ + googlelistdialog.h \ + googleuploaddialog.h \ + loginwindow.h \ + mimetypes.h \ + onlineservicesplugin.h \ + slideshare.h \ + slideshareDocument.h \ + slidesharelistdialog.h \ + slideshareuploaddialog.h +FORMS += authenticationdialog.ui \ + filelistdialog.ui \ + uploaddialog.ui +SOURCES += authenticator.cpp \ + googlecontenthandler.cpp \ + googledocument.cpp \ + googledocumentlist.cpp \ + googledocumentservice.cpp \ + googlelistdialog.cpp \ + googleuploaddialog.cpp \ + loginwindow.cpp \ + mimetypes.cpp \ + onlineservicesplugin.cpp \ + slideshare.cpp \ + slidesharelistdialog.cpp \ + slideshareuploaddialog.cpp diff --git a/onlineServicesPlugin.pro.user b/onlineServicesPlugin.pro.user new file mode 100644 index 0000000..b8bcdf5 --- /dev/null +++ b/onlineServicesPlugin.pro.user @@ -0,0 +1,287 @@ + + + + ProjectExplorer.Project.ActiveTarget + 1 + + + ProjectExplorer.Project.EditorSettings + + UTF-8 + + + + ProjectExplorer.Project.Target.0 + + Desktop + Qt4ProjectManager.Target.DesktopTarget + 0 + 0 + + + qmake + QtProjectManager.QMakeBuildStep + + + + Make + Qt4ProjectManager.MakeStep + false + + + + 2 + + Make + Qt4ProjectManager.MakeStep + true + + clean + + + + 1 + false + + Qt in PATH Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + /home/maemo/Project/onlineServices-pluginBuild + 2 + 0 + true + + + + qmake + QtProjectManager.QMakeBuildStep + + + + Make + Qt4ProjectManager.MakeStep + false + + + + 2 + + Make + Qt4ProjectManager.MakeStep + true + + clean + + + + 1 + false + + Qt in PATH Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + /home/maemo/Project/onlineServices-pluginBuild + 2 + 0 + true + + + + qmake + QtProjectManager.QMakeBuildStep + + + + Make + Qt4ProjectManager.MakeStep + false + + + + 2 + + Make + Qt4ProjectManager.MakeStep + true + + clean + + + + 1 + false + + Qt 4.7.0 Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + /home/maemo/Project/onlineServicesPlugin-build-desktop + 6 + 0 + true + + + + qmake + QtProjectManager.QMakeBuildStep + + + + Make + Qt4ProjectManager.MakeStep + false + + + + 2 + + Make + Qt4ProjectManager.MakeStep + true + + clean + + + + 1 + false + + Qt 4.7.0 Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + /home/maemo/Project/onlineServicesPlugin-build-desktop + 6 + 0 + true + + 4 + + + 2 + + false + + + false + $BUILDDIR + Custom Executable + ProjectExplorer.CustomExecutableRunConfiguration + + 1 + + + + ProjectExplorer.Project.Target.1 + + Maemo + Qt4ProjectManager.Target.MaemoDeviceTarget + 1 + 0 + + + qmake + QtProjectManager.QMakeBuildStep + + + + Make + Qt4ProjectManager.MakeStep + false + + + + + + Qt4ProjectManager.MaemoPackageCreationStep + + true + + + + 3 + + Make + Qt4ProjectManager.MakeStep + true + + clean + + + + 1 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + /home/maemo/Project/onlineServicesPlugin-build-maemo + 9 + 9 + true + + + + qmake + QtProjectManager.QMakeBuildStep + + + + Make + Qt4ProjectManager.MakeStep + false + + + + + + Qt4ProjectManager.MaemoPackageCreationStep + + true + /usr/local/bin/OnlineServicesPlugin + + + 3 + + Make + Qt4ProjectManager.MakeStep + true + + clean + + + + 1 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + /home/maemo/Project/onlineServicesPlugin-build-maemo + 9 + 9 + true + + 2 + + + 2 + + false + + + false + $BUILDDIR + Custom Executable + ProjectExplorer.CustomExecutableRunConfiguration + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 4 + + diff --git a/onlineServicesStandAlone b/onlineServicesStandAlone new file mode 100755 index 0000000..c0bf80a Binary files /dev/null and b/onlineServicesStandAlone differ diff --git a/onlineServicesStandAlone.pro b/onlineServicesStandAlone.pro new file mode 100644 index 0000000..d234dc8 --- /dev/null +++ b/onlineServicesStandAlone.pro @@ -0,0 +1,38 @@ +# ##################################################################### +# Automatically generated by qmake (2.01a) Wed Jul 7 10:30:16 2010 +# ##################################################################### +TEMPLATE = app +TARGET = +DEPENDPATH += . +INCLUDEPATH += . +QT += network +QT += xml + +# Input +HEADERS += googlecontenthandler.h \ + googledocument.h \ + googledocumentlist.h \ + googledocumentservice.h \ + loginwindow.h \ # onlineservicesplugin.h \ + slideshare.h \ + slidesharelistdialog.h \ + slideshareuploaddialog.h \ + slideshareDocument.h \ + mimetypes.h \ + googlelistdialog.h \ + googleuploaddialog.h +FORMS += authenticationdialog.ui \ + filelistdialog.ui \ + uploaddialog.ui +SOURCES += googlecontenthandler.cpp \ + googledocument.cpp \ + googledocumentlist.cpp \ + googledocumentservice.cpp \ + loginwindow.cpp \ + main.cpp \ # onlineservicesplugin.cpp \ + slideshare.cpp \ + slidesharelistdialog.cpp \ + slideshareuploaddialog.cpp \ + googlelistdialog.cpp \ + mimetypes.cpp \ + googleuploaddialog.cpp diff --git a/onlineServicesStandAlone.pro.save b/onlineServicesStandAlone.pro.save new file mode 100644 index 0000000..44393d6 --- /dev/null +++ b/onlineServicesStandAlone.pro.save @@ -0,0 +1,38 @@ +# ##################################################################### +# Automatically generated by qmake (2.01a) Wed Jul 7 10:30:16 2010 +# ##################################################################### +TEMPLATE = app +TARGET = OnlineServices +DEPENDPATH += . +INCLUDEPATH += . +QT += network +QT += xml + +# Input +HEADERS += googlecontenthandler.h \ + googledocument.h \ + googledocumentlist.h \ + googledocumentservice.h \ + loginwindow.h \ # onlineservicesplugin.h \ + slideshare.h \ + slidesharelistdialog.h \ + slideshareuploaddialog.h \ + slideshareDocument.h \ + mimetypes.h \ + googlelistdialog.h \ + googleuploaddialog.h +FORMS += authenticationdialog.ui \ + filelistdialog.ui \ + uploaddialog.ui +SOURCES += googlecontenthandler.cpp \ + googledocument.cpp \ + googledocumentlist.cpp \ + googledocumentservice.cpp \ + loginwindow.cpp \ + main.cpp \ # onlineservicesplugin.cpp \ + slideshare.cpp \ + slidesharelistdialog.cpp \ + slideshareuploaddialog.cpp \ + googlelistdialog.cpp \ + mimetypes.cpp \ + googleuploaddialog.cpp diff --git a/onlineServicesStandAlone.pro.user b/onlineServicesStandAlone.pro.user new file mode 100644 index 0000000..1984fa1 --- /dev/null +++ b/onlineServicesStandAlone.pro.user @@ -0,0 +1,314 @@ + + + + RunConfiguration0-BaseEnvironmentBase + 2 + + + RunConfiguration0-CommandLineArguments + + + + RunConfiguration0-ProFile + onlineServicesStandAlone.pro + + + RunConfiguration0-RunConfiguration.name + onlineServicesStandAlone + + + RunConfiguration0-UseDyldImageSuffix + false + + + RunConfiguration0-UseTerminal + false + + + RunConfiguration0-UserEnvironmentChanges + + + + RunConfiguration0-UserSetName + false + + + RunConfiguration0-UserSetWorkingDirectory + false + + + RunConfiguration0-UserWorkingDirectory + + + + RunConfiguration0-type + Qt4ProjectManager.Qt4RunConfiguration + + + activeRunConfiguration + 0 + + + activebuildconfiguration + Release + + + buildConfiguration-Release + + Release + 2 + 0 + + 0 + + + + buildconfiguration-Release-buildstep0 + + Release + + ALSA_PLUGINS_DIR=/usr/lib/alsa-lib + DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-FfenDiZGv7,guid=72dbc6d7283e26da69f7ce3500001f25 + DESKTOP_SESSION=kde + DISPLAY=:0.0 + DM_CONTROL=/var/run/xdmctl + GOARCH=amd64 + GOBIN=/usr/bin + GOOS=linux + GOROOT=/usr/lib/go + GPG_AGENT_INFO=/tmp/gpg-59sFX6/S.gpg-agent:31687:1 + GS_LIB=/home/maemo/.fonts + GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/maemo/.gtkrc-2.0:/home/maemo/.gtkrc-2.0-kde4:/home/maemo/.kde4/share/config/gtkrc-2.0 + GTK_RC_FILES=/etc/gtk/gtkrc:/home/maemo/.gtkrc::/home/maemo/.kde4/share/config/gtkrc + G_BROKEN_FILENAMES=1 + HG=/usr/bin/hg + HISTCONTROL=erasedups + HISTSIZE=1000 + HOME=/home/maemo + INPUTRC=/etc/inputrc + KDEDIRS=:/home/maemo/koffice-inst + KDE_FULL_SESSION=true + KDE_MULTIHEAD=false + KDE_SESSION_UID=1000 + KDE_SESSION_VERSION=4 + LANG=en_US.UTF-8 + LANGUAGE= + LD_LIBRARY_PATH=/usr/lib/qtcreator: + LESS=-R + LOGNAME=maemo + MALLOC_CHECK_=3 + MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins + PATH=/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/home/maemo/koffice-inst/bin + PKG_CONFIG_PATH=/usr/lib/pkgconfig + PS3=> + PS4=+ + PWD=/home/maemo/Documents + QTDIR=/usr/share/qt + QT_PLUGIN_PATH=/home/maemo/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/ + SESSION_MANAGER=local/arch:@/tmp/.ICE-unix/31736,unix/arch:/tmp/.ICE-unix/31736 + SHELL=/bin/bash + SHLVL=1 + SSH_AGENT_PID=31690 + SSH_AUTH_SOCK=/tmp/ssh-fzmdW31689/agent.31689 + USER=maemo + WINDOWPATH=7 + XCURSOR_THEME=Oxygen_Black + XDG_CACHE_HOME=/home/maemo/.cache + XDG_CONFIG_DIRS=/etc/xdg + XDG_CONFIG_HOME=/home/maemo/.config + XDG_DATA_DIRS=/usr/share:/usr/local/share + XDG_DATA_HOME=/home/maemo/.local/share + XDG_SESSION_COOKIE=34c09630a6ae9ad92365c03300000216-1279084273.67966-555969312 + XDM_MANAGED=method=classic + + + /home/maemo/Project/onlineServices/onlineServicesStandAlone.pro + -spec + linux-g++-64 + -r + + /usr/bin/qmake + false + /home/maemo/Project/onlineServices + + + + buildconfiguration-Release-buildstep1 + + Release + + ALSA_PLUGINS_DIR=/usr/lib/alsa-lib + DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-FfenDiZGv7,guid=72dbc6d7283e26da69f7ce3500001f25 + DESKTOP_SESSION=kde + DISPLAY=:0.0 + DM_CONTROL=/var/run/xdmctl + GOARCH=amd64 + GOBIN=/usr/bin + GOOS=linux + GOROOT=/usr/lib/go + GPG_AGENT_INFO=/tmp/gpg-59sFX6/S.gpg-agent:31687:1 + GS_LIB=/home/maemo/.fonts + GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/maemo/.gtkrc-2.0:/home/maemo/.gtkrc-2.0-kde4:/home/maemo/.kde4/share/config/gtkrc-2.0 + GTK_RC_FILES=/etc/gtk/gtkrc:/home/maemo/.gtkrc::/home/maemo/.kde4/share/config/gtkrc + G_BROKEN_FILENAMES=1 + HG=/usr/bin/hg + HISTCONTROL=erasedups + HISTSIZE=1000 + HOME=/home/maemo + INPUTRC=/etc/inputrc + KDEDIRS=:/home/maemo/koffice-inst + KDE_FULL_SESSION=true + KDE_MULTIHEAD=false + KDE_SESSION_UID=1000 + KDE_SESSION_VERSION=4 + LANG=en_US.UTF-8 + LANGUAGE= + LD_LIBRARY_PATH=/usr/lib/qtcreator: + LESS=-R + LOGNAME=maemo + MALLOC_CHECK_=3 + MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins + PATH=/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/home/maemo/koffice-inst/bin + PKG_CONFIG_PATH=/usr/lib/pkgconfig + PS3=> + PS4=+ + PWD=/home/maemo/Documents + QTDIR=/usr/share/qt + QT_PLUGIN_PATH=/home/maemo/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/ + SESSION_MANAGER=local/arch:@/tmp/.ICE-unix/31736,unix/arch:/tmp/.ICE-unix/31736 + SHELL=/bin/bash + SHLVL=1 + SSH_AGENT_PID=31690 + SSH_AUTH_SOCK=/tmp/ssh-fzmdW31689/agent.31689 + USER=maemo + WINDOWPATH=7 + XCURSOR_THEME=Oxygen_Black + XDG_CACHE_HOME=/home/maemo/.cache + XDG_CONFIG_DIRS=/etc/xdg + XDG_CONFIG_HOME=/home/maemo/.config + XDG_DATA_DIRS=/usr/share:/usr/local/share + XDG_DATA_HOME=/home/maemo/.local/share + XDG_SESSION_COOKIE=34c09630a6ae9ad92365c03300000216-1279084273.67966-555969312 + XDM_MANAGED=method=classic + + false + + -w + + /usr/bin/make + true + /home/maemo/Project/onlineServices + + + + buildconfiguration-Release-cleanstep0 + + Release + + ALSA_PLUGINS_DIR=/usr/lib/alsa-lib + DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-FUPWNjaJHQ,guid=1a8d0ffabc19c956cdc9ec2e00000037 + DESKTOP_SESSION=gnome + DISPLAY=:0.0 + DM_CONTROL=/var/run/xdmctl + GNOME_DESKTOP_SESSION_ID=this-is-deprecated + GNOME_KEYRING_CONTROL=/tmp/keyring-eRfcWA + GOARCH=amd64 + GOBIN=/usr/bin + GOOS=linux + GOROOT=/usr/lib/go + GTK_RC_FILES=/etc/gtk/gtkrc:/home/maemo/.gtkrc-1.2-gnome2 + G_BROKEN_FILENAMES=1 + HG=/usr/bin/hg + HISTCONTROL=erasedups + HISTSIZE=1000 + HOME=/home/maemo + INPUTRC=/etc/inputrc + KDEDIRS=:/home/maemo/koffice-inst + LANG=en_US.UTF-8 + LD_LIBRARY_PATH=/usr/lib/qtcreator: + LESS=-R + LOGNAME=maemo + MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins + ORBIT_SOCKETDIR=/tmp/orbit-maemo + PATH=/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/home/maemo/koffice-inst/bin + PKG_CONFIG_PATH=/usr/lib/pkgconfig + PS3=> + PS4=+ + PWD=/home/maemo + QTDIR=/usr/share/qt + SESSION_MANAGER=local/arch:@/tmp/.ICE-unix/2824,unix/arch:/tmp/.ICE-unix/2824 + SHELL=/bin/bash + SHLVL=0 + SSH_AUTH_SOCK=/tmp/keyring-eRfcWA/ssh + USER=maemo + WINDOWPATH=7 + XDG_CACHE_HOME=/home/maemo/.cache + XDG_CONFIG_DIRS=/etc/xdg + XDG_CONFIG_HOME=/home/maemo/.config + XDG_DATA_DIRS=/usr/share:/usr/local/share + XDG_DATA_HOME=/home/maemo/.local/share + XDG_SESSION_COOKIE=34c09630a6ae9ad92365c03300000216-1279076353.685608-349349716 + XDM_MANAGED=method=classic + + true + + clean + -w + + /usr/bin/make + true + /home/maemo/Project/onlineServices + true + + clean + + + + + buildconfigurations + + Release + + + + buildstep0 + + + + + + + buildstep1 + + + + + + buildsteps + + trolltech.qt4projectmanager.qmake + trolltech.qt4projectmanager.make + + + + cleanstep0 + + + true + + + + cleansteps + + trolltech.qt4projectmanager.make + + + + defaultFileEncoding + System + + + project + + + diff --git a/onlineServicesStandAlone.pro.user.1.3 b/onlineServicesStandAlone.pro.user.1.3 new file mode 100644 index 0000000..655d954 --- /dev/null +++ b/onlineServicesStandAlone.pro.user.1.3 @@ -0,0 +1,305 @@ + + + + RunConfiguration0-BaseEnvironmentBase + 2 + + + RunConfiguration0-CommandLineArguments + + + + RunConfiguration0-ProFile + onlineServicesStandAlone.pro + + + RunConfiguration0-RunConfiguration.name + onlineServicesStandAlone + + + RunConfiguration0-UseDyldImageSuffix + false + + + RunConfiguration0-UseTerminal + false + + + RunConfiguration0-UserEnvironmentChanges + + + + RunConfiguration0-UserSetName + false + + + RunConfiguration0-UserSetWorkingDirectory + false + + + RunConfiguration0-UserWorkingDirectory + + + + RunConfiguration0-type + Qt4ProjectManager.Qt4RunConfiguration + + + activeRunConfiguration + 0 + + + activebuildconfiguration + Release + + + buildConfiguration-Release + + Release + 2 + 0 + + 0 + + + + buildconfiguration-Release-buildstep0 + + Release + + ALSA_PLUGINS_DIR=/usr/lib/alsa-lib + DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-FUPWNjaJHQ,guid=1a8d0ffabc19c956cdc9ec2e00000037 + DESKTOP_SESSION=gnome + DISPLAY=:0.0 + DM_CONTROL=/var/run/xdmctl + GNOME_DESKTOP_SESSION_ID=this-is-deprecated + GNOME_KEYRING_CONTROL=/tmp/keyring-eRfcWA + GOARCH=amd64 + GOBIN=/usr/bin + GOOS=linux + GOROOT=/usr/lib/go + GTK_RC_FILES=/etc/gtk/gtkrc:/home/maemo/.gtkrc-1.2-gnome2 + G_BROKEN_FILENAMES=1 + HG=/usr/bin/hg + HISTCONTROL=erasedups + HISTSIZE=1000 + HOME=/home/maemo + INPUTRC=/etc/inputrc + KDEDIRS=:/home/maemo/koffice-inst + LANG=en_US.UTF-8 + LD_LIBRARY_PATH=/usr/lib/qtcreator: + LESS=-R + LOGNAME=maemo + MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins + ORBIT_SOCKETDIR=/tmp/orbit-maemo + PATH=/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/home/maemo/koffice-inst/bin + PKG_CONFIG_PATH=/usr/lib/pkgconfig + PS3=> + PS4=+ + PWD=/home/maemo + QTDIR=/usr/share/qt + SESSION_MANAGER=local/arch:@/tmp/.ICE-unix/2824,unix/arch:/tmp/.ICE-unix/2824 + SHELL=/bin/bash + SHLVL=0 + SSH_AUTH_SOCK=/tmp/keyring-eRfcWA/ssh + USER=maemo + WINDOWPATH=7 + XDG_CACHE_HOME=/home/maemo/.cache + XDG_CONFIG_DIRS=/etc/xdg + XDG_CONFIG_HOME=/home/maemo/.config + XDG_DATA_DIRS=/usr/share:/usr/local/share + XDG_DATA_HOME=/home/maemo/.local/share + XDG_SESSION_COOKIE=34c09630a6ae9ad92365c03300000216-1279076353.685608-349349716 + XDM_MANAGED=method=classic + + + /home/maemo/Project/onlineServices/onlineServicesStandAlone.pro + -spec + linux-g++-64 + -r + + /usr/bin/qmake + false + /home/maemo/Project/onlineServices + + + + buildconfiguration-Release-buildstep1 + + Release + + ALSA_PLUGINS_DIR=/usr/lib/alsa-lib + DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-FUPWNjaJHQ,guid=1a8d0ffabc19c956cdc9ec2e00000037 + DESKTOP_SESSION=gnome + DISPLAY=:0.0 + DM_CONTROL=/var/run/xdmctl + GNOME_DESKTOP_SESSION_ID=this-is-deprecated + GNOME_KEYRING_CONTROL=/tmp/keyring-eRfcWA + GOARCH=amd64 + GOBIN=/usr/bin + GOOS=linux + GOROOT=/usr/lib/go + GTK_RC_FILES=/etc/gtk/gtkrc:/home/maemo/.gtkrc-1.2-gnome2 + G_BROKEN_FILENAMES=1 + HG=/usr/bin/hg + HISTCONTROL=erasedups + HISTSIZE=1000 + HOME=/home/maemo + INPUTRC=/etc/inputrc + KDEDIRS=:/home/maemo/koffice-inst + LANG=en_US.UTF-8 + LD_LIBRARY_PATH=/usr/lib/qtcreator: + LESS=-R + LOGNAME=maemo + MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins + ORBIT_SOCKETDIR=/tmp/orbit-maemo + PATH=/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/home/maemo/koffice-inst/bin + PKG_CONFIG_PATH=/usr/lib/pkgconfig + PS3=> + PS4=+ + PWD=/home/maemo + QTDIR=/usr/share/qt + SESSION_MANAGER=local/arch:@/tmp/.ICE-unix/2824,unix/arch:/tmp/.ICE-unix/2824 + SHELL=/bin/bash + SHLVL=0 + SSH_AUTH_SOCK=/tmp/keyring-eRfcWA/ssh + USER=maemo + WINDOWPATH=7 + XDG_CACHE_HOME=/home/maemo/.cache + XDG_CONFIG_DIRS=/etc/xdg + XDG_CONFIG_HOME=/home/maemo/.config + XDG_DATA_DIRS=/usr/share:/usr/local/share + XDG_DATA_HOME=/home/maemo/.local/share + XDG_SESSION_COOKIE=34c09630a6ae9ad92365c03300000216-1279076353.685608-349349716 + XDM_MANAGED=method=classic + + false + + -w + + /usr/bin/make + true + /home/maemo/Project/onlineServices + + + + buildconfiguration-Release-cleanstep0 + + Release + + ALSA_PLUGINS_DIR=/usr/lib/alsa-lib + DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-LgNIjFmiKh,guid=b88c02ef2966f610aac9fee6000006b8 + DESKTOP_SESSION=kde + DISPLAY=:0.0 + DM_CONTROL=/var/run/xdmctl + GOARCH=amd64 + GOBIN=/usr/bin + GOOS=linux + GOROOT=/usr/lib/go + GPG_AGENT_INFO=/tmp/gpg-dhq5SY/S.gpg-agent:22081:1 + GS_LIB=/home/maemo/.fonts + GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/maemo/.gtkrc-2.0:/home/maemo/.gtkrc-2.0-kde4:/home/maemo/.kde4/share/config/gtkrc-2.0 + GTK_RC_FILES=/etc/gtk/gtkrc:/home/maemo/.gtkrc::/home/maemo/.kde4/share/config/gtkrc + G_BROKEN_FILENAMES=1 + HG=/usr/bin/hg + HISTCONTROL=erasedups + HISTSIZE=1000 + HOME=/home/maemo + INPUTRC=/etc/inputrc + KDEDIRS=:/home/maemo/koffice-inst + KDE_FULL_SESSION=true + KDE_MULTIHEAD=false + KDE_SESSION_UID=1000 + KDE_SESSION_VERSION=4 + LANG=en_US.UTF-8 + LANGUAGE= + LD_LIBRARY_PATH=/usr/lib/qtcreator: + LESS=-R + LOGNAME=maemo + MALLOC_CHECK_=3 + MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins + PATH=/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/home/maemo/koffice-inst/bin + PKG_CONFIG_PATH=/usr/lib/pkgconfig + PS3=> + PS4=+ + PWD=/home/maemo/Documents + QTDIR=/usr/share/qt + QT_PLUGIN_PATH=/home/maemo/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/ + SESSION_MANAGER=local/arch:@/tmp/.ICE-unix/22122,unix/arch:/tmp/.ICE-unix/22122 + SHELL=/bin/bash + SHLVL=1 + SSH_AGENT_PID=22084 + SSH_AUTH_SOCK=/tmp/ssh-VdnYT22083/agent.22083 + USER=maemo + WINDOWPATH=7 + XCURSOR_THEME=Oxygen_Black + XDG_CACHE_HOME=/home/maemo/.cache + XDG_CONFIG_DIRS=/etc/xdg + XDG_CONFIG_HOME=/home/maemo/.config + XDG_DATA_DIRS=/usr/share:/usr/local/share + XDG_DATA_HOME=/home/maemo/.local/share + XDG_SESSION_COOKIE=34c09630a6ae9ad92365c03300000216-1278905758.735187-578586685 + XDM_MANAGED=method=classic + + true + + clean + -w + + /usr/bin/make + true + /home/maemo/Project/onlineServices + true + + clean + + + + + buildconfigurations + + Release + + + + buildstep0 + + + + + + + buildstep1 + + + + + + buildsteps + + trolltech.qt4projectmanager.qmake + trolltech.qt4projectmanager.make + + + + cleanstep0 + + + true + + + + cleansteps + + trolltech.qt4projectmanager.make + + + + defaultFileEncoding + UTF-8 + + + project + + + diff --git a/onlineservicesplugin.cpp b/onlineservicesplugin.cpp new file mode 100644 index 0000000..b1d4641 --- /dev/null +++ b/onlineservicesplugin.cpp @@ -0,0 +1,38 @@ +#include "onlineservicesplugin.h" +#include "loginwindow.h" + +onlineServicesPlugin::onlineServicesPlugin() +{ + name = "Online Services"; + window = 0; +} +onlineServicesPlugin::~onlineServicesPlugin() +{ + delete window; + window = 0; +} + +void onlineServicesPlugin::setDocument(void *doc) +{ + Q_UNUSED(doc); +} + +QWidget *onlineServicesPlugin::view() +{ + window = new LoginWindow(); + return window; +} + +QString onlineServicesPlugin::pluginName() +{ + return name; +} + +QStringList onlineServicesPlugin::pluginSupportTypes() +{ + QStringList types; + types << "All"; + return types; +} + +Q_EXPORT_PLUGIN2(OnlineServicesPlugin, onlineServicesPlugin) \ No newline at end of file diff --git a/onlineservicesplugin.h b/onlineservicesplugin.h new file mode 100644 index 0000000..280a9d9 --- /dev/null +++ b/onlineservicesplugin.h @@ -0,0 +1,26 @@ +#ifndef ONLINESERVICESPLUGIN_H +#define ONLINESERVICESPLUGIN_H + +#include "OfficeInterface.h" +#include + +class LoginWindow; + +class onlineServicesPlugin: public QObject, public OfficeInterface +{ + Q_OBJECT + Q_INTERFACES(OfficeInterface) +public: + onlineServicesPlugin(); + ~onlineServicesPlugin(); + void setDocument(void *doc); + QWidget * view(); + QString pluginName(); + QStringList pluginSupportTypes(); + +private: + QString name; + LoginWindow *window; +}; + +#endif // ONLINESERVICESPLUGIN_H diff --git a/slideshare.cpp b/slideshare.cpp new file mode 100644 index 0000000..bd17d63 --- /dev/null +++ b/slideshare.cpp @@ -0,0 +1,296 @@ +/* + * Copyright (c) 2010 Kaushal M + * + * 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "slideshare.h" +#include "slideshareDocument.h" +#include "mimetypes.h" + +SlideShare::SlideShare(QObject *parent):QObject(parent) +{ + manager.setCookieJar(&this->cookieJar); + doc = new SlideShareDocument; +} + +SlideShare::SlideShare(QString *username, QString *password, QObject *parent):QObject(parent) +{ + this->username = username; + this->password = password; + SlideShare(); +} +SlideShare::SlideShare(QString *username, QString *password, QString *apiKey, QString *secretKey, QObject *parent):QObject(parent) +{ + this->apiKey = apiKey; + this->secretKey = secretKey; + SlideShare(username, password); +} + +SlideShare::~SlideShare() +{ +} + +void SlideShare::setUsername(QString *username) +{ + this->username = username; +} + +void SlideShare::setPassword(QString *password) +{ + this->password = password; +} + +void SlideShare::setApikey(QString *apiKey) +{ + this->apiKey = apiKey; +} + +void SlideShare::setsecretKey(QString *secretKey) +{ + this->secretKey = secretKey; +} + +void SlideShare::setSlideTitle(QString *title) +{ + doc->title = *title; +} + +void SlideShare::setDescription(QString *description) +{ + doc->description = *description; +} + +void SlideShare::setTags(QString *tags) +{ + doc->tags = *tags; +} + +void SlideShare::setFormat(QString *format) +{ + doc->format = *format; +} + +void SlideShare::setSourceFile(QString *filename) +{ + this->sourceFilename = filename; +} + +void SlideShare::setSaveFileName(QString *saveFileName) +{ + this->saveFileName = saveFileName; +} + + +void SlideShare::login() +{ + QUrl *login = new QUrl(QString("http://www.slideshare.net/login")); + QByteArray data; + data.append(QString("user_login=").append(username).toUtf8()); + data.append(QString("&user_password=").append(password).toUtf8()); + + QNetworkRequest request; + request.setUrl(*login); + + reply = manager.post(request, data); + connect(reply,SIGNAL(finished()), this, SLOT(afterLogin())); +} + + +void SlideShare::afterLogin() +{ + if (reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt() == 302) + { + if(QString("http://www.slideshare.net/").append(username) == reply->attribute(QNetworkRequest::RedirectionTargetAttribute).toString()) + emit loginDone(true); + } + else + emit loginDone(false); +} + +void SlideShare::download(QString *durl) +{ + QUrl *dload = new QUrl(*durl) ; + QNetworkRequest request; + request.setUrl(*dload); + + QList list = cookieJar.cookiesForUrl(QUrl("http://www.slideshare.net/")); + + foreach(QNetworkCookie c, list) + { + if(c.name() == "_cookie_id") + { + request.setHeader(QNetworkRequest::CookieHeader, QVariant::fromValue(list)); + } + } + + reply = manager.get(request); + connect(reply,SIGNAL(finished()),this,SLOT(saveFile())); + +} +void SlideShare::saveFile() +{ + if (reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt() == 302) + { + reply = manager.get(QNetworkRequest(reply->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl())); + connect(reply,SIGNAL(downloadProgress(qint64,qint64)), this, SIGNAL(downloadProgress(qint64,qint64))); + connect(reply,SIGNAL(finished()), this, SLOT(saveFile())); + return; + } + + QFile file(*saveFileName); + file.open(QFile::WriteOnly); + + file.write(reply->readAll()); + file.close(); + + + emit downloadDone(); +} + +void SlideShare::upload() +{ + QDateTime *time = new QDateTime(); + QString ts; + ts.setNum(time->toTime_t()); + + QByteArray data = this->secretKey->toAscii(); + data += ts; + + QFile *file = new QFile(*this->sourceFilename,this); + file->open(QFile::ReadOnly); + + QByteArray fileData ; + fileData = file->readAll(); + + QByteArray postData; + postData.append("--BOUNDARY\r\n"); + postData.append("Content-Disposition: form-data; name=\"slideshow_srcfile\"; filename=\""); + postData.append(file->fileName().toUtf8()); + postData.append("\"\r\n"); + postData.append("Content-Type: " + MimeTypes::getMimeType(doc->format)); + postData.append("\r\n\r\n"); + postData.append(fileData); + postData.append("\r\n--BOUNDARY\r\n"); + + + QList > params; + params.append(qMakePair(QString("api_key"),*this->apiKey)); + params.append(qMakePair(QString("ts"),ts)); + params.append(qMakePair(QString("hash"),QString(QCryptographicHash::hash(data, QCryptographicHash::Sha1).toHex()))); + params.append(qMakePair(QString("username"),*this->username)); + params.append(qMakePair(QString("password"),*this->password)); + params.append(qMakePair(QString("slideshow_title"),doc->title)); + if (doc->description != "") + params.append(qMakePair(QString("slideshow_description"), doc->description )); + if(doc->tags != "") + params.append(qMakePair(QString("slideshow_tags"), doc->tags)); + + QUrl url("http://www.slideshare.net/api/2/upload_slideshow", QUrl::TolerantMode); + url.setQueryItems(params); + QNetworkRequest request; + request.setUrl(url); + request.setHeader(QNetworkRequest::ContentTypeHeader, "multipart/form-data; boundary=BOUNDARY"); + request.setHeader(QNetworkRequest::ContentLengthHeader, postData.length()); + + + QNetworkReply *reply = manager.post(request, postData); + connect(reply, SIGNAL(uploadProgress(qint64,qint64)), this, SIGNAL(uploadProgress(qint64,qint64))); + connect(reply, SIGNAL(finished()), this, SIGNAL(uploadDone())); +} + +void SlideShare::listDocuments() +{ + QDateTime *time = new QDateTime(QDateTime::currentDateTime()); + QString ts; + ts.setNum(time->toTime_t()); + + QByteArray data = this->secretKey->toAscii(); + data += ts; + + QList > params; + params.append(qMakePair(QString("api_key"),*this->apiKey)); + params.append(qMakePair(QString("ts"),ts)); + params.append(qMakePair(QString("hash"),QString(QCryptographicHash::hash(data, QCryptographicHash::Sha1).toHex()))); + params.append(qMakePair(QString("username"),*this->username)); + params.append(qMakePair(QString("password"),*this->password)); + params.append(qMakePair(QString("username_for"),*this->username)); + + + QUrl url("http://www.slideshare.net/api/2/get_slideshows_by_user"); + url.setQueryItems(params); + + + QNetworkRequest request; + request.setUrl(url); + + reply = manager.get(request); + connect(reply,SIGNAL(finished()), this, SLOT(parseList())); +} +void SlideShare::parseList() +{ + QDomDocument doc; + QByteArray data = reply->readAll(); + doc.setContent(data); + + QDomElement root = doc.documentElement(); + QDomElement child = root.firstChildElement("Slideshow"); + + textDocList.clear(); + presentationList.clear(); + spreadsheetList.clear(); + + while(!child.isNull()) + { + SlideShareDocument *p = new SlideShareDocument; + p->title = child.firstChildElement("Title").text(); + p->url = child.firstChildElement("URL").text(); + p->format = child.firstChildElement("Format").text(); + p->slideID = child.firstChildElement("ID").text(); + p->thumbnailBig = child.firstChildElement("ThumbnailUrl").text(); + p->thumbnailSmall = child.firstChildElement("ThumbnailSmallURL").text(); + p->downloadUrl = p->url.append("/download"); + QString download = child.firstChildElement("Download").text(); + + if(download == "1") + { + if (p->format == "odt" || p->format == "doc") + this->textDocList.append(*p); + if (p->format == "odp" || p->format == "ppt") + this->presentationList.append(*p); + if (p->format == "ods" || p->format == "xls") + this->spreadsheetList.append(*p); + } + + child = child.nextSiblingElement("Slideshow"); + } + emit listDone(); +} + diff --git a/slideshare.h b/slideshare.h new file mode 100644 index 0000000..6c0b998 --- /dev/null +++ b/slideshare.h @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2010 Kaushal M + * + * 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 SLIDESHARE_H +#define SLIDESHARE_H + +#include +#include +#include +#include +#include +#include + + +struct SlideShareDocument; + +class SlideShare : public QObject +{ + Q_OBJECT + +public: + SlideShare(QObject *parent = 0); + SlideShare(QString *username, QString *password, QObject *parent = 0 ); + SlideShare(QString *username, QString *password, QString *apiKey, QString *secretKey, QObject *parent); + ~SlideShare(); + + void login(); + void upload(); + void download(QString *durl); + void listDocuments(); + void searchByTags(QString *tag); + + void setApikey(QString *apiKey); + void setsecretKey(QString *secretKey); + + void setUsername(QString *username); + void setPassword(QString *password); + + void setSlideTitle(QString *title); + void setDescription(QString *description); + void setTags(QString *tags); + void setFormat(QString *format); + + void setSourceFile(QString *filename); + void setSaveFileName(QString *saveFileName); + + QList textDocList; + QList presentationList; + QList spreadsheetList; + +private: + QString *apiKey; + QString *secretKey; + QString *username; + QString *password; + + QString *sourceFilename; + QString *saveFileName; + + SlideShareDocument *doc; + + bool loginStatus; + + QNetworkAccessManager manager; + QNetworkCookieJar cookieJar; + QNetworkReply *reply; + + void getThumbnailSmall(); + void getThumbnailBig(); + + +private slots: + void afterLogin(); + void parseList(); + void saveFile(); + +signals: + void downloadProgress(qint64 bytesSent, qint64 bytesTotal); + void uploadProgress(qint64 bytesSent, qint64 bytesTotal); + void loginDone(bool); + void uploadDone(); + void listDone(); + void downloadDone(); + +}; + +#endif // SLIDESHARE_H diff --git a/slideshare.o b/slideshare.o new file mode 100644 index 0000000..8008157 Binary files /dev/null and b/slideshare.o differ diff --git a/slideshareDocument.h b/slideshareDocument.h new file mode 100644 index 0000000..84a1839 --- /dev/null +++ b/slideshareDocument.h @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2010 Kaushal M + * + * 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 SLIDESHAREDOCUMENT_H +#define SLIDESHAREDOCUMENT_H +class QString; + +struct SlideShareDocument +{ + QString title; + QString slideID; + QString url; + QString downloadUrl; + QString format; + QString description; + QString tags; + QString thumbnailSmall; + QString thumbnailBig; +}; +#endif // SLIDESHAREDOCUMENT_H diff --git a/slidesharelistdialog.cpp b/slidesharelistdialog.cpp new file mode 100644 index 0000000..1db7c0f --- /dev/null +++ b/slidesharelistdialog.cpp @@ -0,0 +1,198 @@ +/* + * Copyright (c) 2010 Kaushal M + * + * 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 "slidesharelistdialog.h" +#include "ui_filelistdialog.h" + +#include "slideshareuploaddialog.h" +#include "slideshareDocument.h" + +#include +#include +#include +#include +#include +#include + +slideshareListDialog::slideshareListDialog(SlideShare *s, QWidget *parent): + QDialog(parent), + ui(new Ui::fileListDialog) +{ + ui->setupUi(this); + this->setWindowTitle("SlideShare"); + ui->downloadProgressBar->setVisible(false); + this->service = s; + ui->listTab->setCurrentIndex(1); + ui->listTab->removeTab(3); + connect(ui->uploadButton, SIGNAL(clicked()), this, SLOT(uploadButtonClickedSlot())); + connect(ui->downloadButton, SIGNAL(clicked()), this, SLOT(downloadButtonClickedSlot())); + connect(ui->refreshButton, SIGNAL(clicked()), this, SLOT(refreshList())); + connect(service, SIGNAL(downloadProgress(qint64,qint64)), this, SLOT(updateProgressBar(qint64,qint64))); + connect(service, SIGNAL(downloadDone()), this, SLOT(downloadDoneSlot())); + connect(service, SIGNAL(listDone()), this, SLOT(fillList())); + + refreshList(); +} + +slideshareListDialog::~slideshareListDialog() +{ + delete ui; +} + +void slideshareListDialog::refreshList() +{ + ui->listTab->setEnabled(false); + ui->downloadButton->setEnabled(false); + ui->uploadButton->setEnabled(false); + ui->refreshButton->setEnabled(false); + service->listDocuments(); +} + +void slideshareListDialog::changeEvent(QEvent *e) +{ + QDialog::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +void slideshareListDialog::downloadButtonClickedSlot() +{ + QListWidget *tmp; + QList list; + if(0 == ui->listTab->currentIndex()) + { + tmp = ui->documentList; + list = service->textDocList; + } + if(1 == ui->listTab->currentIndex()) + { + tmp = ui->presentationList; + list = service->presentationList; + } + if(2 == ui->listTab->currentIndex()) + { + tmp = ui->spreadsheetList; + list = service->spreadsheetList; + } + + if(tmp->currentRow() == -1) + { + QMessageBox::information(this, QString("No selection"), QString("Please select a file from the list")); + return; + } + + SlideShareDocument p = list[tmp->currentRow()]; + QString durl = p.downloadUrl; + + QString saveFileName = QFileDialog::getSaveFileName(this, "Save file", QDesktopServices::storageLocation(QDesktopServices::HomeLocation).append("/").append(p.title).append(p.format), QString("(*.").append(p.format).append(")")); + qDebug() << saveFileName << endl; + if("" == saveFileName) + { + return; + } + service->setSaveFileName(new QString(saveFileName)); + + service->download(&durl); + ui->listTab->setEnabled(false); + ui->downloadButton->setEnabled(false); + ui->uploadButton->setEnabled(false); + ui->refreshButton->setEnabled(false); + ui->downloadProgressBar->setVisible(true); +} + +void slideshareListDialog::uploadButtonClickedSlot() +{ + slideshareUploadDialog *ud = new slideshareUploadDialog(service, this); + ud->show(); + connect(ud, SIGNAL(accepted()), this, SLOT(refreshList())); +} + +void slideshareListDialog::fillList() +{ + ui->documentList->clear(); + ui->presentationList->clear(); + ui->spreadsheetList->clear(); + + QList list; + QList::iterator i; + + list = service->textDocList; + for(i = list.begin(); i != list.end(); ++i) + { + SlideShareDocument j = *i; + QListWidgetItem *k = new QListWidgetItem(j.title); + ui->documentList->addItem(k); + } + + list = service->presentationList; + for(i = list.begin(); i != list.end(); ++i) + { + SlideShareDocument j = *i; + QListWidgetItem *k = new QListWidgetItem(j.title); + ui->presentationList->addItem(k); + } + + list = service->spreadsheetList; + for(i = list.begin(); i != list.end(); ++i) + { + SlideShareDocument j = *i; + QListWidgetItem *k = new QListWidgetItem(j.title); + ui->spreadsheetList->addItem(k); + } + + ui->listTab->setEnabled(true); + ui->downloadButton->setEnabled(true); + ui->uploadButton->setEnabled(true); + ui->refreshButton->setEnabled(true); +} + +void slideshareListDialog::updateProgressBar(qint64 done, qint64 total) +{ + int value = (done * 100/total); + ui->downloadProgressBar->setValue((int)value); +} + +void slideshareListDialog::downloadDoneSlot() +{ + ui->downloadProgressBar->setVisible(false); + ui->downloadProgressBar->setValue(0); + ui->listTab->setEnabled(true); + ui->downloadButton->setEnabled(true); + ui->refreshButton->setEnabled(true); + ui->uploadButton->setEnabled(true); + QMessageBox::information(this, "Download done", "The file has finished downloading"); +} + +bool slideshareListDialog::eventFilter(QObject *obj, QEvent *event) +{ + if(event->type() == QEvent::ContextMenu) + { + QMouseEvent *mouseEvent = static_cast (event); + QMenu *menu = new QMenu(this); + menu->addAction(new QAction("CLICK", this)); + menu->exec(mouseEvent->globalPos()); + return false; + } + return true; +} + diff --git a/slidesharelistdialog.h b/slidesharelistdialog.h new file mode 100644 index 0000000..3bc147e --- /dev/null +++ b/slidesharelistdialog.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2010 Kaushal M + * + * 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 SLIDESHARELISTDIALOG_H +#define SLIDESHARELISTDIALOG_H + +#include +#include "slideshare.h" + +namespace Ui { + class fileListDialog; +} + +class slideshareListDialog : public QDialog +{ + Q_OBJECT +public: + slideshareListDialog(SlideShare *s, QWidget *parent = 0); + ~slideshareListDialog(); + +protected: + void changeEvent(QEvent *e); + +private slots: + void downloadButtonClickedSlot(); + void uploadButtonClickedSlot(); + void fillList(); + void downloadDoneSlot(); + void updateProgressBar(qint64, qint64); + void refreshList(); + +private: + Ui::fileListDialog *ui; + SlideShare *service; + bool eventFilter(QObject *, QEvent *); + +}; + +#endif // FILELISTDIALOG_H diff --git a/slidesharelistdialog.o b/slidesharelistdialog.o new file mode 100644 index 0000000..b01c58c Binary files /dev/null and b/slidesharelistdialog.o differ diff --git a/slideshareuploaddialog.cpp b/slideshareuploaddialog.cpp new file mode 100644 index 0000000..898041c --- /dev/null +++ b/slideshareuploaddialog.cpp @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2010 Kaushal M + * + * 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 "slideshareuploaddialog.h" +#include "ui_uploaddialog.h" + +#include "slideshare.h" + +#include +#include + +slideshareUploadDialog::slideshareUploadDialog(SlideShare *service, QWidget *parent) : + QDialog(parent), + ui(new Ui::uploadDialog) +{ + this->service = service; + ui->setupUi(this); + connect(service, SIGNAL(uploadProgress(qint64,qint64)), this, SLOT(uploadProgressSlot(qint64,qint64))); + connect(ui->fileSelectButton, SIGNAL(clicked()), this, SLOT(showFileDialog())); + connect(ui->uploadButton, SIGNAL(clicked()), this, SLOT(uploadButtonClickedSlot())); + connect(service, SIGNAL(uploadDone()), this, SLOT(uploadDoneSlot())); +} + +slideshareUploadDialog::~slideshareUploadDialog() +{ + delete ui; +} + +void slideshareUploadDialog::changeEvent(QEvent *e) +{ + QDialog::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + + +void slideshareUploadDialog::uploadProgressSlot(qint64 sent, qint64 total) +{ + qint64 value = (sent * 100 / total) ; + ui->uploadProgress->setValue(value); +} + +void slideshareUploadDialog::showFileDialog() +{ + QString filter = "Supported Files (odt doc odp ppt ods xls)(*.odt *.doc *.odp *.ppt *.ods *.xls);; Documents (odt doc)(*.odt *.doc);; Presentations (odp ppt)(*.odp *.ppt) ;; Spreadsheets(ods xls)(*.ods *.xls)"; + QString filename = QFileDialog::getOpenFileName(this,QString("Select File"),tr(""),filter); + ui->fileSelectEdit->setText(filename); +} + +void slideshareUploadDialog::uploadButtonClickedSlot() +{ + if(ui->fileSelectEdit->text() == "" || ui->titleEdit->text() == "") + { + QMessageBox::information(this,"Incomplete parameters","Please enter atleast filename and title"); + return; + } + else + { + ui->fileSelectButton->setEnabled(false); + ui->titleEdit->setEnabled(false); + ui->descriptionBox->setEnabled(false); + ui->tagsEdit->setEnabled(false); + ui->uploadButton->setEnabled(false); + ui->uploadLabel->setText(tr("Uploading file...")); + service->setSourceFile(&ui->fileSelectEdit->text()); + service->setSlideTitle(&ui->titleEdit->text()); + service->setDescription(&ui->descriptionBox->toPlainText()); + service->setTags(&ui->tagsEdit->text()); + service->setFormat(new QString(QFileInfo(ui->fileSelectEdit->text()).suffix())); + service->upload(); + } +} + +void slideshareUploadDialog::uploadDoneSlot() +{ + ui->uploadLabel->setText(tr("Upload done")); + ui->doneButton->setEnabled(true); +} diff --git a/slideshareuploaddialog.h b/slideshareuploaddialog.h new file mode 100644 index 0000000..e04b12f --- /dev/null +++ b/slideshareuploaddialog.h @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2010 Kaushal M + * + * 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 SLIDESHAREUPLOADDIALOG_H +#define SLIDESHAREUPLOADDIALOG_H + +#include + +class SlideShare; +namespace Ui { + class uploadDialog; +} + +class slideshareUploadDialog : public QDialog { + Q_OBJECT +public: + slideshareUploadDialog(SlideShare *service,QWidget *parent = 0); + ~slideshareUploadDialog(); + +protected: + void changeEvent(QEvent *e); + +private: + Ui::uploadDialog *ui; + SlideShare *service; + +private slots: + void uploadProgressSlot(qint64 bytesSent, qint64 bytesTotal); + void showFileDialog(); + void uploadButtonClickedSlot(); + void uploadDoneSlot(); +}; + +#endif // UPLOADDIALOG_H diff --git a/slideshareuploaddialog.o b/slideshareuploaddialog.o new file mode 100644 index 0000000..c14ed2b Binary files /dev/null and b/slideshareuploaddialog.o differ diff --git a/ui_authenticationdialog.h b/ui_authenticationdialog.h new file mode 100644 index 0000000..01f5f50 --- /dev/null +++ b/ui_authenticationdialog.h @@ -0,0 +1,123 @@ +/******************************************************************************** +** Form generated from reading UI file 'authenticationdialog.ui' +** +** Created: Wed Jul 14 11:23:20 2010 +** by: Qt User Interface Compiler version 4.6.3 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef UI_AUTHENTICATIONDIALOG_H +#define UI_AUTHENTICATIONDIALOG_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Ui_Dialog +{ +public: + QVBoxLayout *verticalLayout; + QLabel *label; + QGridLayout *gridLayout; + QLabel *label_4; + QComboBox *comboBox; + QLabel *label_2; + QLineEdit *userEdit; + QLabel *label_3; + QLineEdit *passwordEdit; + QPushButton *loginButton; + + void setupUi(QDialog *Dialog) + { + if (Dialog->objectName().isEmpty()) + Dialog->setObjectName(QString::fromUtf8("Dialog")); + Dialog->resize(449, 135); + verticalLayout = new QVBoxLayout(Dialog); + verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + label = new QLabel(Dialog); + label->setObjectName(QString::fromUtf8("label")); + label->setWordWrap(false); + + verticalLayout->addWidget(label); + + gridLayout = new QGridLayout(); + gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + label_4 = new QLabel(Dialog); + label_4->setObjectName(QString::fromUtf8("label_4")); + + gridLayout->addWidget(label_4, 0, 0, 1, 1); + + comboBox = new QComboBox(Dialog); + comboBox->setObjectName(QString::fromUtf8("comboBox")); + + gridLayout->addWidget(comboBox, 0, 1, 1, 1); + + label_2 = new QLabel(Dialog); + label_2->setObjectName(QString::fromUtf8("label_2")); + + gridLayout->addWidget(label_2, 1, 0, 1, 1); + + userEdit = new QLineEdit(Dialog); + userEdit->setObjectName(QString::fromUtf8("userEdit")); + + gridLayout->addWidget(userEdit, 1, 1, 1, 1); + + label_3 = new QLabel(Dialog); + label_3->setObjectName(QString::fromUtf8("label_3")); + + gridLayout->addWidget(label_3, 2, 0, 1, 1); + + passwordEdit = new QLineEdit(Dialog); + passwordEdit->setObjectName(QString::fromUtf8("passwordEdit")); + passwordEdit->setEchoMode(QLineEdit::Password); + + gridLayout->addWidget(passwordEdit, 2, 1, 1, 1); + + + verticalLayout->addLayout(gridLayout); + + loginButton = new QPushButton(Dialog); + loginButton->setObjectName(QString::fromUtf8("loginButton")); + + verticalLayout->addWidget(loginButton); + + + retranslateUi(Dialog); + + QMetaObject::connectSlotsByName(Dialog); + } // setupUi + + void retranslateUi(QDialog *Dialog) + { + Dialog->setWindowTitle(QApplication::translate("Dialog", "Account Signin", 0, QApplication::UnicodeUTF8)); + label->setText(QApplication::translate("Dialog", "You need to supply Username and Password to access documents", 0, QApplication::UnicodeUTF8)); + label_4->setText(QApplication::translate("Dialog", "Site:", 0, QApplication::UnicodeUTF8)); + label_2->setText(QApplication::translate("Dialog", "Username:", 0, QApplication::UnicodeUTF8)); + userEdit->setText(QApplication::translate("Dialog", "@gmail.com", 0, QApplication::UnicodeUTF8)); + label_3->setText(QApplication::translate("Dialog", "Password:", 0, QApplication::UnicodeUTF8)); + passwordEdit->setInputMask(QString()); + passwordEdit->setText(QString()); + loginButton->setText(QApplication::translate("Dialog", "Sign In", 0, QApplication::UnicodeUTF8)); + } // retranslateUi + +}; + +namespace Ui { + class Dialog: public Ui_Dialog {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_AUTHENTICATIONDIALOG_H diff --git a/ui_documentlist.h b/ui_documentlist.h new file mode 100644 index 0000000..3c879f2 --- /dev/null +++ b/ui_documentlist.h @@ -0,0 +1,75 @@ +/******************************************************************************** +** Form generated from reading UI file 'documentlist.ui' +** +** Created: Thu Jul 8 16:56:09 2010 +** by: Qt User Interface Compiler version 4.6.3 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef UI_DOCUMENTLIST_H +#define UI_DOCUMENTLIST_H + +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Ui_ListDialog +{ +public: + QListWidget *listWidget; + QPushButton *okButton; + + void setupUi(QDialog *ListDialog) + { + if (ListDialog->objectName().isEmpty()) + ListDialog->setObjectName(QString::fromUtf8("ListDialog")); + ListDialog->resize(765, 311); + QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + sizePolicy.setHorizontalStretch(0); + sizePolicy.setVerticalStretch(0); + sizePolicy.setHeightForWidth(ListDialog->sizePolicy().hasHeightForWidth()); + ListDialog->setSizePolicy(sizePolicy); + listWidget = new QListWidget(ListDialog); + listWidget->setObjectName(QString::fromUtf8("listWidget")); + listWidget->setGeometry(QRect(-2, 4, 771, 261)); + QSizePolicy sizePolicy1(QSizePolicy::Fixed, QSizePolicy::Fixed); + sizePolicy1.setHorizontalStretch(0); + sizePolicy1.setVerticalStretch(0); + sizePolicy1.setHeightForWidth(listWidget->sizePolicy().hasHeightForWidth()); + listWidget->setSizePolicy(sizePolicy1); + listWidget->setLayoutMode(QListView::Batched); + okButton = new QPushButton(ListDialog); + okButton->setObjectName(QString::fromUtf8("okButton")); + okButton->setGeometry(QRect(610, 270, 81, 41)); + sizePolicy1.setHeightForWidth(okButton->sizePolicy().hasHeightForWidth()); + okButton->setSizePolicy(sizePolicy1); + okButton->setLayoutDirection(Qt::RightToLeft); + + retranslateUi(ListDialog); + + QMetaObject::connectSlotsByName(ListDialog); + } // setupUi + + void retranslateUi(QDialog *ListDialog) + { + ListDialog->setWindowTitle(QApplication::translate("ListDialog", "Google Document List", 0, QApplication::UnicodeUTF8)); + okButton->setText(QApplication::translate("ListDialog", "Ok", 0, QApplication::UnicodeUTF8)); + } // retranslateUi + +}; + +namespace Ui { + class ListDialog: public Ui_ListDialog {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_DOCUMENTLIST_H diff --git a/ui_filelistdialog.h b/ui_filelistdialog.h new file mode 100644 index 0000000..311ef0f --- /dev/null +++ b/ui_filelistdialog.h @@ -0,0 +1,161 @@ +/******************************************************************************** +** Form generated from reading UI file 'filelistdialog.ui' +** +** Created: Wed Jul 14 11:23:20 2010 +** by: Qt User Interface Compiler version 4.6.3 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef UI_FILELISTDIALOG_H +#define UI_FILELISTDIALOG_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Ui_fileListDialog +{ +public: + QVBoxLayout *verticalLayout_4; + QTabWidget *listTab; + QWidget *documentTab; + QVBoxLayout *verticalLayout; + QListWidget *documentList; + QWidget *presentationTab; + QVBoxLayout *verticalLayout_2; + QListWidget *presentationList; + QWidget *spreadsheetTab; + QVBoxLayout *verticalLayout_3; + QListWidget *spreadsheetList; + QWidget *othersTab; + QVBoxLayout *verticalLayout_5; + QListWidget *othersList; + QProgressBar *downloadProgressBar; + QHBoxLayout *horizontalLayout; + QPushButton *uploadButton; + QPushButton *refreshButton; + QPushButton *downloadButton; + + void setupUi(QDialog *fileListDialog) + { + if (fileListDialog->objectName().isEmpty()) + fileListDialog->setObjectName(QString::fromUtf8("fileListDialog")); + fileListDialog->resize(640, 480); + verticalLayout_4 = new QVBoxLayout(fileListDialog); + verticalLayout_4->setObjectName(QString::fromUtf8("verticalLayout_4")); + listTab = new QTabWidget(fileListDialog); + listTab->setObjectName(QString::fromUtf8("listTab")); + listTab->setTabShape(QTabWidget::Rounded); + documentTab = new QWidget(); + documentTab->setObjectName(QString::fromUtf8("documentTab")); + verticalLayout = new QVBoxLayout(documentTab); + verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + documentList = new QListWidget(documentTab); + documentList->setObjectName(QString::fromUtf8("documentList")); + + verticalLayout->addWidget(documentList); + + listTab->addTab(documentTab, QString()); + presentationTab = new QWidget(); + presentationTab->setObjectName(QString::fromUtf8("presentationTab")); + verticalLayout_2 = new QVBoxLayout(presentationTab); + verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); + presentationList = new QListWidget(presentationTab); + presentationList->setObjectName(QString::fromUtf8("presentationList")); + + verticalLayout_2->addWidget(presentationList); + + listTab->addTab(presentationTab, QString()); + spreadsheetTab = new QWidget(); + spreadsheetTab->setObjectName(QString::fromUtf8("spreadsheetTab")); + verticalLayout_3 = new QVBoxLayout(spreadsheetTab); + verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3")); + spreadsheetList = new QListWidget(spreadsheetTab); + spreadsheetList->setObjectName(QString::fromUtf8("spreadsheetList")); + + verticalLayout_3->addWidget(spreadsheetList); + + listTab->addTab(spreadsheetTab, QString()); + othersTab = new QWidget(); + othersTab->setObjectName(QString::fromUtf8("othersTab")); + verticalLayout_5 = new QVBoxLayout(othersTab); + verticalLayout_5->setObjectName(QString::fromUtf8("verticalLayout_5")); + othersList = new QListWidget(othersTab); + othersList->setObjectName(QString::fromUtf8("othersList")); + + verticalLayout_5->addWidget(othersList); + + listTab->addTab(othersTab, QString()); + + verticalLayout_4->addWidget(listTab); + + downloadProgressBar = new QProgressBar(fileListDialog); + downloadProgressBar->setObjectName(QString::fromUtf8("downloadProgressBar")); + downloadProgressBar->setValue(0); + downloadProgressBar->setTextVisible(false); + + verticalLayout_4->addWidget(downloadProgressBar); + + horizontalLayout = new QHBoxLayout(); + horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + uploadButton = new QPushButton(fileListDialog); + uploadButton->setObjectName(QString::fromUtf8("uploadButton")); + + horizontalLayout->addWidget(uploadButton); + + refreshButton = new QPushButton(fileListDialog); + refreshButton->setObjectName(QString::fromUtf8("refreshButton")); + + horizontalLayout->addWidget(refreshButton); + + downloadButton = new QPushButton(fileListDialog); + downloadButton->setObjectName(QString::fromUtf8("downloadButton")); + + horizontalLayout->addWidget(downloadButton); + + + verticalLayout_4->addLayout(horizontalLayout); + + + retranslateUi(fileListDialog); + + listTab->setCurrentIndex(1); + + + QMetaObject::connectSlotsByName(fileListDialog); + } // setupUi + + void retranslateUi(QDialog *fileListDialog) + { + fileListDialog->setWindowTitle(QApplication::translate("fileListDialog", "FileList", 0, QApplication::UnicodeUTF8)); + listTab->setTabText(listTab->indexOf(documentTab), QApplication::translate("fileListDialog", "Documents", 0, QApplication::UnicodeUTF8)); + listTab->setTabText(listTab->indexOf(presentationTab), QApplication::translate("fileListDialog", "Presentations", 0, QApplication::UnicodeUTF8)); + listTab->setTabText(listTab->indexOf(spreadsheetTab), QApplication::translate("fileListDialog", "Spreadsheets", 0, QApplication::UnicodeUTF8)); + listTab->setTabText(listTab->indexOf(othersTab), QApplication::translate("fileListDialog", "Others", 0, QApplication::UnicodeUTF8)); + uploadButton->setText(QApplication::translate("fileListDialog", "&Upload", 0, QApplication::UnicodeUTF8)); + refreshButton->setText(QApplication::translate("fileListDialog", "&Refresh List", 0, QApplication::UnicodeUTF8)); + downloadButton->setText(QApplication::translate("fileListDialog", "&Download", 0, QApplication::UnicodeUTF8)); + } // retranslateUi + +}; + +namespace Ui { + class fileListDialog: public Ui_fileListDialog {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_FILELISTDIALOG_H diff --git a/ui_uploaddialog.h b/ui_uploaddialog.h new file mode 100644 index 0000000..9c5ad6a --- /dev/null +++ b/ui_uploaddialog.h @@ -0,0 +1,191 @@ +/******************************************************************************** +** Form generated from reading UI file 'uploaddialog.ui' +** +** Created: Wed Jul 14 11:40:10 2010 +** by: Qt User Interface Compiler version 4.6.3 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef UI_UPLOADDIALOG_H +#define UI_UPLOADDIALOG_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Ui_uploadDialog +{ +public: + QVBoxLayout *verticalLayout; + QFormLayout *formLayout; + QLabel *label; + QHBoxLayout *horizontalLayout_2; + QLineEdit *fileSelectEdit; + QPushButton *fileSelectButton; + QLabel *label_2; + QLineEdit *titleEdit; + QPlainTextEdit *descriptionBox; + QLabel *label_3; + QLineEdit *tagsEdit; + QLabel *label_4; + QHBoxLayout *horizontalLayout_3; + QSpacerItem *horizontalSpacer; + QLabel *uploadLabel; + QSpacerItem *horizontalSpacer_2; + QHBoxLayout *horizontalLayout; + QPushButton *uploadButton; + QProgressBar *uploadProgress; + QPushButton *doneButton; + + void setupUi(QDialog *uploadDialog) + { + if (uploadDialog->objectName().isEmpty()) + uploadDialog->setObjectName(QString::fromUtf8("uploadDialog")); + uploadDialog->resize(640, 227); + verticalLayout = new QVBoxLayout(uploadDialog); + verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + formLayout = new QFormLayout(); + formLayout->setObjectName(QString::fromUtf8("formLayout")); + formLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow); + label = new QLabel(uploadDialog); + label->setObjectName(QString::fromUtf8("label")); + + formLayout->setWidget(0, QFormLayout::LabelRole, label); + + horizontalLayout_2 = new QHBoxLayout(); + horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + fileSelectEdit = new QLineEdit(uploadDialog); + fileSelectEdit->setObjectName(QString::fromUtf8("fileSelectEdit")); + fileSelectEdit->setEnabled(true); + fileSelectEdit->setReadOnly(true); + + horizontalLayout_2->addWidget(fileSelectEdit); + + fileSelectButton = new QPushButton(uploadDialog); + fileSelectButton->setObjectName(QString::fromUtf8("fileSelectButton")); + + horizontalLayout_2->addWidget(fileSelectButton); + + + formLayout->setLayout(0, QFormLayout::FieldRole, horizontalLayout_2); + + label_2 = new QLabel(uploadDialog); + label_2->setObjectName(QString::fromUtf8("label_2")); + + formLayout->setWidget(1, QFormLayout::LabelRole, label_2); + + titleEdit = new QLineEdit(uploadDialog); + titleEdit->setObjectName(QString::fromUtf8("titleEdit")); + + formLayout->setWidget(1, QFormLayout::FieldRole, titleEdit); + + descriptionBox = new QPlainTextEdit(uploadDialog); + descriptionBox->setObjectName(QString::fromUtf8("descriptionBox")); + + formLayout->setWidget(2, QFormLayout::FieldRole, descriptionBox); + + label_3 = new QLabel(uploadDialog); + label_3->setObjectName(QString::fromUtf8("label_3")); + + formLayout->setWidget(2, QFormLayout::LabelRole, label_3); + + tagsEdit = new QLineEdit(uploadDialog); + tagsEdit->setObjectName(QString::fromUtf8("tagsEdit")); + + formLayout->setWidget(3, QFormLayout::FieldRole, tagsEdit); + + label_4 = new QLabel(uploadDialog); + label_4->setObjectName(QString::fromUtf8("label_4")); + + formLayout->setWidget(3, QFormLayout::LabelRole, label_4); + + + verticalLayout->addLayout(formLayout); + + horizontalLayout_3 = new QHBoxLayout(); + horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3")); + horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + horizontalLayout_3->addItem(horizontalSpacer); + + uploadLabel = new QLabel(uploadDialog); + uploadLabel->setObjectName(QString::fromUtf8("uploadLabel")); + + horizontalLayout_3->addWidget(uploadLabel); + + horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + horizontalLayout_3->addItem(horizontalSpacer_2); + + + verticalLayout->addLayout(horizontalLayout_3); + + horizontalLayout = new QHBoxLayout(); + horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + uploadButton = new QPushButton(uploadDialog); + uploadButton->setObjectName(QString::fromUtf8("uploadButton")); + uploadButton->setEnabled(true); + + horizontalLayout->addWidget(uploadButton); + + uploadProgress = new QProgressBar(uploadDialog); + uploadProgress->setObjectName(QString::fromUtf8("uploadProgress")); + uploadProgress->setValue(0); + uploadProgress->setTextVisible(false); + uploadProgress->setInvertedAppearance(false); + + horizontalLayout->addWidget(uploadProgress); + + doneButton = new QPushButton(uploadDialog); + doneButton->setObjectName(QString::fromUtf8("doneButton")); + doneButton->setEnabled(false); + + horizontalLayout->addWidget(doneButton); + + + verticalLayout->addLayout(horizontalLayout); + + + retranslateUi(uploadDialog); + QObject::connect(doneButton, SIGNAL(clicked()), uploadDialog, SLOT(accept())); + + QMetaObject::connectSlotsByName(uploadDialog); + } // setupUi + + void retranslateUi(QDialog *uploadDialog) + { + uploadDialog->setWindowTitle(QApplication::translate("uploadDialog", "Upload", 0, QApplication::UnicodeUTF8)); + label->setText(QApplication::translate("uploadDialog", "Select a file", 0, QApplication::UnicodeUTF8)); + fileSelectButton->setText(QApplication::translate("uploadDialog", "Select", 0, QApplication::UnicodeUTF8)); + label_2->setText(QApplication::translate("uploadDialog", "Title", 0, QApplication::UnicodeUTF8)); + label_3->setText(QApplication::translate("uploadDialog", "Description", 0, QApplication::UnicodeUTF8)); + label_4->setText(QApplication::translate("uploadDialog", "Tags", 0, QApplication::UnicodeUTF8)); + uploadLabel->setText(QString()); + uploadButton->setText(QApplication::translate("uploadDialog", "Upload", 0, QApplication::UnicodeUTF8)); + doneButton->setText(QApplication::translate("uploadDialog", "Done", 0, QApplication::UnicodeUTF8)); + } // retranslateUi + +}; + +namespace Ui { + class uploadDialog: public Ui_uploadDialog {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_UPLOADDIALOG_H diff --git a/uploaddialog.o b/uploaddialog.o new file mode 100644 index 0000000..709180b Binary files /dev/null and b/uploaddialog.o differ diff --git a/uploaddialog.ui b/uploaddialog.ui new file mode 100644 index 0000000..d2c100f --- /dev/null +++ b/uploaddialog.ui @@ -0,0 +1,177 @@ + + + uploadDialog + + + + 0 + 0 + 640 + 227 + + + + Upload + + + + + + QFormLayout::ExpandingFieldsGrow + + + + + Select a file + + + + + + + + + true + + + true + + + + + + + Select + + + + + + + + + Title + + + + + + + + + + + + + Description + + + + + + + + + + Tags + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + true + + + Upload + + + + + + + 0 + + + false + + + false + + + + + + + false + + + Done + + + + + + + + + + + doneButton + clicked() + uploadDialog + accept() + + + 607 + 179 + + + 591 + 107 + + + + +