GofunDesktopEntrySettingsWidget::GofunDesktopEntrySettingsWidget(QWidget* parent) : QFrame(parent)
{
	setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Fixed);

	QGridLayout* grid = new QGridLayout(this,3,3);
	grid->layout()->setMargin(3);
	grid->layout()->setSpacing(1);
	
	caption = new QLineEdit(this);
	comment = new QLineEdit(this);
	icon_button = new QToolButton(this);
	icon_button->setFixedWidth(32);
	icon_button->setFixedHeight(32);
	QToolButton* more = new QToolButton(Qt::RightArrow,this);
	more->setFixedHeight(7);
	
	connect(more,SIGNAL(clicked()),this,SLOT(showMoreSettings()));
	connect(caption,SIGNAL(textChanged(const QString&)),this,SLOT(guessIcon(const QString&)));
	
	grid->addWidget(icon_button,0,0);
	grid->addWidget(new QLabel(tr("Caption"),this),0,1);
	grid->addWidget(caption,0,2);
	grid->addWidget(new QLabel(tr("Comment"),this),1,0);
	grid->addMultiCellWidget(comment,1,1,1,2);
	grid->addMultiCellWidget(more,2,2,0,2);
}
Exemple #2
0
QToolBar* MainWindow::createFormatToolBar()
{
    QToolBar *pFormatBar = new QToolBar();
    pFormatBar->setWindowTitle( "Format Bar" );

    m_pCmbFont = new QFontComboBox;
    m_pCmbFont->setEditable( false );
    m_pCmbFont->setFocusPolicy( Qt::NoFocus );
    m_pCmbFontPointSize = new QComboBox;
    updateFontPointSize( m_pCmbFont->currentText() );
    m_pCmbFontPointSize->setFocusPolicy( Qt::NoFocus );
    QToolButton *pBtnMoreOptions = new QToolButton;
    pBtnMoreOptions->setText( "More..." );
    pBtnMoreOptions->setStyleSheet( "border: 1px solid #000000" );
    pBtnMoreOptions->setFixedHeight( 20 );
    pBtnMoreOptions->setFocusPolicy( Qt::NoFocus );

    pFormatBar->addWidget( m_pCmbFont );
    pFormatBar->addWidget( m_pCmbFontPointSize );
    pFormatBar->addWidget( pBtnMoreOptions );

    connect( m_pCmbFont, SIGNAL(currentIndexChanged(int)), this, SLOT(onFontFamilyChanged()) );
    connect( m_pCmbFontPointSize, SIGNAL(currentIndexChanged(int)), this, SLOT(onFontPointSizeChanged()) );
    connect( pBtnMoreOptions, SIGNAL(clicked()), this, SLOT(onFormatMoreBtnClicked()) );

    return pFormatBar;
}
Exemple #3
0
QToolButton* MenyBar::createButton(QString title) {
    QToolButton *genericButton = new QToolButton(this);
    genericButton->setText(title);
    genericButton->setFixedHeight(50);
    genericButton->setFixedWidth(100);
    return genericButton;

}
Exemple #4
0
QToolButton* ProcessingManager::getButton(const QString& icon, const QString& text, const QString& tooltip) {
    QToolButton* button = new QToolButton();
    button->setIcon(ApplicationData::icon(icon));
    button->setText(text);
    button->setIconSize(QSize(32, 32));
    button->setFixedHeight(60);
    button->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
    button->setToolTip("Remove all images from queue");
    return button;
}