void MainWindow::rotate() { VoxelFile * voxel = get_voxel(); voxel->rotate(); model_properties->update_controls(); model_changed(); }
void MainWindow::half_size() { VoxelFile * voxel = get_voxel(); voxel->scale(0.5f, 0.5f, 0.5f); model_properties->update_controls(); model_changed(); }
void MainWindow::double_size() { VoxelFile * voxel = get_voxel(); voxel->scale(2.0f, 2.0f, 2.0f); model_properties->update_controls(); model_changed(); }
static void connect_model (EReflow *reflow, EReflowModel *model) { if (reflow->model != NULL) disconnect_model (reflow); if (model == NULL) return; reflow->model = model; g_object_ref (reflow->model); reflow->model_changed_id = g_signal_connect (reflow->model, "model_changed", G_CALLBACK (model_changed), reflow); reflow->comparison_changed_id = g_signal_connect (reflow->model, "comparison_changed", G_CALLBACK (comparison_changed), reflow); reflow->model_items_inserted_id = g_signal_connect (reflow->model, "model_items_inserted", G_CALLBACK (items_inserted), reflow); reflow->model_item_removed_id = g_signal_connect (reflow->model, "model_item_removed", G_CALLBACK (item_removed), reflow); reflow->model_item_changed_id = g_signal_connect (reflow->model, "model_item_changed", G_CALLBACK (item_changed), reflow); model_changed (model, reflow); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); showFirstTime = true; youtube_view = new YoutubeView(ui->centralWidget); wait_view = new WaitView(ui->centralWidget); ui->centralWidget->setOrientation(Qt::Horizontal); ui->centralWidget->addWidget(youtube_view); ui->centralWidget->addWidget(wait_view); connect(ui->mainToolBar,SIGNAL(search_completed(const QList<Media> &)),this,SLOT(search_completed(const QList<Media> &))); connect(ui->mainToolBar,SIGNAL(play_stop_requested(ButtonPlayMode)),this,SLOT(play_stop_requested(ButtonPlayMode))); connect(ui->mainToolBar,SIGNAL(search_started()),this,SLOT(search_started())); connect(youtube_view,SIGNAL(download_request(const QUrl &,const QString &)),this,SLOT(adding_download(const QUrl &,const QString &))); connect(youtube_view,SIGNAL(download_subs_request(const Subtitle &,const QString &)),this,SLOT(adding_subs_download(const Subtitle &,const QString &))); connect(youtube_view,SIGNAL(search_requested(const QString &, const QString &, const QString &, const QString &, YoutubeOrderBy, YoutubeTime)), ui->mainToolBar,SIGNAL(search_requested(const QString &, const QString &, const QString &, const QString &, YoutubeOrderBy, YoutubeTime))); connect(youtube_view,SIGNAL(channel_videos_popup_requested(const QString &)),ui->mainToolBar,SLOT(show_search_videos_popup(const QString &))); connect(youtube_view,SIGNAL(mediaListIsEmpty()),this,SLOT(mediaListIsEmpty())); connect(youtube_view,SIGNAL(model_changed()),this,SLOT(mediaListIsEmpty())); connect(youtube_view,SIGNAL(indexSelected(const QModelIndex &)),this,SLOT(indexSelected(const QModelIndex &))); ui->mainToolBar->init(); wait_view->setVisible(false); youtube_view->setVisible(true); }
static void model_rows_deleted (ETableModel *etm, gint row, gint count, ETableSelectionModel *etsm) { model_changed (etm, etsm); }
//------------------------------------------------------------------------------ void ListModelWrapper::refresh() { if (*_tm) (*_tm)->refresh(); model_changed(bec::NodeId(), -1); }