Beispiel #1
0
 myPlugin(axContext* aContext)
 : axFormat(aContext, AX_PLUG_DEFAULT)
   {
     axRandomize(418);
     describe("test_widgets","ccernn","axonlibe example",0,AX_MAGIC+0x0000);
     setupAudio(2,2,false);
     setupEditor(640,480);
   }
Beispiel #2
0
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    setupEditor();
    addActionsToContextMenu();
}
 myPlugin(axContext* aContext)
 : axFormat(aContext, AX_PLUG_DEFAULT)
   {
     describe("test_","ccernn","axonlibe example",0,AX_MAGIC+0x0000);
     setupAudio(2,2,false);
     setupEditor(640,480);
     //setupParameters();
   }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
{
    setupFileMenu();
    setupEditor();

    setCentralWidget(editor);
    setWindowTitle(tr("PEG Markdown Highlight Example"));
}
/**
 * Set up the widget from a given scripting environment
 * @param environ :: A pointer to the current scripting environment
 * @param identifier :: A string identifier, used mainly in error messages to identify the
 * current script
 */
void ScriptFileInterpreter::setup(const ScriptingEnv & environ, const QString & identifier)
{
  setupEditor(environ, identifier);
  setupScriptRunner(environ, identifier);
  connect(m_runner.data(), SIGNAL(autoCompleteListGenerated(const QStringList &)),
          m_editor, SLOT(updateCompletionAPI(const QStringList &)));
  m_runner->generateAutoCompleteList();
  connect(m_runner.data(), SIGNAL(currentLineChanged(int,bool)),
          m_editor, SLOT(updateProgressMarker(int,bool)));
}
Beispiel #6
0
//! [0]
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
{
    setupFileMenu();
    setupHelpMenu();
    setupEditor();

    setCentralWidget(editor);
    setWindowTitle(tr("Syntax Highlighter"));
}
Beispiel #7
0
 myPlugin(axContext* aContext)
 : axFormat(aContext, pf_None/*HasEditor*/)
   {
     m_Gain = 0;
     describe("test_buttons","ccernn","axonlib example",0,AX_MAGIC+0x0000);
     setupAudio(2,2,false);
     setupEditor(320,240);
     appendParameter( p_Gain = new axParameter(this,"gain","") );
     setupParameters();
   }
	Config::Config(KConfig *config, KileInfo *ki, QWidget* parent)
		: KPageDialog(parent),
		  m_config(config),
		  m_ki(ki)
	{
		setWindowTitle(i18n("Configure"));
		setModal(true);
		setObjectName("kileconfiguration");
		setFaceType(Tree);

		m_config->sync();

		// we need a dialog manager
		m_manager = new KConfigDialogManager(this,KileConfig::self());

		KPageWidgetItem* kilePageWidgetItem = addConfigFolder(i18n("Kile"), "kile");
		KPageWidgetItem* latexPageWidgetItem = addConfigFolder(i18n("LaTeX"), "latex-config");
		KPageWidgetItem* toolsPageWidgetItem = addConfigFolder(i18n("Tools"), "system-run");
		KPageWidgetItem* editorPageWidgetItem = addConfigFolder(i18n("Editor"), "accessories-text-editor");

		// setup all configuration pages
		setupGeneralOptions(kilePageWidgetItem);
		setupAppearance(kilePageWidgetItem);
		setupCodeCompletion(kilePageWidgetItem);   // complete configuration (dani)
		setupHelp(kilePageWidgetItem);
		setupScripting(kilePageWidgetItem);
		setupUsermenu(kilePageWidgetItem);
		setupLivePreview(kilePageWidgetItem);

		setupLatex(latexPageWidgetItem);
		setupEnvironment(latexPageWidgetItem);
		setupGraphics(latexPageWidgetItem);
		setupStructure(latexPageWidgetItem);
		setupSymbolView(latexPageWidgetItem);

		setupTools(toolsPageWidgetItem);
		setupQuickPreview(toolsPageWidgetItem);     // QuickPreview (dani)

		setupEditor(editorPageWidgetItem);

		m_configDialogSize = m_config->group("KileConfigDialog");
		KWindowConfig::restoreWindowSize(windowHandle(), m_configDialogSize);

		// setup connections
		//connect(m_manager, SIGNAL(widgetModified()), this, SLOT(slotWidgetModified()));
		connect(this, &KPageDialog::accepted, this, &Config::slotAcceptChanges);
		connect(this, &KPageDialog::accepted, m_manager, &KConfigDialogManager::updateSettings);
		connect(this, &KPageDialog::rejected, this, [=] () {
			m_config->markAsClean();
		});
	}
Beispiel #9
0
view::mainWidget::codeViewer::codeViewer(bool enableEditor, bool wrapLines, QString language)
{
    m_enableEditor = enableEditor;
    m_wrapLines = wrapLines;
    m_language = language;

    // layout for document-area
    codeArea = new QVBoxLayout();
    if (m_wrapLines)
        codeArea->setAlignment(Qt::AlignCenter);

    // Setup controller
    setupEditor();

    this->setLayout(codeArea);
}
Beispiel #10
0
 myPlugin(axContext* aContext, int aFlags)
 : axFormat(aContext)
   {
     w_Editor = NULL;
     w_Painter = NULL;
     describe("test_gain_gui","ccernn","axonlib example",0,AX_MAGIC+0x0000);
     setupAudio(2,2);
     setupEditor(640,480);
     appendParameter( new parInteger(this,"type1","", 0,   0, NUMTYPES-1, str_type ) );
     appendParameter( new parInteger(this,"type2","", 0,   0, NUMTYPES-1, str_type ) );
     appendParameter( new parFloat(  this,"min x","",-10, -10,10 ) );
     appendParameter( new parFloat(  this,"max x","", 10, -10,10 ) );
     appendParameter( new parFloat(  this,"min y","",-10, -10,10 ) );
     appendParameter( new parFloat(  this,"max y","", 10, -10,10 ) );
     appendParameter( new parFloat(  this,"n",    "", 0,  -10,10  ) );
     //setupParameters();
     prepareParameters();
   }
Beispiel #11
0
FileEditor::FileEditor(const QString &filename, QMdiSubWindow *parent, const QString &baseDir) :
    mFilename(filename), mdiWindow(parent), mBaseDir(baseDir)
{
    mFocusRecursion = mChanged = mOmitReloadChecks = false;
    mCurrentBreakpoint = -1;

    // Update GUI and content
    reloadContent();
    setupEditor();
    updateLexer();
    updateWindowTitle();
    HilecInterface* hilec = HilecSingleton::hilec();
    if(hilec)
    {
        QList<int> breakpoints = hilec->breakpoints(mFilename);
        foreach(int line, breakpoints){
            toggleBreakpoint(line-1);
        }
    }
Beispiel #12
0
TableWidgetContents TableWidgetEditor::fillContentsFromTableWidget(QTableWidget *tableWidget)
{
    TableWidgetContents tblCont;
    tblCont.fromTableWidget(tableWidget, false);
    tblCont.applyToTableWidget(ui.tableWidget, iconCache(), true);

    tblCont.m_verticalHeader.applyToListWidget(m_rowEditor->listWidget(), iconCache(), true);
    m_rowEditor->setupEditor(tableWidget, tableHeaderPropList);

    tblCont.m_horizontalHeader.applyToListWidget(m_columnEditor->listWidget(), iconCache(), true);
    m_columnEditor->setupEditor(tableWidget, tableHeaderPropList);

    setupEditor(tableWidget, tableItemPropList);
    if (ui.tableWidget->columnCount() > 0 && ui.tableWidget->rowCount() > 0)
        ui.tableWidget->setCurrentCell(0, 0);

    updateEditor();

    return tblCont;
}
Beispiel #13
0
TextEditor::TextEditor(EditorPane *parent, QFont *font, QFile *file, TextEditor *prev)
   : QTextEdit(), m_parent(parent), m_prev(prev), m_next(NULL), m_file(NULL), 
   m_loaded(false), m_modified(false), m_undoAvailable(false), 
   m_redoAvailable(false), m_syntaxHighligher(NULL), 
   m_program(new Program(parent->m_parent, parent, this)), m_pc(NULL), 
   m_hasControlSelection(false), m_registerTip(NULL)
{
   setupEditor(font);
   
   if (file != NULL)
      openFile(file);
   else openFile(NULL); // open a template file
   
   if (m_prev != NULL) {
      m_next = m_prev->m_next;
      m_prev->m_next = this;

      if (m_next != NULL)
         m_next->m_prev = this;
   }
}
Beispiel #14
0
DialogIDE::DialogIDE( QWidget * parent, Qt::WFlags f) : QDialog(parent, f)
{



    setupUi(this);

    setupEditor();

    connect(startButton, SIGNAL(clicked()), this, SLOT(start()));
    connect(installPB,SIGNAL(clicked()),this,SLOT(inject()));
    connect(savePB,SIGNAL(clicked()),this,SLOT(save()));
    connect(listWidget,SIGNAL(itemDoubleClicked(QListWidgetItem*)),this,SLOT(load(QListWidgetItem*)));
    connect(tabWidget,SIGNAL(tabCloseRequested(int)),this,SLOT(closeTab(int)));

    this->setWindowFlags(Qt::Window);




}
Beispiel #15
0
CodeEditor::CodeEditor(Toolchain* t, QString filename, QWidget* parent): QsciScintilla(parent)
{
    loading = false;
    highlighter = 0;
    
    connect(this, SIGNAL(textChanged()), this, SLOT(updateFileName()));
    connect(this, SIGNAL(linesChanged()), this, SLOT(updateLineNumberMarginWidth()));

    fileName = filename;
    // FIXME: Remove this; this just makes it so Ctrl-S doesn't ask for a filename.
    path = filename;
    toolchain = t;
    dirty = false;

    setHighlighter();
    setupEditor();
    setupMargins();
    setupSignals();

    readFile(filename);
}
Beispiel #16
0
/*!
 \brief IDE main class constructor

 \param parent
*/
WindowIDE::WindowIDE(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::WindowIDE)
{
    ui->setupUi(this);

    tabifyDockWidget(ui->projectDockWidget,ui->filesDockWidget);
    this->setWindowTitle(tr("PockEmul Integrated Development Environment"));
    this->setAttribute(Qt::WA_DeleteOnClose,true);

    setupEditor();

    connect(ui->actionCompile, SIGNAL(triggered()), this, SLOT(compile()));
    connect(ui->actionSave,SIGNAL(triggered()),this,SLOT(save()));
    connect(ui->actionSave_All,SIGNAL(triggered()),this,SLOT(saveAll()));
    //connect(ui->listWidget,SIGNAL(itemDoubleClicked(QListWidgetItem*)),this,SLOT(load(QListWidgetItem*)));
    connect(ui->treeView,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(load(QModelIndex)));
    connect(ui->tabWidget,SIGNAL(tabCloseRequested(int)),this,SLOT(closeEditorTab(int)));
    connect(ui->outputtabWidget,SIGNAL(tabCloseRequested(int)),this,SLOT(closeOutputTab(int)));
    connect(ui->actionNew,SIGNAL(triggered()),this,SLOT(newFile()));

    connect(mainwindow,SIGNAL(DestroySignal(CPObject*)),this,SLOT(DestroySlot(CPObject*)));
}
EditableFilterDialog::EditableFilterDialog(Filters::EditableFilter * f, QWidget *parent) :
    BaseFilterDialog(tr("Editable filter dialog"), parent),
    ui(new Ui_EditableFilterDialog),
    _configDialog(new BuildConfigDialog()),
    _errorWidget(new BuildErrorWidget()),
    _model(f)
{

    ui->setupUi(this);

    setupEditor();

    // connect to model:
    connect(_model, &Filters::EditableFilter::badConfiguration, this, &EditableFilterDialog::onBadConfiguration);
    connect(_model, &Filters::EditableFilter::workFinished, this, &EditableFilterDialog::onWorkFinished);
    connect(_model, &Filters::EditableFilter::buildError, this, &EditableFilterDialog::onBuildError);

    // Configure the model:
    getConfigFromSettings();
    _model->runTestCmake();

    refreshCode();
}
Beispiel #18
0
Reader::Reader()
{
    setupEditor();
    setCentralWidget(editor);
}