controlPanel::controlPanel(V3DPluginCallback2 &_v3d, QWidget *parent) : QDialog(parent), m_v3d(_v3d) { m_pLookPanel = this; m_lframeind = 0; m_pLineEdit_fps = new QLineEdit(QObject::tr("10")); m_pLineEdit_filepath = new QLineEdit(); QPushButton *pPushButton_start = new QPushButton(QObject::tr("start")); QPushButton *pPushButton_stop = new QPushButton(QObject::tr("stop")); QPushButton *pPushButton_openFileDlg_output = new QPushButton(QObject::tr("...")); QGridLayout *pGridLayout = new QGridLayout(); pGridLayout->addWidget(new QLabel(QObject::tr("choose fps:")),1,1); pGridLayout->addWidget(m_pLineEdit_fps,1,2); pGridLayout->addWidget(new QLabel(QObject::tr("choose output dir:")),2,1); pGridLayout->addWidget(m_pLineEdit_filepath,2,2); pGridLayout->addWidget(pPushButton_openFileDlg_output,2,3); pGridLayout->addWidget(pPushButton_start,3,1); pGridLayout->addWidget(pPushButton_stop,3,2); setLayout(pGridLayout); setWindowTitle(QString("make movie")); connect(pPushButton_start, SIGNAL(clicked()), this, SLOT(_slot_start())); connect(pPushButton_stop, SIGNAL(clicked()), this, SLOT(_slot_stop())); connect(pPushButton_openFileDlg_output, SIGNAL(clicked()), this, SLOT(_slots_openFileDlg_output())); m_pTimer = new QTimer(this); connect(m_pTimer, SIGNAL(timeout()), this, SLOT(_slot_timerupdate())); }
lookPanel::lookPanel(V3DPluginCallback2 &_v3d, QWidget *parent) : QDialog(parent), m_v3d(_v3d) { win_list = m_v3d.getImageWindowList(); QStringList items; for (int i=0; i<win_list.size(); i++) items << m_v3d.getImageName(win_list[i]); combo_master = new QComboBox(); combo_master->addItems(items); combo_slave = new QComboBox(); combo_slave->addItems(items); label_master = new QLabel(QObject::tr("Master-window: ")); label_slave = new QLabel(QObject::tr("Slave-window: ")); check_rotation = new QCheckBox(); check_rotation->setText(QObject::tr("Rotation "));check_rotation->setChecked(true); check_shift = new QCheckBox(); check_shift->setText(QObject::tr("Shift"));check_shift->setChecked(true); check_zoom = new QCheckBox(); check_zoom->setText(QObject::tr("Zoom"));check_zoom->setChecked(true); QPushButton* ok = new QPushButton("Sync (one shot)"); QPushButton* cancel = new QPushButton("Close"); syncAuto = new QPushButton("Start Sync (real time)"); b_autoON = false; gridLayout = new QGridLayout(); gridLayout->addWidget(label_master, 1,0,1,6); gridLayout->addWidget(combo_master,1,1,1,6); gridLayout->addWidget(label_slave, 2,0,1,6); gridLayout->addWidget(combo_slave,2,1,1,6); gridLayout->addWidget(check_rotation, 4,0,1,1); gridLayout->addWidget(check_shift,4,1,1,1); gridLayout->addWidget(check_zoom, 4,2,1,1); gridLayout->addWidget(ok, 5,0); gridLayout->addWidget(cancel,5,6); gridLayout->addWidget(syncAuto,5,1); setLayout(gridLayout); setWindowTitle(QString("Synchronize two 3D views")); connect(ok, SIGNAL(clicked()), this, SLOT(_slot_sync_onetime())); connect(cancel, SIGNAL(clicked()), this, SLOT(reject())); connect(syncAuto, SIGNAL(clicked()), this, SLOT(_slot_syncAuto())); connect(check_rotation, SIGNAL(stateChanged(int)), this, SLOT(update())); connect(check_shift, SIGNAL(stateChanged(int)), this, SLOT(update())); connect(check_zoom, SIGNAL(stateChanged(int)), this, SLOT(update())); //should we check the window close event? // by PHC m_pTimer = new QTimer(this); connect(m_pTimer, SIGNAL(timeout()), this, SLOT(_slot_timerupdate())); win_list_past = win_list; }