Exemplo n.º 1
0
void CComponentType::setNecessity( int necessity )
{
	this->necessity = necessity;

	// Update the components of this component type
	updateComponents();
}
Exemplo n.º 2
0
void CComponentType::setTime( int time )
{
	this->time = time;

	// Update the components of this component type
	updateComponents();
}
Exemplo n.º 3
0
void CComponentType::setFrequency( int frequency )
{
	this->frequency = frequency;

	// Update the components of this component type
	updateComponents();
}
Exemplo n.º 4
0
//TODO create multiple constructors for passing default values
dekq::formal::controls::Button::Button()
{
	this->setWidth(80); //TODO make this more efficient(cause every set in here will trigger updateComponents)
	this->setHeight(18);
	this->setX(10);
	this->setY(10);

	listeners.mouse_enter = events.MouseEnter.operator+=([this](int i)
	{
		std::cout << "mouse enter" << std::endl;
		this->states.hover = true;
	});
	listeners.mouse_leave = events.MouseLeave.operator+=([this](int i)
	{
		std::cout << "mouse leave" << std::endl;
		this->states.hover = false;
	});
	listeners.pressed = events.Pressed.operator+=([this](int i)
	{
		std::cout << "pressed" << std::endl;
		this->states.pressed = true;
	});
	listeners.released = events.Released.operator+=([this](int i)
	{
		std::cout << "released" << std::endl;
		this->states.pressed = false;
	});

	updateComponents();
}
Exemplo n.º 5
0
void CComponentType::removeEdgeConnector( CEdgeConnector& edgeConnector )
{
	// Search for the given edge connector	
	list<CEdgeConnector*>::iterator itEdgeConnector;
	for( itEdgeConnector = edgeConnectors.begin(); itEdgeConnector != edgeConnectors.end(); itEdgeConnector++ )
	{
		// If found, remove it and disconnect it
		if( (*itEdgeConnector) == (&edgeConnector) )
		{
			edgeConnector.pComponentType = NULL;
			edgeConnectors.erase( itEdgeConnector );
			break;
		}
	}

	// If the connection was complete...
	if( &(edgeConnector.getLinkedConnector().getComponentType()) != NULL )
	{
		// Update the components of this component type 
		updateComponents();

		// And update the connected component type's components too
		const_cast<CComponentType&>( edgeConnector.getLinkedConnector().getComponentType() ).updateComponents();
	}
}
Exemplo n.º 6
0
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    updateComponents();
}
void PMixInterpolationSpaceLayout::changeListenerCallback (ChangeBroadcaster* source)
{
  if (source == &selectedItems)
  {
  }
  else
    updateComponents();
  
  repaint();
}
Exemplo n.º 8
0
GeneneralConf::GeneneralConf(QWidget *parent) : QWidget(parent) {
    m_layout = new QVBoxLayout(this);
    m_layout->setAlignment(Qt::AlignTop);
    initShowHelp();
    initShowDesktopNotification();
    initShowTrayIcon();
    initAutostart();

    // this has to be at the end
    initConfingButtons();
    updateComponents();
}
Exemplo n.º 9
0
UIcolorEditor::UIcolorEditor(QWidget *parent) : QGroupBox(parent) {
    setTitle(tr("UI Color Editor"));
    setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    m_hLayout = new QHBoxLayout;
    m_vLayout = new QVBoxLayout;
    m_hLayout->addItem(new QSpacerItem(10, 10, QSizePolicy::Expanding));
    m_vLayout->setAlignment(Qt::AlignVCenter);
    initButtons();
    initColorWheel();
    m_vLayout->addSpacing(10);
    m_hLayout->addLayout(m_vLayout);
    m_hLayout->addItem(new QSpacerItem(10, 10, QSizePolicy::Expanding));
    setLayout(m_hLayout);
    updateComponents();
}
void PMixInterpolationSpaceLayout::deleteSelection()
{
  for (int i = 0; i < selectedItems.getNumSelected(); i++)
  {
    Component* c = selectedItems.getSelectedItem(i);
    
    InterpolationSpacePreset* p = dynamic_cast<InterpolationSpacePreset*>(c);
    
    if (p)
    {
      audioEngine.getDoc().removePreset(p->nodeID, p->presetId);
    }
  }
  
  selectedItems.deselectAll();
  
  updateComponents();
}
Exemplo n.º 11
0
void CComponentType::addEdgeConnector( CEdgeConnector& edgeConnector )
{
	// Set this component type as owner
	edgeConnector.pComponentType = this;
	
	// Add to edge connectors
	edgeConnectors.push_back( &edgeConnector );

	// If the connection is complete...
	if( &(edgeConnector.getLinkedConnector().getComponentType()) != NULL )
	{
		// Update the components of this component type 
		updateComponents();

		// And update the connected component type's components too
		const_cast<CComponentType&>( edgeConnector.getLinkedConnector().getComponentType() ).updateComponents();
	}
}
Exemplo n.º 12
0
void MainWindow::on_pushButton_NextStep_clicked()
{
    ui->fibHeapView->nextStep();
    updateComponents();
}
Exemplo n.º 13
0
void dekq::formal::controls::Button::style_setFont(std::shared_ptr<sf::Font> font)
{
	style.font = font;
	updateComponents();
}
void GameState::moveBox(unsigned int boxNum, point pos){
	this->set(boxes[boxNum],1);
	this->boxes[boxNum] = pos;
	this->set(pos,0);
	updateComponents();
}
Exemplo n.º 15
0
void Vector::setDirection(float gdir){ direction = gdir; updateComponents(); }
Exemplo n.º 16
0
void GraphEditorPanel::changeListenerCallback (ChangeBroadcaster*)
{
    updateComponents();
}
Exemplo n.º 17
0
void dekq::formal::controls::Button::style_setColor(sf::Color color)
{
	style.color = color;
	updateComponents();
}
Exemplo n.º 18
0
void dekq::formal::controls::Button::style_setBorderColor(sf::Color borderColor)
{
	style.borderColor = borderColor;
	updateComponents();
}
Exemplo n.º 19
0
Vector::Vector(){
	id = COMPONENT_VECTOR;
	magnitude = 0.0;
	direction = 0.0;
	updateComponents();
}
Exemplo n.º 20
0
void MainWindow::on_pushButton_Union_clicked()
{
    ui->fibHeapView->unionOperation();
    updateComponents();
}
Exemplo n.º 21
0
void DataModel::updateAll() {
    updateComponents();
    updateFeatures();
    updateOrthogonalTable();
}
Exemplo n.º 22
0
 void visibleAreaChanged (int x, int, int, int)
 {
     const bool hasScrolledSideways = (x != lastX);
     lastX = x;
     updateComponents (hasScrolledSideways);
 }
Exemplo n.º 23
0
void dekq::formal::controls::Button::setDisplayText(std::string displayText)
{
	properties.displayText = displayText;
	updateComponents();
}
Exemplo n.º 24
0
Vector::Vector(float gmag, float gdir){
	id = COMPONENT_VECTOR;
	magnitude = gmag;
	direction = gdir;
	updateComponents();
}
Exemplo n.º 25
0
void dekq::formal::controls::Button::style_setBorderWidth(int borderWidth)
{
	style.borderWidth = borderWidth;
	updateComponents();
}
Exemplo n.º 26
0
Vector::Vector(float gmag, float gdir, int gid){
	id = gid;
	magnitude = gmag;
	direction = gdir;
	updateComponents();
}
Exemplo n.º 27
0
void dekq::formal::controls::Button::style_setBackgroundColor(sf::Color backgroundColor)
{
	style.backgroundColor = backgroundColor;
	updateComponents();
}
Exemplo n.º 28
0
void Vector::setMagnitude(float gmag){ magnitude = gmag; updateComponents(); }
Exemplo n.º 29
0
void dekq::formal::controls::Button::style_setFontSize(unsigned int fontSize)
{
	style.fontSize = fontSize;
	updateComponents();
}
Exemplo n.º 30
0
void GraphEditorPanel::resized()
{
    updateComponents();
}