QTconsoleView::QTconsoleView(QWidget *parent, QTconsoleDoc *doc) : QWidget(parent)
{
   /** connect doc with the view*/
   connect(doc, SIGNAL(documentChanged( QRect )), this, SLOT(slotDocumentChanged( QRect )));
   pDoc = doc;
   // set the font to a default
   set_font( new QFont( "Courier", 12 ) );
   _rows = 0;
   _cols = 0;
   /** starts the blink timer */
   blinkStatus = 1;
   blinker = new QTimer( this );
   connect( blinker, SIGNAL( timeout() ), this, SLOT( slotBlink() ) );
   blinker->start( 500 );
}
Beispiel #2
0
InputManager::InputManager(QWidget* parent, Qt::WindowFlags flags)
    : QWidget(parent, flags)
{
    /* Create a new layout for this widget */
    new QVBoxLayout(this);

    /* Toolbar */
    m_toolbar = new QToolBar(tr("Input Manager"), this);
    m_toolbar->addAction(QIcon(":/edit.png"), tr("Edit Mapping"),
                         this, SLOT(slotEditClicked()));
    layout()->addWidget(m_toolbar);

    /* Tree */
    m_tree = new QTreeWidget(this);
    layout()->addWidget(m_tree);
    m_tree->setRootIsDecorated(false);
    m_tree->setItemsExpandable(false);
    m_tree->setSortingEnabled(false);
    m_tree->setAllColumnsShowFocus(true);
    m_tree->header()->setResizeMode(QHeaderView::ResizeToContents);

    QStringList columns;
    columns << tr("Universe") << tr("Plugin") << tr("Input") << tr("Profile")
            << tr("Editor universe");
    m_tree->setHeaderLabels(columns);

    connect(m_tree, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)),
            this, SLOT(slotEditClicked()));

    /* Timer that clears the input data icon after a while */
    m_timer = new QTimer(this);
    m_timer->setSingleShot(true);
    connect(m_timer, SIGNAL(timeout()), this, SLOT(slotTimerTimeout()));

    /* Listen to input map's input data signals */
    connect(_app->inputMap(), SIGNAL(inputValueChanged(quint32,quint32,uchar)),
            this, SLOT(slotInputValueChanged(quint32,quint32,uchar)));

    /* Listen to document changes */
    connect(_app, SIGNAL(documentChanged(Doc*)),
            this, SLOT(slotDocumentChanged(Doc*)));
    /* Use the initial document */
    slotDocumentChanged(_app->doc());

    /* Listen to plugin configuration changes */
    connect(_app->inputMap(), SIGNAL(pluginConfigurationChanged(const QString&)),
            this, SLOT(slotPluginConfigurationChanged()));
}
Beispiel #3
0
FunctionManager::FunctionManager(QWidget* parent, Qt::WindowFlags flags)
	: QWidget(parent, flags)
{
	new QVBoxLayout(this);

	initActions();
	initMenu();
	initToolbar();

	initTree();
	updateActionStatus();

	/* Listen to document changes */
	connect(_app, SIGNAL(documentChanged(Doc*)),
		this, SLOT(slotDocumentChanged(Doc*)));
	/* Use the initial document */
	slotDocumentChanged(_app->doc());

	m_tree->sortItems(KColumnName, Qt::AscendingOrder);
}
Beispiel #4
0
FixtureManager::FixtureManager(QWidget* parent, Qt::WindowFlags flags)
	: QWidget(parent, flags)
{
	new QVBoxLayout(this);

	m_console = NULL;

	initActions();
	initToolBar();
	initDataView();
	updateView();

	/* To disable some actions when switching to operate mode */
	connect(_app, SIGNAL(modeChanged(App::Mode)),
		this, SLOT(slotModeChanged(App::Mode)));

	/* Listen to document changes */
	connect(_app, SIGNAL(documentChanged(Doc*)),
		this, SLOT(slotDocumentChanged(Doc*)));

	/* Listen to fixture additions/removals */
	slotDocumentChanged(_app->doc());
}