return static_cast<MyListNode *>(idx.internalPointer())->id();
}
+void MyListModel::reload()
+{
+ beginResetModel();
+ delete rootItem;
+ rootItem = new MyListNode();
+ endResetModel();
+}
+
} // namespace LocalMyList
animeModel = new MyListModel(this);
ui->myListView->setModel(animeModel);
+ ui->myListView->setColumnWidth(0, 450);
}
MainWindow::~MainWindow()
{
LocalMyList::instance()->executeTask(new UnknownFileLookupTask());
}
+
+void MainWindow::on_refreshButton_clicked()
+{
+ animeModel->reload();
+}
void on_actionClearStartedMyListUpdates_triggered();
void on_actionAddFiles_triggered();
void on_actionRemoveKnownUnknownFiles_triggered();
+ void on_refreshButton_clicked();
private:
Ui::MainWindow *ui;
<rect>
<x>0</x>
<y>0</y>
- <width>400</width>
- <height>300</height>
+ <width>912</width>
+ <height>690</height>
</rect>
</property>
<property name="windowTitle">
<string>LocalMyList Management</string>
</property>
<widget class="QWidget" name="centralWidget">
- <layout class="QHBoxLayout" name="horizontalLayout">
+ <layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="MyListView" name="myListView"/>
</item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="refreshButton">
+ <property name="text">
+ <string>Refresh</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
</layout>
</widget>
<widget class="QMenuBar" name="menuBar">
<rect>
<x>0</x>
<y>0</y>
- <width>400</width>
+ <width>912</width>
<height>21</height>
</rect>
</property>