Пример #1
0
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), m_currentTab(0), m_errorTab(0), m_scriptEnvironment(this)
{
	QNetworkProxyFactory::setUseSystemConfiguration(true);
	
	setupUi(this);
	ui_projects->hide(); // Disabled for now
	
	/* Turns off updates so all of these things are drawn at once */
	setUpdatesEnabled(false);

	/* Deletes the tab that QTabWidget starts with by default */
	deleteTab(0);

	hideErrors();
	
	connect(&m_errorList, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(errorClicked(QListWidgetItem*)));
	connect(&m_warningList, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(errorClicked(QListWidgetItem*)));
	connect(&m_linkErrorList, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(errorClicked(QListWidgetItem*)));
	connect(&m_verboseList, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(errorClicked(QListWidgetItem*)));
	
	
	initMenus();
	
	setTitle("");
	
	setUpdatesEnabled(true);
}
Пример #2
0
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), m_currentTab(0), m_scriptEnvironment(this)
{
	QNetworkProxyFactory::setUseSystemConfiguration(true);
	
	setupUi(this);
	m_projectsModel.setProjectManager(&ProjectManager::ref());
	ui_projects->setModel(&m_projectsModel);
	
	// ui_projects->hide(); // Disabled for now
	
	/* Turns off updates so all of these things are drawn at once */
	setUpdatesEnabled(false);

	/* Deletes the tab that QTabWidget starts with by default */
	deleteTab(0);

	hideErrors();
	
	//connect(ui_projects, SIGNAL(clicked(const QModelIndex&)), SLOT(projectFileClicked(const QModelIndex&)));
	connect(ui_projects, SIGNAL(doubleClicked(const QModelIndex&)), SLOT(projectClicked(const QModelIndex&)));
	
	connect(&ProjectManager::ref(), SIGNAL(projectOpened(Project*)), SLOT(projectOpened(Project*)));
	connect(&ProjectManager::ref(), SIGNAL(projectClosed(Project*)), SLOT(projectClosed(Project*)));
	
	ui_projectFrame->setVisible(false);
	
	initMenus();
	
	setTitle("");
	
	setUpdatesEnabled(true);
}
Пример #3
0
void ExprShortEdit::checkErrors() {
    BasicExpression expr(getExpressionString());
    bool valid = expr.isValid();
    std::string err;
    if (!valid) err = expr.parseError();

    hideErrors(valid, err);
}