nextcloud-desktop/src/mirall/statusdialog.h

63 lines
1.8 KiB
C
Raw Normal View History

2011-09-30 19:42:28 +04:00
/*
* Copyright (C) by Klaas Freitag <freitag@kde.org>
*
* 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.
*/
#ifndef STATUSDIALOG_H
#define STATUSDIALOG_H
#include <QDialog>
2011-10-12 18:58:54 +04:00
#include <QStyledItemDelegate>
#include <QStandardItemModel>
2011-09-26 23:46:26 +04:00
#include "ui_statusdialog.h"
#include "application.h"
2011-09-26 17:00:12 +04:00
namespace Mirall {
2011-10-12 18:58:54 +04:00
class FolderViewDelegate : public QStyledItemDelegate
{
public:
FolderViewDelegate();
virtual ~FolderViewDelegate();
2011-10-13 18:41:24 +04:00
enum datarole { FolderNameRole = Qt::UserRole + 100,
FolderPathRole = Qt::UserRole + 101,
FolderIconRole = Qt::UserRole + 102,
FolderRemotePath = Qt::UserRole + 103,
FolderStatus = Qt::UserRole + 104,
FolderErrorMsg = Qt::UserRole + 105,
FolderStatusIcon = Qt::UserRole + 106 };
2011-10-12 18:58:54 +04:00
void paint( QPainter*, const QStyleOptionViewItem&, const QModelIndex& ) const;
QSize sizeHint( const QStyleOptionViewItem&, const QModelIndex& ) const;
};
2011-09-26 23:46:26 +04:00
class StatusDialog : public QDialog, public Ui::statusDialog
{
Q_OBJECT
public:
explicit StatusDialog(QWidget *parent = 0);
2011-09-26 23:46:26 +04:00
void setFolderList( QHash<QString, Folder*> );
signals:
2011-10-13 15:55:52 +04:00
void removeFolderAlias(const QString&);
public slots:
2011-09-26 23:46:26 +04:00
void slotRemoveFolder();
2011-10-12 18:58:54 +04:00
private:
QStandardItemModel *_model;
};
2011-09-26 17:00:12 +04:00
};
2011-09-26 23:46:26 +04:00
#endif // STATUSDIALOG_H