Пример #1
0
QAction* QRibbonButtonBar::insertHybridButton(
	size_t pos,
	int button_id,
	const QString& label,
	const QPixmap& bitmap,
	const QString& help_string)
{
	return insertButton(pos, button_id, label, bitmap, help_string,
		QRIBBON_BUTTON_HYBRID);
}
Пример #2
0
void FancyTabWidget::insertTab(int index, QWidget *tab, const QString &label)
{
	QPushButton *button = insertButton(index, label);
	button->setCheckable(true);

	mPagesWidget->insertWidget(index, tab);
	
	if(mButtons->buttons().size() == 1)
		button->setChecked(true);
}
Пример #3
0
QAction* QRibbonButtonBar::insertDropdownButton(
	size_t pos,
	int button_id,
	const QString& label,
	const QPixmap& bitmap,
	const QString& help_string)
{
	return insertButton(pos, button_id, label, bitmap, help_string,
		QRIBBON_BUTTON_DROPDOWN);
}
CdbSymbolPathListEditor::CdbSymbolPathListEditor(QWidget *parent) :
    Utils::PathListEditor(parent)
{
    QPushButton *button = insertButton(lastInsertButtonIndex + 1,
                                       tr("Insert Symbol Server..."), this, [this](){
        addSymbolPath(SymbolServerPath);
    });
    button->setToolTip(tr("Adds the Microsoft symbol server providing symbols for operating system "
                          "libraries. Requires specifying a local cache directory."));

    button = insertButton(lastInsertButtonIndex + 1, tr("Insert Symbol Cache..."), this, [this]() {
        addSymbolPath(SymbolCachePath);
    });
    button->setToolTip(tr("Uses a directory to cache symbols used by the debugger."));

    button = insertButton(lastInsertButtonIndex + 1, tr("Set up Symbol Paths..."), this, [this](){
        setupSymbolPaths();
    });
    button->setToolTip(tr("Configure Symbol paths that are used to locate debug symbol files."));
}
Пример #5
0
QAction* QRibbonButtonBar::insertButton(
	size_t pos,
	int button_id,
	const QString& label,
	const QPixmap& bitmap,
	const QString& help_string,
	QRibbonButtonKind kind)
{
	return insertButton(pos, button_id, label, bitmap, QNullBitmap,
		QNullBitmap, QNullBitmap, kind, help_string);
}
Пример #6
0
QAction* QRibbonButtonBar::addButton(int button_id,
	const QString& label,
	const QPixmap& bitmap,
	const QPixmap& bitmap_small,
	const QPixmap& bitmap_disabled,
	const QPixmap& bitmap_small_disabled,
	QRibbonButtonKind kind,
	const QString& help_string)
{
	return insertButton(getButtonCount(), button_id, label, bitmap,
		bitmap_small, bitmap_disabled, bitmap_small_disabled, kind, help_string);
}
Пример #7
0
ScriptWidget::ScriptWidget( QWidget *parent, bool isnewaccount, const char *name )
  : QWidget(parent, name)
{ 
  const int GRIDROWS = 3;

  QGridLayout *tl = new QGridLayout(this, GRIDROWS, 3, 10, 10);
  tl->addRowSpacing(0, fontMetrics().lineSpacing() - 10);
  box = new QGroupBox(this);
  box->setTitle(i18n("Edit Script"));
  tl->addMultiCellWidget(box, 0, GRIDROWS-1, 0, 2);

  QVBoxLayout *l1 = new QVBoxLayout;
  tl->addLayout(l1, 1, 1);

  se = new ScriptEdit(this);
  connect(se, SIGNAL(returnPressed()), SLOT(addButton()));
  l1->addWidget(se);

  add = new QPushButton(i18n("Add"), this);
  connect(add, SIGNAL(clicked()), SLOT(addButton()));
  FIXED_HEIGHT(add);
  int width = add->sizeHint().width();
  width = QMAX(width,60);
  add->setMinimumWidth(width);


  insert = new QPushButton(i18n("Insert"), this);
  connect(insert, SIGNAL(clicked()), SLOT(insertButton()));
  FIXED_HEIGHT(insert);
  width = insert->sizeHint().width();
  width = QMAX(width,60);
  insert->setMinimumWidth(width);

  remove = new QPushButton(i18n("Remove"), this);
  connect(remove, SIGNAL(clicked()), SLOT(removeButton()));
  FIXED_HEIGHT(remove);
  width = remove->sizeHint().width();
  width = QMAX(width,60);
  remove->setMinimumWidth(width);

  QHBoxLayout *l11 = new QHBoxLayout;
  l1->addLayout(l11);
  l11->addWidget(add);
  l11->addStretch(1);
  l11->addWidget(insert);
  l11->addStretch(1);
  l11->addWidget(remove);
  
  QHBoxLayout *l12 = new QHBoxLayout(0);
  l1->addLayout(l12);
  stl = new QListBox(this);
  stl->setSmoothScrolling(false);
  stl->setAutoScrollBar(false);
  connect(stl, SIGNAL(highlighted(int)), SLOT(stlhighlighted(int)));
  stl->setMinimumSize(QSize(70, 140));

  sl = new QListBox(this);
  sl->setSmoothScrolling(false);
  sl->setAutoScrollBar(false);
  connect(sl, SIGNAL(highlighted(int)), SLOT(slhighlighted(int)));
  sl->setMinimumSize(QSize(150, 140));

  slb = new QScrollBar(this);
  slb->setFixedWidth(slb->sizeHint().width());
  connect(slb, SIGNAL(valueChanged(int)), SLOT(scrolling(int)));

  l12->addWidget(stl, 1);
  l12->addWidget(sl, 3);
  l12->addWidget(slb, 0);

  //load data from gpppdata
  if(!isnewaccount) {
    QStrList &comlist = gpppdata.scriptType();
    QStrList &arglist = gpppdata.script();
    for(char *com = comlist.first(), *arg = arglist.first();
        com && arg; com = comlist.next(), arg = arglist.next()) {
      stl->insertItem(com);
      sl->insertItem(arg);
    }
  }

  remove->setEnabled(false);
  insert->setEnabled(false);
  adjustScrollBar();

  tl->activate();
}