Example #1
0
FavoriteEditor::FavoriteEditor( QWidget* parent, Qt::WindowFlags f )
    : QDialog(parent, f)
{
    setupUi(this);

    add_button->setIcon( Images::icon("bookmark_add") );
    add_submenu_button->setIcon( Images::icon("bookmark_folder") );
    delete_button->setIcon( Images::icon("delete") );
    delete_all_button->setIcon( Images::icon("trash") );
    up_button->setIcon( Images::icon("up") );
    down_button->setIcon( Images::icon("down") );

    table->setColumnCount(3);
    table->setHorizontalHeaderLabels(QStringList() << tr("Icon") << tr("Name") << tr("Media") );

    table->setAlternatingRowColors(true);
    table->horizontalHeader()->setResizeMode(COL_FILE, QHeaderView::Stretch);

    table->setSelectionBehavior(QAbstractItemView::SelectRows);
    table->setSelectionMode(QAbstractItemView::ExtendedSelection);

    table->setItemDelegateForColumn( COL_NAME, new FEDelegate(table) );
    table->setItemDelegateForColumn( COL_FILE, new FEDelegate(table) );

    connect(table, SIGNAL(cellActivated(int,int)), this, SLOT(edit_icon(int,int)));

    setWindowTitle( tr("Favorite editor") );

    setCaption( tr("Favorite list") );
    setIntro( tr("You can edit, delete, sort or add new items. Double click on "
                 "a cell to edit its contents.") );

    setDialogIcon( Images::icon("favorite") );
}
Example #2
0
void NBDialog::setupDialogProperties() {

	/* Dialogs without close button */
	setWindowFlags( Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint );

	/* NewBreeze speciality */
	setDialogIcon( QIcon( ":/icons/newbreeze.png" ) );

	setWindowModality( Qt::ApplicationModal);

	/* Size and Size policy */
	setMinimumSize( 500, 75 );
	setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed ) );
};