mirror of https://github.com/vitalif/openscad
Merge branch 'master' of github.com:openscad/openscad
commit
22ed0780fa
|
@ -556,7 +556,3 @@ INSTALLS += icons
|
|||
man.path = $$PREFIX/share/man/man1
|
||||
man.extra = cp -f doc/openscad.1 \"\$(INSTALL_ROOT)$${man.path}/$${FULLNAME}.1\"
|
||||
INSTALLS += man
|
||||
|
||||
CONFIG(winconsole) {
|
||||
include(winconsole.pri)
|
||||
}
|
||||
|
|
|
@ -254,8 +254,8 @@ case $OS in
|
|||
echo "cant find $TARGET/openscad.exe. build failed. stopping."
|
||||
exit
|
||||
fi
|
||||
# make console pipe-able openscad.com - see winconsole.pri for info
|
||||
qmake CONFIG+=winconsole ../openscad.pro
|
||||
# make console pipe-able openscad.com - see winconsole.pro for info
|
||||
qmake ../winconsole.pro
|
||||
make
|
||||
if [ ! -e $TARGET/openscad.com ]; then
|
||||
echo "cant find $TARGET/openscad.com. build failed. stopping."
|
||||
|
|
|
@ -71,6 +71,7 @@ public:
|
|||
QAction *actionRecentFile[UIUtils::maxRecentFiles];
|
||||
QMap<QString, QString> knownFileExtensions;
|
||||
|
||||
QLabel *versionLabel;
|
||||
QWidget *editorDockTitleWidget;
|
||||
QWidget *consoleDockTitleWidget;
|
||||
|
||||
|
@ -116,6 +117,7 @@ private:
|
|||
void show_examples();
|
||||
void setDockWidgetTitle(QDockWidget *dockWidget, QString prefix, bool topLevel);
|
||||
void addKeyboardShortCut(const QList<QAction *> &actions);
|
||||
void updateStatusBar(class ProgressWidget *progressWidget);
|
||||
|
||||
EditorInterface *editor;
|
||||
|
||||
|
|
|
@ -125,8 +125,6 @@ QSet<MainWindow*> *MainWindow::getWindows()
|
|||
// Global application state
|
||||
unsigned int GuiLocker::gui_locked = 0;
|
||||
|
||||
static std::string helptitle = openscad_version + "\nhttp://www.openscad.org\n\n";
|
||||
|
||||
static char copyrighttext[] =
|
||||
"Copyright (C) 2009-2014 The OpenSCAD Developers\n"
|
||||
"\n"
|
||||
|
@ -183,8 +181,8 @@ MainWindow::MainWindow(const QString &filename)
|
|||
this->consoleDock->setConfigKey("view/hideConsole");
|
||||
this->consoleDock->setAction(this->viewActionHideConsole);
|
||||
|
||||
QLabel *versionLabel = new QLabel(openscad_version.c_str());
|
||||
this->statusbar->addPermanentWidget(versionLabel);
|
||||
this->versionLabel = NULL; // must be initialized before calling updateStatusBar()
|
||||
updateStatusBar(NULL);
|
||||
|
||||
QSettings settings;
|
||||
editortype = settings.value("editor/editortype").toString();
|
||||
|
@ -404,6 +402,7 @@ MainWindow::MainWindow(const QString &filename)
|
|||
|
||||
setCurrentOutput();
|
||||
|
||||
std::string helptitle = openscad_version + "\nhttp://www.openscad.org\n\n";
|
||||
PRINT(helptitle);
|
||||
PRINT(copyrighttext);
|
||||
PRINT("");
|
||||
|
@ -684,7 +683,7 @@ MainWindow::~MainWindow()
|
|||
|
||||
void MainWindow::showProgress()
|
||||
{
|
||||
this->statusBar()->addPermanentWidget(qobject_cast<ProgressWidget*>(sender()));
|
||||
updateStatusBar(qobject_cast<ProgressWidget*>(sender()));
|
||||
}
|
||||
|
||||
void MainWindow::report_func(const class AbstractNode*, void *vp, int mark)
|
||||
|
@ -1057,9 +1056,7 @@ void MainWindow::compileCSG(bool procevents)
|
|||
PRINT("CSG generation cancelled.");
|
||||
}
|
||||
progress_report_fin();
|
||||
this->statusBar()->removeWidget(this->progresswidget);
|
||||
delete this->progresswidget;
|
||||
this->progresswidget = NULL;
|
||||
updateStatusBar(NULL);
|
||||
|
||||
PRINT("Compiling design (CSG Products normalization)...");
|
||||
if (procevents) QApplication::processEvents();
|
||||
|
@ -1797,15 +1794,47 @@ void MainWindow::actionRenderDone(shared_ptr<const Geometry> root_geom)
|
|||
PRINT("WARNING: No top level geometry to render");
|
||||
}
|
||||
|
||||
this->statusBar()->removeWidget(this->progresswidget);
|
||||
delete this->progresswidget;
|
||||
this->progresswidget = NULL;
|
||||
updateStatusBar(NULL);
|
||||
|
||||
this->contentschanged = false;
|
||||
compileEnded();
|
||||
}
|
||||
|
||||
#endif /* ENABLE_CGAL */
|
||||
|
||||
/**
|
||||
* Switch version label and progress widget. When switching to the progress
|
||||
* widget, the new instance is passed by the caller.
|
||||
* In case of resetting back to the version label, NULL will be passed and
|
||||
* multiple calls can happen. So this method must guard against adding the
|
||||
* version label multiple times.
|
||||
*
|
||||
* @param progressWidget a pointer to the progress widget to show or NULL in
|
||||
* case the display should switch back to the version label.
|
||||
*/
|
||||
void MainWindow::updateStatusBar(ProgressWidget *progressWidget)
|
||||
{
|
||||
QStatusBar *sb = this->statusBar();
|
||||
if (progressWidget == NULL) {
|
||||
if (this->progresswidget != NULL) {
|
||||
sb->removeWidget(this->progresswidget);
|
||||
delete this->progresswidget;
|
||||
this->progresswidget = NULL;
|
||||
}
|
||||
if (versionLabel == NULL) {
|
||||
versionLabel = new QLabel(openscad_version.c_str());
|
||||
sb->addPermanentWidget(this->versionLabel);
|
||||
}
|
||||
} else {
|
||||
if (this->versionLabel != NULL) {
|
||||
sb->removeWidget(this->versionLabel);
|
||||
delete this->versionLabel;
|
||||
this->versionLabel = NULL;
|
||||
}
|
||||
sb->addPermanentWidget(progressWidget);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::actionDisplayAST()
|
||||
{
|
||||
setCurrentOutput();
|
||||
|
@ -2400,7 +2429,6 @@ void MainWindow::helpAbout()
|
|||
qApp->setWindowIcon(QApplication::windowIcon());
|
||||
AboutDialog *dialog = new AboutDialog(this);
|
||||
dialog->exec();
|
||||
//QMessageBox::information(this, "About OpenSCAD", QString(helptitle) + QString(copyrighttext));
|
||||
}
|
||||
|
||||
void MainWindow::helpHomepage()
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
# Windows console issues workaround stub.
|
||||
#
|
||||
# Usage: put at the end of .pro file, then run qmake CONFIG+=winconsole
|
||||
#
|
||||
# This attempts to solve the problem of piping OpenSCAD under windows
|
||||
# command line (GUI mode programs in Windows dont allow this). We use
|
||||
# the 'devenv' solution, which means building two binaries:
|
||||
# openscad.exe, and openscad.com, the latter being a wrapper for the
|
||||
# former. See src/winconsole.c for more details.
|
||||
#
|
||||
# Qmake doesn't like building two binaries in the same directory so we
|
||||
# depend on release-common.sh to call qmake twice and package the file properly
|
||||
|
||||
CONFIG(winconsole) {
|
||||
TEMPLATE = app
|
||||
TARGET = openscad_winconsole
|
||||
FORMS =
|
||||
HEADERS =
|
||||
FLEXSOURCES =
|
||||
BISONSOURCES =
|
||||
RESOURCES =
|
||||
SOURCES = src/winconsole.c
|
||||
CONFIG += console # sets IMAGE_SUBSYSTEM_WINDOWS_CUI in binary
|
||||
LIBS -= $$LIBS
|
||||
RC_FILE -= $$RC_FILE
|
||||
QMAKE_POST_LINK = cd $(DESTDIR) && mv openscad_winconsole.exe openscad.com
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
# Windows console issues workaround stub.
|
||||
#
|
||||
# This attempts to solve the problem of piping OpenSCAD under windows
|
||||
# command line (GUI mode programs in Windows dont allow this). We use
|
||||
# the 'devenv' solution, which means building two binaries:
|
||||
# openscad.exe, and openscad.com, the latter being a wrapper for the
|
||||
# former. See src/winconsole.c for more details.
|
||||
#
|
||||
# Qmake doesn't like building two binaries in the same directory so we
|
||||
# depend on release-common.sh to call qmake twice and package the file
|
||||
# properly
|
||||
|
||||
TEMPLATE = app
|
||||
TARGET = openscad_winconsole
|
||||
FORMS =
|
||||
HEADERS =
|
||||
FLEXSOURCES =
|
||||
BISONSOURCES =
|
||||
RESOURCES =
|
||||
SOURCES = src/winconsole.c
|
||||
CONFIG -= qt
|
||||
CONFIG += console # sets IMAGE_SUBSYSTEM_WINDOWS_CUI in binary
|
||||
QMAKE_POST_LINK = cd $(DESTDIR) && mv openscad_winconsole.exe openscad.com
|
Loading…
Reference in New Issue