--- /dev/null
+TEMPLATE = subdirs
+
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2009 by Lassi Väätämöinen *
+ * lassi.vaatamoinen@ixonos.com *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 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., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include "DownloadView.h"
+
+DownloadView::DownloadView(QWidget* parent): QTreeWidget(parent)
+{
+ setRootIsDecorated(false); // Hide branch lines, making one-level treeview (similar to list)
+ setHeaderItem(DownloadViewItem::getHeaderItem());
+}
+
+
+DownloadView::~DownloadView()
+{
+}
+
+
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2009 by Lassi Väätämöinen *
+ * lassi.vaatamoinen@ixonos.com *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 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., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef DOWNLOADVIEW_H
+#define DOWNLOADVIEW_H
+
+#include <QTreeWidget>
+
+/**
+ @author Lassi Väätämöinen <lassi.vaatamoinen@ixonos.com>
+*/
+class DownloadView : public QTreeWidget
+{
+Q_OBJECT
+
+ public:
+ DownloadView(QWidget* parent);
+
+ ~DownloadView();
+
+ private:
+
+};
+
+
+/**
+ @class DownloadViewItem
+ @brief Represents one item row of DownloadView
+*/
+class DownloadViewItem : public QTreeWidgetItem {
+
+ public:
+
+ DownloadViewItem(QTreeWidget* parent, int type) :
+ QTreeWidgetItem(parent, type = QTreeWidgetItem::UserType)
+ {
+ };
+
+ DownloadViewItem(const QStringList& strings,
+ int type = QTreeWidgetItem::UserType ) :
+ QTreeWidgetItem (strings, type = Type)
+ {
+ };
+
+
+ /// @return An item comprising of string list, suitable for QTableView
+ /// header.
+ static DownloadViewItem *getHeaderItem()
+ {
+ DownloadViewItem *item
+ = new DownloadViewItem(QStringList() << "Name"
+ << "Size" << "Status"
+ << "Progress" << "DL speed"
+ << "UL speed" << "Seeds/Leechers"
+ << "ratio" << "ETA");
+
+ return item;
+ }
+
+ /// @todo QTorrentHandle as one hidden column
+};
+
+#endif
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2009 by Lassi Väätämöinen *
+ * lassi.vaatamoinen@ixonos.com *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 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., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include "MainWindow.h"
+
+MainWindow::MainWindow()
+{
+}
+
+
+MainWindow::~MainWindow()
+{
+}
+
+
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2009 by Lassi Väätämöinen *
+ * lassi.vaatamoinen@ixonos.com *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 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., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+
+class QTabWidget;
+
+/**
+ @author Lassi Väätämöinen <lassi.vaatamoinen@ixonos.com>
+*/
+class MainWindow : public QMainWindow {
+ Q_OBJECT
+
+ public:
+ MainWindow();
+
+ ~MainWindow();
+
+ public slots:
+ private slots:
+
+ private:
+ QTabWidget *tabWidget_;
+
+
+};
+
+#endif
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2009 by Lassi Väätämöinen *
+ * lassi.vaatamoinen@ixonos.com *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 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., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include "SeedView.h"
+
+SeedView::SeedView(QWidget* parent): QTreeWidget(parent)
+{
+}
+
+
+SeedView::~SeedView()
+{
+}
+
+
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2009 by Lassi Väätämöinen *
+ * lassi.vaatamoinen@ixonos.com *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 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., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef SEEDVIEW_H
+#define SEEDVIEW_H
+
+#include <QTreeWidget>
+
+/**
+ @author Lassi Väätämöinen <lassi.vaatamoinen@ixonos.com>
+*/
+class SeedView : public QTreeWidget
+{
+Q_OBJECT
+ public:
+ SeedView(QWidget* parent);
+
+ ~SeedView();
+
+ private:
+ // Name
+ // Size
+ // Status
+ // UP speed
+ // Seeds/Leechers
+ // Connected peers
+ // total uploaded
+ // ratio
+};
+
+#endif
--- /dev/null
+SOURCES += DownloadView.cpp \
+MainWindow.cpp \
+SeedView.cpp \
+ main.cpp
+HEADERS += DownloadView.h \
+MainWindow.h \
+SeedView.h
+TEMPLATE = app
+
+TARGET = qtrapids
+
+CONFIG -= release
+
+CONFIG += debug
+
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2009 by Lassi Väätämöinen *
+ * lassi.vaatamoinen@ixonos.com *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 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., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include <QApplication>
+#include <QDebug>
+#include "DownloadView.h"
+
+int main(int argc, char *argv[])
+{
+ // Q_INIT_RESOURCE(application);
+ QApplication app(argc, argv);
+ DownloadView* dlw = new DownloadView(NULL);
+ //qtrapids * mw = new qtrapids();
+ dlw->show();
+ DownloadViewItem* dlwItem = new DownloadViewItem(QStringList() << "Name"
+ << "Size" << "Status"
+ << "Progress" << "DL speed"
+ << "UL speed" << "Seeds/Leechers"
+ << "ratio");
+ dlwItem->insertChild(0, new DownloadViewItem(QStringList() << "Name"));
+ dlw->insertTopLevelItem(0,dlwItem);
+ qDebug() << dlw->columnCount();
+ return app.exec();
+}
--- /dev/null
+SUBDIRS += gui \
+ engine
+SOURCES += qtrapids.cpp \
+ main.cpp
+HEADERS += qtrapids.h
+CONFIG += warn_on \
+ thread \
+ qt
+TARGET = qtrapids
+DESTDIR = ../bin
+RESOURCES = application.qrc
+
+TEMPLATE = subdirs
+