QvisSequenceView::QvisSequenceView(QWidget *parent) : QTableView(parent)
{
    // Create a sequence mapping model that we'll use to store sequence data.
    QvisSequenceMappingModel *m = new QvisSequenceMappingModel(this);
    setModel(m);
    connect(m,    SIGNAL(updatedMapping(const QString &,const QStringList &)),
            this, SIGNAL(updatedMapping(const QString &,const QStringList &)));
    connect(m,    SIGNAL(updatedMapping(const QString &,const QStringList &,const QString &,const QStringList &)),
            this, SIGNAL(updatedMapping(const QString &,const QStringList &,const QString &,const QStringList &)));

    setItemDelegate(new SequenceDelegate(this));

    setShowGrid(false);
    setAlternatingRowColors(true);
    setSelectionBehavior(QAbstractItemView::SelectItems);
    setSelectionMode(QAbstractItemView::SingleSelection);

    horizontalHeader()->hide();
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
    verticalHeader()->setResizeMode(QHeaderView::ResizeToContents);
#else
    verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
#endif

    setTextElideMode(Qt::ElideMiddle);

    setDragEnabled(true);
    setAcceptDrops(true);
    setDropIndicatorShown(true);
}
Exemple #2
0
//----------------------------------------------------------------------------------------
FileListWidget::FileListWidget(int rows, int columns, QWidget *parent) :
    QTableWidget(rows, columns, parent)
{
    QStringList headers;
    headers << tr("Name");
    headers << tr("Size");
    headers << tr("Type");
    headers << tr("Date");
    headers << tr("UUID");

    setEditTriggers(QTableWidget::NoEditTriggers);
    setSelectionBehavior(QAbstractItemView::SelectRows);
    setHorizontalHeaderLabels(headers);
    horizontalHeader()->setSelectionBehavior(QAbstractItemView::SelectItems);
    verticalHeader()->setVisible(false);
    setShowGrid(false);
    setColumnWidth(0, 450);
    setColumnWidth(1, 80);
    setColumnWidth(2, 120);
    setColumnWidth(3, 120);
    setColumnWidth(4, 200);

    setAcceptDrops(true);
    setContextMenuPolicy(Qt::CustomContextMenu);
}
SyncErrorsTableView::SyncErrorsTableView(QWidget *parent)
    : QTableView(parent)
{
    verticalHeader()->hide();
    verticalHeader()->setDefaultSectionSize(36);
    horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
    horizontalHeader()->setStretchLastSection(true);
    horizontalHeader()->setCascadingSectionResizes(true);
    horizontalHeader()->setHighlightSections(false);
    horizontalHeader()->setDefaultAlignment(Qt::AlignLeft | Qt::AlignVCenter);

    setGridStyle(Qt::NoPen);
    setShowGrid(false);
    setContentsMargins(0, 0, 0, 0);
    setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);

    setSelectionBehavior(QAbstractItemView::SelectRows);
    setSelectionMode(QAbstractItemView::ExtendedSelection);
    setMouseTracking(true);

    createContextMenu();

    connect(this, SIGNAL(doubleClicked(const QModelIndex&)),
            this, SLOT(onItemDoubleClicked(const QModelIndex&)));
}
gpTraceSummaryTable::gpTraceSummaryTable(gpTraceDataContainer* pDataContainer, gpTraceView* pSessionView, eCallType callType)
    : acListCtrl(nullptr), m_callType(callType), m_pSessionDataContainer(pDataContainer), m_pTraceView(pSessionView), m_lastSelectedRowIndex(-1)
{
    QStringList columnCaptions;
    columnCaptions << GP_STR_SummaryTableColumnCall;
    columnCaptions << GP_STR_SummaryTableColumnMaxTime;
    columnCaptions << GP_STR_SummaryTableColumnMinTime;
    columnCaptions << GP_STR_SummaryTableColumnAvgTime;
    columnCaptions << GP_STR_SummaryTableColumnCumulativeTime;
    columnCaptions << GP_STR_SummaryTableColumnPercentageOfTotalTime;
    columnCaptions << GP_STR_SummaryTableColumnNumberOfCalls;
    initHeaders(columnCaptions, false);
    setShowGrid(true);

    m_logic.Init(m_callType, m_pSessionDataContainer, pSessionView);

    // fill Table widget
    FillTable();
    setSortingEnabled(true);
    setSelectionMode(QAbstractItemView::SingleSelection);
    setContextMenuPolicy(Qt::NoContextMenu);

    // Connect to the cell entered signal
    setMouseTracking(true);
    bool rc = connect(this, SIGNAL(cellEntered(int, int)), this, SLOT(OnCellEntered(int, int)));
    GT_ASSERT(rc);
}
Exemple #5
0
FileTransferWidget::FileTransferWidget(QWidget * pParent)
    : KviTalTableWidget(pParent)
{
	//hide the header
	verticalHeader()->hide();
	//hide cells grids
	setShowGrid(false);
	//disable cell content editing
	setEditTriggers(QAbstractItemView::NoEditTriggers);

	//select one row at once
	setSelectionBehavior(QAbstractItemView::SelectRows);
	setSelectionMode(QAbstractItemView::SingleSelection);

	//prepare columns
	setColumnCount(3);

	QStringList colHeaders;
	colHeaders << __tr2qs_ctx("Type", "filetransferwindow")
	           << __tr2qs_ctx("Information", "filetransferwindow")
	           << __tr2qs_ctx("Progress", "filetransferwindow");
	setHorizontalHeaderLabels(colHeaders);
	//default column widths
	setColumnWidth(0, FILETRANSFERW_CELLSIZE);
	horizontalHeader()->setSectionResizeMode(0, QHeaderView::Fixed);
	horizontalHeader()->setSectionResizeMode(1, QHeaderView::Interactive);
	setColumnWidth(1, 500);
	horizontalHeader()->setStretchLastSection(true);
	//focus policy
	setFocusPolicy(Qt::NoFocus);
	viewport()->setFocusPolicy(Qt::NoFocus);
}
Exemple #6
0
/**
 * @brief Default constructor
 * @param parent
 */
MarbleMap::MarbleMap(QWidget *parent) :
  MarbleWidget(parent), m_gd_document(NULL),
  m_marble_runner_mgr(NULL), m_current_marker(NULL),
  m_markers_count(0), m_curr_popup_x(0), m_curr_popup_y(0)
{
  setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
  setMapThemeId("earth/bluemarble/bluemarble.dgml");
  setShowScaleBar(false);
  setShowGrid(false);
  setShowCrosshairs(false);
  setShowPlaces(false);
  setShowCities(false);
  
  MarbleWidgetInputHandler* l_h = inputHandler();
  l_h->setMouseButtonPopupEnabled(Qt::LeftButton, false);
  l_h->setMouseButtonPopupEnabled(Qt::RightButton, false);
  
  connect(l_h, SIGNAL(mouseClickScreenPosition(int,int)), this, SLOT(mouseLeftClick(int, int)));
  connect(l_h, SIGNAL(rmbRequest(int,int)), this, SLOT(mouseRightClick(int, int)));
  
  m_gd_document = new GeoDataDocument();
  model()->treeModel()->addDocument(m_gd_document);
  
  m_marble_runner_mgr = new MarbleRunnerManager(model()->pluginManager());
  m_marble_runner_mgr->setModel(model());
}
Exemple #7
0
void OnlineList::createViewTitle()
{
	// 只允许单选
	setSelectionMode(QAbstractItemView::SingleSelection);
	
	// 每次选中一行
	setSelectionBehavior(QAbstractItemView::SelectRows);
	
	// 默认不允许用户编辑数据
	setEditTriggers(QAbstractItemView::NoEditTriggers);
	
	// 使列完全填充并平分
	horizontalHeader()->setResizeMode(QHeaderView::Stretch);
	
	// 数据头左对齐
	horizontalHeader()->setDefaultAlignment(Qt::AlignHCenter);
	
	// 隐藏左边垂直列号
	// verticalHeader()->setVisible(false);
	// 设置列数
	setColumnCount(3);
	
	// 设置不显示格子线
	setShowGrid(false);
	
	// 设置表头
	setHorizontalHeaderItem(0, new QTableWidgetItem(tr("昵称")));
	setHorizontalHeaderItem(1, new QTableWidgetItem(tr("主机名")));
	setHorizontalHeaderItem(2, new QTableWidgetItem(tr("IP地址")));
}
Exemple #8
0
CodeViewWidget::CodeViewWidget()
{
  setColumnCount(5);
  setShowGrid(false);
  setContextMenuPolicy(Qt::CustomContextMenu);
  setSelectionMode(QAbstractItemView::SingleSelection);
  setSelectionBehavior(QAbstractItemView::SelectRows);

  setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);

  for (int i = 0; i < columnCount(); i++)
  {
    horizontalHeader()->setSectionResizeMode(i, QHeaderView::Fixed);
  }

  verticalHeader()->hide();
  horizontalHeader()->hide();
  horizontalHeader()->setStretchLastSection(true);

  setFont(Settings::Instance().GetDebugFont());

  Update();

  connect(this, &CodeViewWidget::customContextMenuRequested, this, &CodeViewWidget::OnContextMenu);
  connect(this, &CodeViewWidget::itemSelectionChanged, this, &CodeViewWidget::OnSelectionChanged);
  connect(&Settings::Instance(), &Settings::DebugFontChanged, this, &QWidget::setFont);
  connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, [this] {
    m_address = PC;
    Update();
  });

  connect(&Settings::Instance(), &Settings::ThemeChanged, this, &CodeViewWidget::Update);
}
Exemple #9
0
game_list_grid::game_list_grid(const QSize& icon_size, const QColor& icon_color, const qreal& margin_factor, const qreal& text_factor, const bool& showText)
	: game_list(), m_icon_size(icon_size), m_icon_color(icon_color), m_margin_factor(margin_factor), m_text_factor(text_factor), m_text_enabled(showText)
{
	QSize item_size;
	if (m_text_enabled)
	{
		item_size = m_icon_size + QSize(m_icon_size.width() * m_margin_factor * 2, m_icon_size.height() * m_margin_factor * (m_text_factor + 1));
	}
	else
	{
		item_size = m_icon_size + m_icon_size * m_margin_factor * 2;
	}

	// font by stylesheet
	QLabel font_dummy;
	font_dummy.setObjectName("gamegrid_font");
	font_dummy.ensurePolished();
	QFont font = font_dummy.font();
	QColor font_color = font_dummy.palette().color(QPalette::Foreground);

	grid_item_delegate = new game_list_grid_delegate(item_size, m_margin_factor, m_text_factor, font, font_color, this);
	setItemDelegate(grid_item_delegate);
	setSelectionBehavior(QAbstractItemView::SelectItems);
	setSelectionMode(QAbstractItemView::SingleSelection);
	setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
	setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
	setContextMenuPolicy(Qt::CustomContextMenu);
	verticalHeader()->setVisible(false);
	horizontalHeader()->setVisible(false);
	setShowGrid(false);
}
Exemple #10
0
DJSymbolTable::DJSymbolTable( int type, QWidget* parent, const QSize symbolSize )
	:QTableWidget(parent),m_type(type)
{	
	djDebug() << "DJSymbolTable constructor";
	setSelectionMode( QAbstractItemView::NoSelection );
	setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
	setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOn );
	setGridStyle( Qt::NoPen );
	setShowGrid( false );
	setSymbolSize( symbolSize );
	
	switch ( m_type ) {
	case PLAYER_SYMBOL_WIDGET: {
		setDirPath( ":/BaseRes/image/face" );
		createSymbolItems();
		break;
	}
	case MEMBER_SYMBOL_WIDGET: {
		setDirPath( "images/member" );
		createSymbolItems();
		break;
	}
	default:
		djDebug() << "symbol type error";	
		break;
	}
	
	connect( this, SIGNAL(itemClicked(QTableWidgetItem *)),SLOT(handleItemClicked(QTableWidgetItem *)));
	connect( this, SIGNAL(itemDoubleClicked(QTableWidgetItem *)),SLOT(handleItemDoubleClicked(QTableWidgetItem *)));
	
	djDebug() << "DJSymbolTable constructor end";
}
FolderView::FolderView(QWidget *parent /*=0*/)
 : QTableView(parent)
{
  setObjectName("FolderView");

  //FileSystemModel *fsm = new FileSystemModel();
  //fsm->setRootPath(path);
  //fsm->setReadOnly(false);
  //fsm->setSorting( QDir::DirsFirst | QDir::IgnoreCase );
  //setModel(fsm);

  setSortingEnabled(false);
  setShowGrid(false);
  setWordWrap(false);
  setSelectionMode(QAbstractItemView::ExtendedSelection);
  setSelectionBehavior(QAbstractItemView::SelectRows);

  verticalHeader()->hide();
  horizontalHeader()->setSortIndicator(0, Qt::AscendingOrder);
  horizontalHeader()->setSortIndicatorShown(true);
  //horizontalHeader()->setClickable(true); // not qt 5.1

  connect(this, SIGNAL(doubleClicked(const QModelIndex &)),
          this, SLOT(doubleClicked(const QModelIndex &)));
  connect(this, SIGNAL(directoryLoaded(const QString &)),
          this, SLOT(directoryLoaded(const QString &)));
}
FilmsViewList::FilmsViewList( QWidget* parent ) : QTableView( parent )
{
      // Appearance
    setAlternatingRowColors( true );
    setHorizontalScrollMode( QAbstractItemView::ScrollPerPixel );
    setSelectionBehavior( QAbstractItemView::SelectRows );
    setSelectionMode( QAbstractItemView::ExtendedSelection );
    setVerticalScrollMode( QAbstractItemView::ScrollPerPixel );
    setEditTriggers( QAbstractItemView::NoEditTriggers );
    setContextMenuPolicy( Qt::CustomContextMenu );
    setSortingEnabled( true );
    setShowGrid( false );

    verticalHeader()->setVisible( false );
    horizontalHeader()->setSectionsMovable( true );
    horizontalHeader()->setHighlightSections( false );
    horizontalHeader()->setStretchLastSection( true );
    horizontalHeader()->setDefaultSectionSize( 50 );
    horizontalHeader()->setMinimumSectionSize( 20 );
    horizontalHeader()->setContextMenuPolicy( Qt::CustomContextMenu );

      // Signals
    connect( horizontalHeader(), &QHeaderView::customContextMenuRequested, this, &FilmsViewList::ShowHeaderContextMenu );

    connect( this, SIGNAL(activated(QModelIndex)), this, SIGNAL(CurrentActivated(QModelIndex)) );

    connect( this, &QTableView::customContextMenuRequested, this, [this] (const QPoint& pos)
    {
        if( currentIndex().isValid() )
        {
            emit ContextMenuRequested( pos, selectionModel()->currentIndex() );
        }
    });
}
Exemple #13
0
lmcImagePicker::lmcImagePicker(
        QWidget *parent,
        QList<QString>* source,
        int picSize,
        int columns,
        int* selected,
        int actionIndex )
    : QTableWidget(parent)
{
	setMouseTracking(true);

	setBackgroundRole(QPalette::Window);
	setIconSize(QSize(picSize, picSize));
	setFrameShape(QFrame::NoFrame);
	setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
	setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
	setEditTriggers(QAbstractItemView::NoEditTriggers);
	setSelectionMode(QAbstractItemView::NoSelection);
	setShowGrid(false);
	horizontalHeader()->setVisible(false);
	verticalHeader()->setVisible(false);
	setStyleSheet("QTableWidget { padding: 4px }");	// padding around table

	max_col = columns;
	int max_row = qCeil(source->count() / (qreal)max_col);

	setColumnCount(max_col);
	setRowCount(max_row);

	int cellSize = picSize + 8;
	verticalHeader()->setDefaultSectionSize(cellSize);
	verticalHeader()->setMinimumSectionSize(cellSize);
	horizontalHeader()->setDefaultSectionSize(cellSize);
	horizontalHeader()->setMinimumSectionSize(cellSize);

	//	set min and max size of table, with padding included
	setMinimumSize(max_col * cellSize + 8, max_row * cellSize + 8);
	setMaximumSize(max_col * cellSize + 8, max_row * cellSize + 8);

	for(int i = 0; i < max_row; i++) {
		for(int j = 0; j < max_col; j++) {
			int k = (i * max_col) + j;

			QTableWidgetItem* item = new QTableWidgetItem();
			item->setData(TypeRole, 0);
			if(k < source->count()) {
				item->setIcon(QIcon(source->value(k)));
				item->setData(TypeRole, 1);
				item->setSizeHint(QSize(picSize, picSize));
				item->setBackground(this->palette().window());
			}
			setItem(i, j, item);
		}
	}

	this->actionIndex = actionIndex;
	this->selected = selected;
	this->hoverItem = NULL;
}
Exemple #14
0
RDTableView::RDTableView(QWidget *parent)
  : QTableView(parent)
{
  setShowGrid(false);
  setWordWrap(false);
  setSelectionMode(QAbstractItemView::SingleSelection);
  setSelectionBehavior(QAbstractItemView::SelectRows);
}
DataViewTable::DataViewTable(QWidget* parent, const char* name)
    : QTable(parent, name), sort_column_(-1), selector_(NULL) {
  setNumRows(0);
  setNumCols(0);
  setShowGrid(true);
  setSelectionMode(QTable::MultiRow);
  setSorting(true);
}
Exemple #16
0
QOrmTableView::QOrmTableView(QWidget *parent) :
    QTableView(parent)
{
   setSelectionMode(QAbstractItemView::SingleSelection);
   setSelectionBehavior(QAbstractItemView::SelectRows);
   setShowGrid(false);
  // verticalHeader()->setResizeMode(QHeaderView::ResizeToContents);
   //horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents);
}
Exemple #17
0
View::Invoicing::OperationTable::OperationTable(QWidget *parent)
    : QTableView(parent)
{
    setAlternatingRowColors(true);
    setShowGrid(false);
    setSelectionMode(QAbstractItemView::SingleSelection);
    setSelectionBehavior(QAbstractItemView::SelectRows);
    setEditTriggers(QAbstractItemView::AnyKeyPressed | QAbstractItemView::DoubleClicked);
}
Exemple #18
0
void Mg3dScene::keyPressEvent(QKeyEvent* event)
{
	QGLView::keyPressEvent(event);
	if(event->key() == Qt::Key_G && event->modifiers().testFlag(Qt::ControlModifier))
		setShowGrid(!showGrid());

	if(event->key() == Qt::Key_R && event->modifiers().testFlag(Qt::ControlModifier))
		setShowReference(!showReference());
}
Exemple #19
0
int Q3Table::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = Q3ScrollView::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 58)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 58;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< int*>(_v) = numRows(); break;
        case 1: *reinterpret_cast< int*>(_v) = numCols(); break;
        case 2: *reinterpret_cast< bool*>(_v) = showGrid(); break;
        case 3: *reinterpret_cast< bool*>(_v) = rowMovingEnabled(); break;
        case 4: *reinterpret_cast< bool*>(_v) = columnMovingEnabled(); break;
        case 5: *reinterpret_cast< bool*>(_v) = isReadOnly(); break;
        case 6: *reinterpret_cast< bool*>(_v) = sorting(); break;
        case 7: *reinterpret_cast< SelectionMode*>(_v) = selectionMode(); break;
        case 8: *reinterpret_cast< FocusStyle*>(_v) = focusStyle(); break;
        case 9: *reinterpret_cast< int*>(_v) = numSelections(); break;
        }
        _id -= 10;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: setNumRows(*reinterpret_cast< int*>(_v)); break;
        case 1: setNumCols(*reinterpret_cast< int*>(_v)); break;
        case 2: setShowGrid(*reinterpret_cast< bool*>(_v)); break;
        case 3: setRowMovingEnabled(*reinterpret_cast< bool*>(_v)); break;
        case 4: setColumnMovingEnabled(*reinterpret_cast< bool*>(_v)); break;
        case 5: setReadOnly(*reinterpret_cast< bool*>(_v)); break;
        case 6: setSorting(*reinterpret_cast< bool*>(_v)); break;
        case 7: setSelectionMode(*reinterpret_cast< SelectionMode*>(_v)); break;
        case 8: setFocusStyle(*reinterpret_cast< FocusStyle*>(_v)); break;
        }
        _id -= 10;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 10;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 10;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 10;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 10;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 10;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 10;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}
Exemple #20
0
void ParameterTable::initTable()
{
  setRowCount(0);
  setSelectionMode(QTableWidget::NoSelection);

  mpComboDelegate = new CQComboDelegate(NULL, this);
  setItemDelegateForColumn(2, mpComboDelegate);

  setShowGrid(false);
}
PluginsView::PluginsView(QWidget *parent) :
    QTableView(parent)
{
    verticalHeader()->hide();
    horizontalHeader()->hide();
    //setSelectionBehavior(QAbstractItemView::SelectRows);
    setSelectionMode(QAbstractItemView::NoSelection);
    setEditTriggers(NoEditTriggers);
    setShowGrid(false);
}
Exemple #22
0
CTableView::CTableView(QWidget *parent)
    : QTableView(parent),
      m_activeDelegate(),
      m_inactiveDelegate()
{
    setShowGrid(false);
    horizontalHeader()->hide();
    verticalHeader()->hide();
    horizontalHeader()->setMinimumSectionSize(1);
    verticalHeader()->setMinimumSectionSize(1);
    setSelectionMode(QAbstractItemView::NoSelection);
}
My_Layers::My_Layers()
        : QTableWidget()
{
        setShowGrid(TRUE);
        setFocusPolicy(Qt::NoFocus);
	setSelectionMode(QAbstractItemView::NoSelection);	//Seleziono io dal codice, che è meglio
        verticalHeader()->hide();
	horizontalHeader()->hide();		
	setEditTriggers(QAbstractItemView::NoEditTriggers);	//Le caselle non sono editabili

	setIconSize(QSize(20,20));	//Imposto tutte le icone sulla dimensione 20x20 pixel
}
Exemple #24
0
/* QTable Subclass */
SeView::SeView(QWidget* parent) : QTableWidget(parent)
{
    setDragEnabled(true);
    setAcceptDrops(true);
    setDropIndicatorShown(true);
//	viewport()->setAcceptDrops(true);
    setShowGrid(false);
    setWordWrap(true);
    Mpressed = false;
    Namen = true;
// 	setFocusPolicy(Qt::NoFocus);
}
Exemple #25
0
PoitemTableView::PoitemTableView(QWidget* parent) :
  QTableView(parent)
{
  PoitemTableDelegate *delegate = new PoitemTableDelegate(this);
  setItemDelegate(delegate);
  setShowGrid(false);

#ifdef Q_WS_MAC
  QFont f = font();
  f.setPointSize(f.pointSize() - 2);
  setFont(f);
#endif
}
	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	//
	// KviCanvasItemPropertiesWidget
	//
	KviCanvasItemPropertiesWidget::KviCanvasItemPropertiesWidget(QWidget * par)
	: QTable(par)
	{
		setSelectionMode(QTable::NoSelection);
		setColumnMovingEnabled(false);
		setRowMovingEnabled(false);
		setShowGrid(true);
		setNumCols(2);
		setSorting(false);
		setLeftMargin(0);
		verticalHeader()->hide();
		connect(this,SIGNAL(valueChanged(int,int)),this,SLOT(cellEdited(int,int)));
	}
Exemple #27
0
AMScanTableView::AMScanTableView(QWidget *parent) :
	QTableView(parent)
{
	setAlternatingRowColors(true);
	setSelectionBehavior(QAbstractItemView::SelectRows);
	setSelectionMode(QAbstractItemView::ExtendedSelection);
	verticalHeader()->setVisible(false);
	setShowGrid(false);
	QFont newFont = font();
	newFont.setPointSize(10);
	setFont(newFont);
	setContextMenuPolicy(Qt::CustomContextMenu);
	setSortingEnabled(true);
}
DropTableWidget::DropTableWidget(QWidget *parent) : QTableWidget(parent)
{
    //set widget default properties:
        setFrameStyle(QFrame::Sunken | QFrame::StyledPanel);
        setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
        setEditTriggers(QAbstractItemView::NoEditTriggers);
        setDragDropMode(QAbstractItemView::DropOnly);
        setDefaultDropAction(Qt::IgnoreAction);
        setAlternatingRowColors(true);
        setSelectionMode(QAbstractItemView::NoSelection);
        setShowGrid(false);
        setWordWrap(false);
        setAcceptDrops(true);
}
TransactionViewTable::TransactionViewTable(QWidget *parent)
: QTableView(parent)
{

    setSelectionBehavior(QAbstractItemView::SelectItems);
    setSelectionMode(QAbstractItemView::NoSelection);
    setSortingEnabled(true);
    sortByColumn(TransactionTableModel::Date, Qt::DescendingOrder);
    verticalHeader()->hide();
    setShowGrid(false);

    // Turn manual resize grab handles off.
    horizontalHeader()->setResizeMode(QHeaderView::Fixed);
}
Exemple #30
0
/** @brief Default constructor.
 * Initializes the object and does some UI-related things.
 *
 * @param parent pointer to the parent QWidget.
 */
View::View (QWidget *parent)
: QTableView (parent)
{
	QHeaderView *hh = horizontalHeader ();
	hh->setSortIndicatorShown (false);
	hh->setStretchLastSection (true);
	hh->setMovable (true);
	
	setShowGrid (false);
	setEditTriggers (QAbstractItemView::DoubleClicked);
	setSelectionBehavior (QAbstractItemView::SelectRows);
	setSelectionMode (QAbstractItemView::SingleSelection);
	setAlternatingRowColors (true);
}