Ejemplo n.º 1
0
IconPickerDialog::IconPickerDialog(QWidget *parent) :
	QDialog(parent),
	ui(new Ui::IconPickerDialog)
{
    MultiMCPlatform::fixWM_CLASS(this);
	ui->setupUi(this);
	setWindowModality(Qt::WindowModal);
	
	auto contentsWidget = ui->iconView;
	contentsWidget->setViewMode(QListView::IconMode);
	contentsWidget->setFlow(QListView::LeftToRight);
	contentsWidget->setIconSize(QSize(48, 48));
	contentsWidget->setMovement(QListView::Static);
	contentsWidget->setResizeMode(QListView::Adjust);
	contentsWidget->setSelectionMode(QAbstractItemView::SingleSelection);
	contentsWidget->setSpacing(5);
	contentsWidget->setWordWrap(false);
	contentsWidget->setWrapping(true);
	contentsWidget->setUniformItemSizes(true);
	contentsWidget->setTextElideMode(Qt::ElideRight);
	contentsWidget->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
	contentsWidget->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
	contentsWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
	contentsWidget->setItemDelegate(new ListViewDelegate());
	
	//contentsWidget->setAcceptDrops(true);
	contentsWidget->setDropIndicatorShown(true);
	contentsWidget->viewport()->setAcceptDrops(true);
	contentsWidget->setDragDropMode(QAbstractItemView::DropOnly);
	contentsWidget->setDefaultDropAction(Qt::CopyAction);
	
	contentsWidget->installEventFilter(this);
	
	contentsWidget->setModel(MMC->icons().get());
	
	auto buttonAdd = ui->buttonBox->addButton(tr("Add Icon"),QDialogButtonBox::ResetRole);
	auto buttonRemove = ui->buttonBox->addButton(tr("Remove Icon"),QDialogButtonBox::ResetRole);
	
	
	connect(buttonAdd,SIGNAL(clicked(bool)),SLOT(addNewIcon()));
	connect(buttonRemove,SIGNAL(clicked(bool)),SLOT(removeSelectedIcon()));
	
	connect
	(
		contentsWidget,
		SIGNAL(doubleClicked(QModelIndex)),
		SLOT(activated(QModelIndex))
	);
	
	connect
	(
		contentsWidget->selectionModel(),
		SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
		SLOT(selectionChanged(QItemSelection,QItemSelection))
	);
}
Ejemplo n.º 2
0
//BEGIN KMimeTypeChooser
KMimeTypeChooser::KMimeTypeChooser( const TQString &text,
                              const TQStringList &selMimeTypes,
                              const TQString &defaultGroup,
                              const TQStringList &groupsToShow,
                              int visuals,
                              TQWidget *parent,
                              const char *name )
    : TQVBox( parent, name )
{
  d = new KMimeTypeChooserPrivate();
  d->lvMimeTypes = 0;
  d->btnEditMimeType = 0;
  d->defaultgroup = defaultGroup;
  d->groups = groupsToShow;
  d->visuals = visuals;

  setSpacing( KDialogBase::spacingHint() );

  if ( !text.isEmpty() )
  {
    new TQLabel( text, this );
  }

  d->lvMimeTypes = new TDEListView( this );

  d->lvMimeTypes->addColumn( i18n("Mime Type") );
//   d->lvMimeTypes->setColumnWidthMode( 0, TQListView::Manual );

  if ( visuals & Comments )
  {
    d->lvMimeTypes->addColumn( i18n("Comment") );
    d->lvMimeTypes->setColumnWidthMode( 1, TQListView::Manual );
  }
  if ( visuals & Patterns )
    d->lvMimeTypes->addColumn( i18n("Patterns") );

  d->lvMimeTypes->setRootIsDecorated( true );

  loadMimeTypes( selMimeTypes );

  if (visuals & KMimeTypeChooser::EditButton)
  {
    TQHBox *btns = new TQHBox( this );
    ((TQBoxLayout*)btns->layout())->addStretch(1);
    d->btnEditMimeType = new TQPushButton( i18n("&Edit..."), btns );

    connect( d->btnEditMimeType, TQT_SIGNAL(clicked()), this, TQT_SLOT(editMimeType()) );
    d->btnEditMimeType->setEnabled( false );
    connect( d->lvMimeTypes, TQT_SIGNAL( doubleClicked ( TQListViewItem * )),
             this, TQT_SLOT( editMimeType()));
    connect( d->lvMimeTypes, TQT_SIGNAL(currentChanged(TQListViewItem*)),
             this, TQT_SLOT(slotCurrentChanged(TQListViewItem*)) );

    TQWhatsThis::add( d->btnEditMimeType, i18n(
        "Click this button to display the familiar TDE mime type editor.") );
  }
Ejemplo n.º 3
0
UrlCatcher::UrlCatcher(QWidget* parent) : ChatWindow(parent)
{
    setName(i18n("URL Catcher"));
    setType(ChatWindow::UrlCatcher);

    setSpacing(0);

    setupActions();
    setupUrlTree();
}
Ejemplo n.º 4
0
    DistroChartItem():
        QwtPlotBarChart( "Page Hits" )
    {
        setLegendMode( QwtPlotBarChart::LegendBarTitles );
        setLegendIconSize( QSize( 10, 14 ) );
        setLayoutPolicy( AutoAdjustSamples );
        setLayoutHint( 4.0 ); // minimum width for a single bar

        setSpacing( 10 ); // spacing between bars
    }
Ejemplo n.º 5
0
void HGLayout::setWidget(HGWidget* widget)
{
    //qDebug("HGLayout::setWidget");
    mWidget = widget;

    //todo create layout object
    setLayoutType(mLayoutType);
    setMargins(mMargins);
    setSpacing(mSpacing);
}
Ejemplo n.º 6
0
PiecesList::PiecesList(QWidget *parent)
    : QListWidget(parent)
{
    setDragEnabled(true);
    setViewMode(QListView::IconMode);
    setIconSize(QSize(60, 60));
    setSpacing(10);
    setAcceptDrops(true);
    setDropIndicatorShown(true);
}
Ejemplo n.º 7
0
void KNMusicHeaderLyrics::loadConfigure()
{
    //Update the spacing.
    setSpacing(m_musicConfigure->getData("LyricsTextSpacing",
                                         spacing()).toInt());
    //Update the font.
    setFont(m_musicConfigure->getData("LyricsFont", font()).value<QFont>());
    //Update the lyrics.
    update();
}
Ejemplo n.º 8
0
PiecesList::PiecesList(int pieceSize, QWidget *parent)
    : QListWidget(parent), m_PieceSize(pieceSize)
{
    setDragEnabled(true);
    setViewMode(QListView::IconMode);
    setIconSize(QSize(m_PieceSize, m_PieceSize));
    setSpacing(10);
    setAcceptDrops(true);
    setDropIndicatorShown(true);
}
Ejemplo n.º 9
0
QuickLaunchLayout::QuickLaunchLayout(QWidget * parent, RazorPanel *panel)
    : QGridLayout(parent),
      m_panel(panel)
{
    setSpacing(0);
    setContentsMargins(0, 0, 0, 0);

    connect(m_panel, SIGNAL(panelRealigned()),
            this, SLOT(relayout()));
}
Ejemplo n.º 10
0
/*!
    Constructs a new QBoxLayout with direction \a dir and main widget \a
    parent. \a parent may not be 0.

    The \a margin is the number of pixels between the edge of the
    widget and its managed children. The \a spacing is the default
    number of pixels between neighboring children. If \a spacing is -1
    the value of \a margin is used for \a spacing.

    \a name is the internal object name.

    \sa direction()
*/
QBoxLayout::QBoxLayout(QWidget *parent, Direction dir,
                        int margin, int spacing, const char *name)
    : QLayout(*new QBoxLayoutPrivate, 0, parent)
{
    Q_D(QBoxLayout);
    d->dir = dir;
    setMargin(margin);
    setObjectName(QString::fromAscii(name));
    setSpacing(spacing<0 ? margin : spacing);
}
Ejemplo n.º 11
0
LibraryTabWidget::LibraryTabWidget(QWidget * parent)
  : QWidget(parent)
{
  auto mainLayout = new QVBoxLayout();

  mainLayout->setSpacing(0);

  mainLayout->setContentsMargins(0,0,0,0);

  setLayout(mainLayout);

  m_tabBar = new QWidget(this);

  m_tabBar->setFixedHeight(29);

  m_tabBar->setObjectName("VBlueGradientWidget");

  m_tabBar->setContentsMargins(0,0,5,0);

  m_removeButton = new QPushButton(this);

  QString str;
  str.append("QWidget { ");
  str.append("border: none;");
  str.append(" background-image: url(\":/images/delete.png\")");
  str.append("}");

  m_removeButton->setFlat(true);
  m_removeButton->setStyleSheet(str);
  m_removeButton->setFixedSize(20, 20);
  m_removeButton->setToolTip("Remove object");

  // Default to hide
  m_removeButton->hide();

  auto isConnected = connect(m_removeButton, SIGNAL(clicked(bool)), this, SIGNAL(removeButtonClicked(bool)));
  OS_ASSERT(isConnected);
 
  auto hLayout = new QHBoxLayout();
  hLayout->setContentsMargins(0, 0, 0, 0);
  hLayout->addStretch();
  hLayout->addWidget(m_removeButton, 0, Qt::AlignVCenter);

  m_tabBar->setLayout(hLayout);

  layout()->addWidget(m_tabBar);

  m_pageStack = new QStackedWidget();

  m_pageStack->setStyleSheet("QStackedWidget { border: none;}");

  m_pageStack->setContentsMargins(0,0,0,0);

  layout()->addWidget(m_pageStack);
}
void WindowMaterialDaylightRedirectionDeviceInspectorView::createLayout()
{
  auto hiddenWidget = new QWidget();
  this->stackedWidget()->addWidget(hiddenWidget);

  auto visibleWidget = new QWidget();
  this->stackedWidget()->addWidget(visibleWidget);

  auto mainGridLayout = new QGridLayout();
  mainGridLayout->setContentsMargins(7, 7, 7, 7);
  mainGridLayout->setSpacing(14);
  visibleWidget->setLayout(mainGridLayout);

  int row = mainGridLayout->rowCount();

  QLabel * label = nullptr;

  // Name

  label = new QLabel("Name: ");
  label->setObjectName("H2");
  mainGridLayout->addWidget(label, row, 0);

  ++row;

  m_nameEdit = new OSLineEdit2();
  mainGridLayout->addWidget(m_nameEdit, row, 0, 1, 3);

  ++row;

  // Standards Information

  m_standardsInformationWidget = new StandardsInformationMaterialWidget(m_isIP, mainGridLayout, row);

  ++row;

  // Daylight Redirection Device Type

  label = new QLabel("Daylight Redirection Device Type: ");
  label->setObjectName("H2");
  mainGridLayout->addWidget(label, row, 0);

  ++row;

  m_daylightRedirectionDeviceType = new OSComboBox2();
  mainGridLayout->addWidget(m_daylightRedirectionDeviceType, row, 0, 1, 3);

  ++row;

  // Stretch

  mainGridLayout->setRowStretch(100,100);

  mainGridLayout->setColumnStretch(100,100);
}
Ejemplo n.º 13
0
void CameraLayout::reset(){
    setSpacing( 2 );
    setMargin( 1 );
    clear();
    calculateCellsSize();
    checkLayoutDimensions();
    fill();
    d->rowCount = 0;
    d->columnCount = 0;
    d->hasSpace = true;
}
Ejemplo n.º 14
0
void UIBoxLayout::applyStyle(const OTMLNodePtr& styleNode)
{
    UILayout::applyStyle(styleNode);

    for(const OTMLNodePtr& node : styleNode->children()) {
        if(node->tag() == "spacing")
            setSpacing(node->value<int>());
        else if(node->tag() == "fit-children")
            setFitChildren(node->value<bool>());
    }
}
Ejemplo n.º 15
0
/*!
    Constructs a new vertical box called name \a name and adds it to
    \a parentLayout.

    The \a spacing is the default number of pixels between neighboring
    children. If \a spacing is -1, this QVBoxLayout will inherit its
    parent's spacing().
*/
QVBoxLayout::QVBoxLayout(QLayout *parentLayout, int spacing,
                          const char *name)
    : QBoxLayout(TopToBottom)
{
    setSpacing(spacing);
    setObjectName(QString::fromAscii(name));
    if (parentLayout) {
        setParent(parentLayout);
        parentLayout->addItem(this);
    }
}
Ejemplo n.º 16
0
    YearScaleDraw()
    {
        setTickLength( QwtScaleDiv::MajorTick, 0 );
        setTickLength( QwtScaleDiv::MinorTick, 0 );
        setTickLength( QwtScaleDiv::MediumTick, 6 );

        setLabelRotation( -60.0 );
        setLabelAlignment( Qt::AlignLeft | Qt::AlignVCenter );

        setSpacing( 15 );
    }
Ejemplo n.º 17
0
ColumnViewSettingsPage::ColumnViewSettingsPage(QWidget* parent) :
    ViewSettingsPageBase(parent),
    m_iconSizeGroupBox(0),
    m_fontRequester(0),
    m_textWidthBox(0)
{
    const int spacing = KDialog::spacingHint();
    const int margin = KDialog::marginHint();
    const QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);

    setSpacing(spacing);
    setMargin(margin);

    // Create "Icon" properties
    m_iconSizeGroupBox = new IconSizeGroupBox(this);
    m_iconSizeGroupBox->setSizePolicy(sizePolicy);

    const int min = ZoomLevelInfo::minimumLevel();
    const int max = ZoomLevelInfo::maximumLevel();
    m_iconSizeGroupBox->setDefaultSizeRange(min, max);
    m_iconSizeGroupBox->setPreviewSizeRange(min, max);

    // create "Text" properties
    QGroupBox* textGroup = new QGroupBox(i18nc("@title:group", "Text"), this);
    textGroup->setSizePolicy(sizePolicy);

    QLabel* fontLabel = new QLabel(i18nc("@label:listbox", "Font:"), textGroup);
    m_fontRequester = new DolphinFontRequester(textGroup);

    QLabel* textWidthLabel = new QLabel(i18nc("@label:listbox", "Text width:"), textGroup);
    m_textWidthBox = new KComboBox(textGroup);
    m_textWidthBox->addItem(i18nc("@item:inlistbox Text width", "Small"));
    m_textWidthBox->addItem(i18nc("@item:inlistbox Text width", "Medium"));
    m_textWidthBox->addItem(i18nc("@item:inlistbox Text width", "Large"));
    m_textWidthBox->addItem(i18nc("@item:inlistbox Text width", "Huge"));

    QGridLayout* textGroupLayout = new QGridLayout(textGroup);
    textGroupLayout->addWidget(fontLabel, 0, 0, Qt::AlignRight);
    textGroupLayout->addWidget(m_fontRequester, 0, 1);
    textGroupLayout->addWidget(textWidthLabel, 1, 0, Qt::AlignRight);
    textGroupLayout->addWidget(m_textWidthBox, 1, 1);

    // Add a dummy widget with no restriction regarding
    // a vertical resizing. This assures that the dialog layout
    // is not stretched vertically.
    new QWidget(this);

    loadSettings();

    connect(m_iconSizeGroupBox, SIGNAL(defaultSizeChanged(int)), this, SIGNAL(changed()));
    connect(m_iconSizeGroupBox, SIGNAL(previewSizeChanged(int)), this, SIGNAL(changed()));
    connect(m_fontRequester, SIGNAL(changed()), this, SIGNAL(changed()));
    connect(m_textWidthBox, SIGNAL(currentIndexChanged(int)), this, SIGNAL(changed()));
}
Ejemplo n.º 18
0
void Smb4KSharesView::setViewMode(QListView::ViewMode mode, int iconSize)
{
  //
  // Set the view mode
  //
  QListWidget::setViewMode(mode);
  
  //
  // Make adjustments
  //
  switch(mode)
  {
    case IconMode:
    {
      setUniformItemSizes(true);
      setIconSize(QSize(iconSize, iconSize));
      setSpacing(5);
      break;
    }
    case ListMode:
    {
      setUniformItemSizes(false);
      setIconSize(QSize(iconSize, iconSize));
      setSpacing(0);
      break;
    }
    default:
    {
      break;
    }
  }
  
  //
  // Align the items 
  //
  for (int i = 0; i < count(); ++i)
  {
    Smb4KSharesViewItem *viewItem = static_cast<Smb4KSharesViewItem *>(item(i));
    viewItem->setItemAlignment(mode);
  }
}
Ejemplo n.º 19
0
void PageNavigator::createLayout()
{
    auto layout = new QHBoxLayout();
    layout->setContentsMargins(0,0,0,0);
    layout->setSpacing(2);

    setLayout(layout);

    m_buttonGroup = new QButtonGroup(this);
    connect(m_buttonGroup, static_cast<void (QButtonGroup::*)(QAbstractButton *)>(&QButtonGroup::buttonClicked), this, &PageNavigator::on_buttonClicked);

    QPushButton * button = nullptr;

    ///! button first page
    button = new QPushButton(this);
    button->setIcon(QIcon(":/shared_gui_components/images/fast_reverse.png"));
    button->setFixedSize(40,20);
    button->setCheckable(false);
    connect(button, &QPushButton::clicked, this, &PageNavigator::on_firstPage);
    layout->addWidget(button);

    ///! button previous page
    button = new QPushButton(this);
    button->setIcon(QIcon(":/shared_gui_components/images/reverse.png"));
    button->setFixedSize(40,20);
    button->setCheckable(false);
    connect(button, &QPushButton::clicked, this, &PageNavigator::on_previousPage);
    layout->addWidget(button);

    ///! buttons for pages listed
    m_buttonLayout = new QHBoxLayout();
    m_buttonLayout->setContentsMargins(0,0,0,0);
    m_buttonLayout->setSpacing(2);
    layout->addLayout(m_buttonLayout);
    makeNumberedButtons();

    ///! button next page
    button = new QPushButton(this);
    button->setIcon(QIcon(":/shared_gui_components/images/forward.png"));
    button->setFixedSize(40,20);
    button->setCheckable(false);
    connect(button, &QPushButton::clicked, this, &PageNavigator::on_nextPage);
    layout->addWidget(button);

    ///! button last page
    button = new QPushButton(this);
    button->setIcon(QIcon(":/shared_gui_components/images/fast_forward.png"));
    button->setFixedSize(40,20);
    button->setCheckable(false);
    connect(button, &QPushButton::clicked, this, &PageNavigator::on_lastPage);
    layout->addWidget(button);

}
Ejemplo n.º 20
0
PlanarSurfaceWidget::PlanarSurfaceWidget(bool isIP, QWidget * parent )
  : QWidget(parent)
{
  this->setObjectName("GrayWidget");

  setUnits(isIP);

  auto layout = new QGridLayout();
  layout->setContentsMargins(7,7,7,7);
  layout->setSpacing(7);
  this->setLayout(layout);
}
Ejemplo n.º 21
0
void HangoutViewFullViewWidget::createRemoteVideoWidget()
{
  // Content.
  _videoWidget = ViewBase::createRemoteVideoWidget(ClientEntity(), this);

  // Layout.
  auto l = new QBoxLayout(QBoxLayout::TopToBottom);
  l->setContentsMargins(0, 0, 0, 0);
  l->setSpacing(0);
  l->addWidget(_videoWidget);
  setLayout(l);
}
Ejemplo n.º 22
0
CategorizedView::CategorizedView(QWidget *parent)
	: QListView(parent), m_leftMargin(5), m_rightMargin(5), m_bottomMargin(5), m_categoryMargin(5)//, m_updatesDisabled(false), m_categoryEditor(0), m_editedCategory(0)
{
	setViewMode(IconMode);
	setMovement(Snap);
	setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
	setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
	setWordWrap(true);
	setDragDropMode(QListView::InternalMove);
	setAcceptDrops(true);
	setSpacing(10);
}
Ejemplo n.º 23
0
/* 构造函数 */
FileListWidget::FileListWidget(QListWidget* parent):QListWidget(parent)
{
    setIconSize(QSize(W_ICONSIZE,H_ICONSIZE));
    setViewMode(QListView::IconMode);
    setMovement(QListView::Static);
    
    setSpacing(SPACING);

//    setContextMenuPolicy(Qt::DefaultContextMenu);
    connect(this,SIGNAL(ShowFilesSig(QStringList)),this,SLOT(ShowFiles(QStringList)));

}
Ejemplo n.º 24
0
/**
 * \brief Constructor
 * @param parent as the parent widget
 * @param name as the widget object name
 */
UBLibraryWidget::UBLibraryWidget(QWidget *parent, const char *name):UBThumbnailWidget(parent)
    , chainedElements(NULL)
    , mLibraryController(NULL)
    , mpCrntDir(NULL)
    , mpCrntElem(NULL)
    , mpTmpElem(NULL)
	, mLoadingLibraryItems(false)
{
    setObjectName(name);
    setSpacing(5);
    mLibraryController = new UBLibraryController(parentWidget());
}
Ejemplo n.º 25
0
ChannelView::ChannelView(QWidget *parent) : QListView(parent),
    showUpdated(false),
    sortBy(SortByName) {

    setItemDelegate(new ChannelItemDelegate(this));
    setSelectionMode(QAbstractItemView::NoSelection);

    // layout
    setSpacing(15);
    setFlow(QListView::LeftToRight);
    setWrapping(true);
    setResizeMode(QListView::Adjust);
    setMovement(QListView::Static);
    setUniformItemSizes(true);

    // cosmetics
    setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
    setFrameShape(QFrame::NoFrame);
    setAttribute(Qt::WA_MacShowFocusRect, false);

    QPalette p = palette();
    /*
    p.setColor(QPalette::Base, p.window().color());
    p.setColor(QPalette::Text, p.windowText().color());
    */
    p.setColor(QPalette::Disabled, QPalette::Base, p.base().color());
    p.setColor(QPalette::Disabled, QPalette::Text, p.text().color());
    setPalette(p);

    verticalScrollBar()->setPageStep(3);
    verticalScrollBar()->setSingleStep(1);

    setMouseTracking(true);

    connect(this, SIGNAL(clicked(const QModelIndex &)),
            SLOT(itemActivated(const QModelIndex &)));
    connect(this, SIGNAL(entered(const QModelIndex &)),
            SLOT(itemEntered(const QModelIndex &)));

    channelsModel = new ChannelModel(this);
    setModel(channelsModel);
    connect(this, SIGNAL(viewportEntered()),
            channelsModel, SLOT(clearHover()));

    setupActions();

    connect(ChannelAggregator::instance(), SIGNAL(channelChanged(YTChannel*)),
            channelsModel, SLOT(updateChannel(YTChannel*)));
    connect(ChannelAggregator::instance(), SIGNAL(unwatchedCountChanged(int)),
            SLOT(unwatchedCountChanged(int)));

    unwatchedCountChanged(ChannelAggregator::instance()->getUnwatchedCount());
}
Ejemplo n.º 26
0
void QToolBarLayout::updateMarginAndSpacing()
{
    QToolBar *tb = qobject_cast<QToolBar*>(parentWidget());
    if (!tb)
        return;
    QStyle *style = tb->style();
    QStyleOptionToolBar opt;
    tb->initStyleOption(&opt);
    setMargin(style->pixelMetric(QStyle::PM_ToolBarItemMargin, &opt, tb)
                + style->pixelMetric(QStyle::PM_ToolBarFrameWidth, &opt, tb));
    setSpacing(style->pixelMetric(QStyle::PM_ToolBarItemSpacing, &opt, tb));
}
TouchScreenMenu::TouchScreenMenu(TouchScreenMenuItem items[]){
    _controller = &TSC;
    setSpacing(5);
    setPadding(2);
    setFontSize(2);
    setTitleFontSize(2);
    setJustification(LEFTJ);
    setItems(items);
    setTitle(NULL);
    setTitleColors(0xffff, 0x001f);
    setClearScreenOnDraw(false);
}
TouchScreenMenu::TouchScreenMenu(TouchScreenMenuItem items[], unsigned int fontSize, unsigned int spacing, unsigned int padding, Justify justify, char *title){
    _controller = &TSC;
    setSpacing(spacing);
    setPadding(padding);
    setFontSize(fontSize);
    setTitleFontSize(2);
    setJustification(justify);
    setItems(items);
    setTitle(title);
    setTitleColors(0xffff, 0x001f);
    setClearScreenOnDraw(false);
}
Ejemplo n.º 29
0
ofxLiteGroup::ofxLiteGroup(string name) : ofxLiteBox(name){
	setSpacing();
	setMaxHeight();
	setHoverable(false);
	setDraggable(false);
	setSelectable(false);
	setTriggerable(false);
	setSortable(false, false);
	singleSelected = NULL;
	setSingleSelect(false);
	dragBox = NULL;
}
Ejemplo n.º 30
0
NewGroupView::NewGroupView(bool t_fixed, bool t_fixedOnly)
  : QWidget()
{
  setSizePolicy(QSizePolicy::Preferred,QSizePolicy::Fixed);
  setMaximumWidth(660);

  auto mainVLayout = new QVBoxLayout();
  mainVLayout->setContentsMargins(5,5,5,5);
  mainVLayout->setSpacing(5);
  setLayout(mainVLayout);

  auto newGroupHLayout = new QHBoxLayout();
  newGroupHLayout->setContentsMargins(0,0,0,0);
  newGroupHLayout->setSpacing(5);
  mainVLayout->addLayout(newGroupHLayout);

  auto addIconLabel = new QLabel();
  addIconLabel->setPixmap(QPixmap(":/shared_gui_components/images/gray_add_icon.png"));
  addIconLabel->setFixedSize(16,16);
  newGroupHLayout->addWidget(addIconLabel);

  QLabel * newGroupLabel;

  if (t_fixed)
  {
    if (t_fixedOnly)
    {
      newGroupLabel = new QLabel("<i><b>New Always Run Measure</b><i>");
    } else {
      newGroupLabel = new QLabel("<i><b>New Always Run Measure</b> (This measure is applied to the baseline and all design alternatives)<i>");
    }
  } else {
    newGroupLabel = new QLabel("<b>New Measure Group</b> (One measure from this group can be applied to each design alternative)");
  }

  newGroupHLayout->addWidget(newGroupLabel);

  dropZone = new NewGroupDropZone(t_fixed);
  mainVLayout->addWidget(dropZone);
}