Ejemplo n.º 1
0
void
mem_slot_test() {
  as_mem_slot_t *s = slot_new(4);
  slot_alloc(s, 4);
  int a = slot_alloc(s, 5);
  slot_alloc(s, 3);
  slot_free(s, a, 5);
  slot_alloc(s, 6);

  slot_print(s);
  slot_destroy(s);
}
Ejemplo n.º 2
0
ThemeBuilderUI::ThemeBuilderUI(QWidget* parent)
 : QWidget(parent), config(NULL)
{
  setupUi(this);

  config = new ThemeConfig();
  defaultConfig = new ThemeConfig(":default.cfg");

  QObject::connect(elementList,SIGNAL(currentTextChanged(const QString &)), this,SLOT(slot_ElementChanged(const QString &)));
  QObject::connect(quitButton,SIGNAL(clicked()), this,SLOT(close()));
  QObject::connect(loadButton,SIGNAL(clicked()), this,SLOT(slot_open()));
  QObject::connect(newButton,SIGNAL(clicked()), this,SLOT(slot_new()));

  elementList->addItems(ThemeConfig::getManagedElements());
  inheritElementCombo->addItems(ThemeConfig::getManagedElements());
  inheritFrameCombo->addItems(ThemeConfig::getManagedElements());
  inheritInteriorCombo->addItems(ThemeConfig::getManagedElements());
  inheritIndicatorCombo->addItems(ThemeConfig::getManagedElements());
}
Ejemplo n.º 3
0
GenericSection::GenericSection( QWidget * parent, const char * name )
	: Section( parent, name )
{
	QVBoxLayout * layout = new QVBoxLayout( this );
	
	_select = new SelectionWidget( this, "select" );
	layout->addWidget( _select );
	layout->addSpacing( 5 );
	
	_mainWidget = new QWidget( this );
	_mainWidget->setWindowTitle( "main widget" );
	layout->addWidget( _mainWidget, 1 );
	layout->addSpacing( 5 );
	
	layout->activate();
	
	connect( _select, SIGNAL( sig_first() ), SLOT( slot_first() ) );
	connect( _select, SIGNAL( sig_previous() ), SLOT( slot_previous() ) );
	connect( _select, SIGNAL( sig_next() ), SLOT( slot_next() ) );
	connect( _select, SIGNAL( sig_last() ), SLOT( slot_last() ) );
	connect( _select, SIGNAL( sig_new() ), SLOT( slot_new() ) ); 
	connect( _select, SIGNAL( sig_del() ), SLOT( slot_del() ) );
}