Ejemplo n.º 1
0
void searchhandler::resultCurrentListItemSymbolName(const QString symName)
{
	if (symName.isEmpty())
	{
		QMessageBox msgBox((QWidget*)mw);
		msgBox.setIcon(QMessageBox::Information);
		msgBox.setStandardButtons(QMessageBox::Ok);
		msgBox.setText(tr("You have to first select an item from the list before pushing the Graph button."));
		msgBox.exec();
		return;
	}	

	QString grpxml, grpdot;
	bool res;
	QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
	if (m_autocompBusy)
	{
		m_autocompBusy = false;
		m_autocompFutureWatcher.waitForFinished();
	}
	if (m_declarBusy)
	{
		m_declarBusy = false;
		m_declarFutureWatcher.waitForFinished();
	}
	if (m_typeOfGraph == 1)
	res = sq->search_funcgraph(symName,
			true,
			grpxml, grpdot);
	else if (m_typeOfGraph == 2)
	res = sq->search_classinheritgraph(symName,
			true,
			grpxml, grpdot);
	else {QApplication::restoreOverrideCursor(); return;}
	QApplication::restoreOverrideCursor();
	QMessageBox msgBox((QWidget*)mw);
	msgBox.setIcon(QMessageBox::Warning);
	msgBox.setStandardButtons(QMessageBox::Ok);
	if (!res)
	{
		msgBox.setText("SQL Query error");
		msgBox.exec();
		return;
	}
	QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
	cqDialogGraph cqdg((QWidget*)mw);
	cqdg.setModal(true);
	cqdg.setupGraphFromXML(grpxml, grpdot, m_graphdesc);
	QApplication::restoreOverrideCursor();
	cqdg.exec();
}
Ejemplo n.º 2
0
void fileviewer::fileViewSettings_Triggered(bool checked)
{
    cqDialogFileViewSettings cqdg((QWidget*)mw, this, m_fontlist);
    m_fonttemp = m_textEditSourceFont.family();
    m_fontwidthtemp = (m_textEditSource->tabStopWidth() /
                       m_textEditSource->fontMetrics().width(' '));
    cqdg.setCurrentFontType(m_fonttemp);
    cqdg.setTabWidth(m_fontwidthtemp);
    cqdg.setModal(true);
    cqdg.exec();
    if (cqdg.result() == QDialog::Accepted)
    {
        m_textEditSourceFont.setFamily(m_fonttemp);
        m_textEditSource->setFont(m_textEditSourceFont);
        m_textEditSource->setTabStopWidth(m_fontwidthtemp *
                                          m_textEditSource->fontMetrics().width(' '));
        updateTextEdit();
    }
}
Ejemplo n.º 3
0
void fileviewer::fileViewSettings_Triggered(bool checked)
{
	cqDialogFileViewSettings cqdg((QWidget*)mw, this,
		m_fontlist, themes::getThemesList());
	m_fonttemp = m_textEditSourceFont.family();
	m_fontwidthtemp = (m_textEditSource->tabWidth());
	m_themetemp = m_theme;
	cqdg.setCurrentFontType(m_fonttemp);
	cqdg.setTabWidth(m_fontwidthtemp);
	cqdg.setCurrentTheme(m_themetemp);
	cqdg.setModal(true);
	cqdg.exec();
	if (cqdg.result() == QDialog::Accepted)
	{
		m_textEditSourceFont.setFamily(m_fonttemp);
		//m_lexer->setFont(m_textEditSourceFont);
		m_textEditSource->setTabWidth(m_fontwidthtemp);
		m_textEditSource->zoomTo(m_fontsize);
		m_theme = m_themetemp;
		m_themelast = "1234";
		setLexer();
	}
}