Initial stuff. It doesnt work.

This commit is contained in:
robotbrain
2014-02-23 16:14:24 -05:00
parent 5cf599673d
commit 4a77524b05
12 changed files with 744 additions and 151 deletions

View File

@ -0,0 +1,28 @@
#include "ScreenshotDialog.h"
#include "ui_ScreenshotDialog.h"
#include "QModelIndex"
ScreenshotDialog::ScreenshotDialog(ScreenshotList *list, QWidget *parent) :
QDialog(parent),
ui(new Ui::ScreenshotDialog),
m_list(list)
{
ui->setupUi(this);
ui->listView->setModel(m_list);
}
ScreenshotDialog::~ScreenshotDialog()
{
delete ui;
}
QList<ScreenShot*> ScreenshotDialog::selected()
{
QList<ScreenShot*> list;
QList<ScreenShot*> first = m_list->screenshots();
for (QModelIndex index : ui->listView->selectionModel()->selectedIndexes())
{
list.append(first.at(index.row()));
}
return list;
}