command-line access

metadata
Wenzel Jakob 2011-08-16 18:28:06 -04:00
parent b5307c3163
commit a0e3a219d0
3 changed files with 25 additions and 2 deletions

View File

@ -85,6 +85,12 @@ MainWindow::MainWindow(QWidget *parent) :
ui->actionUpdateCheck->setMenuRole(QAction::ApplicationSpecificRole);
ui->actionFeedback->setMenuRole(QAction::ApplicationSpecificRole);
ui->actionReportBug->setMenuRole(QAction::ApplicationSpecificRole);
ui->actionEnableCommandLine->setMenuRole(QAction::ApplicationSpecificRole);
#if !defined(__OSX__)
ui->actionEnableCommandLine->setVisible(false);
#endif
m_progressWidget = new QWidget(centralWidget());
m_progressLabel = new QLabel(m_progressWidget);
m_progress = new QProgressBar(m_progressWidget);
@ -194,7 +200,7 @@ MainWindow::MainWindow(QWidget *parent) :
m_networkManager = new QNetworkAccessManager(this);
#if defined(__OSX__)
#if defined(__OSX__) && 0 // Disable crash reports for now
/* Submit crash reports on OSX */
QDir crashDir = QDir::home();
crashDir.cd("Library/Logs/CrashReporter");
@ -1517,6 +1523,16 @@ void MainWindow::on_actionStartServer_triggered() {
connect(m_serverWidget, SIGNAL(closed()), this, SLOT(onServerClosed()));
m_serverWidget->show();
}
void MainWindow::on_actionEnableCommandLine_triggered() {
if (QMessageBox::question(this, tr("Enable command line access"),
tr("<p>If you proceed, Mitsuba will create symbolic links in <tt>/usr/bin</tt> and <tt>/Library/Python/2.6/site-packages</tt> "
"that make it possible to use the renderer via the command line and Python. Any old symlinks will simply be overwritten.</p>"),
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
}
}
}
void MainWindow::on_actionReportBug_triggered() {
QDesktopServices::openUrl(QUrl("https://www.mitsuba-renderer.org/bugtracker/projects/mitsuba"));

View File

@ -127,6 +127,7 @@ private slots:
void on_actionFeedback_triggered();
void on_actionShowKDTree_triggered();
void on_actionSceneDescription_triggered();
void on_actionEnableCommandLine_triggered();
void on_tabBar_currentChanged(int index);
bool on_tabBar_tabCloseRequested(int index);
void on_tabBar_tabMoved(int from, int to);

View File

@ -100,7 +100,7 @@
<x>0</x>
<y>0</y>
<width>605</width>
<height>25</height>
<height>27</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
@ -157,6 +157,7 @@
<addaction name="separator"/>
<addaction name="menuDeveloper"/>
<addaction name="actionSettings"/>
<addaction name="actionEnableCommandLine"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuTools"/>
@ -463,6 +464,11 @@
<string>Scene Information ..</string>
</property>
</action>
<action name="actionEnableCommandLine">
<property name="text">
<string>Enable command line access</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>