-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from BreeDurbin/item-delegate
added CStyleItemDelegate
- Loading branch information
Showing
17 changed files
with
150 additions
and
55 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include "include/cstyleditemdelegate.hpp" | ||
|
||
|
||
CStyledItemDelegate::CStyledItemDelegate(QObject *parent) : QStyledItemDelegate(parent) | ||
{ | ||
} | ||
|
||
void CStyledItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const | ||
{ | ||
QStyledItemDelegate::paint(painter, option, index); | ||
} | ||
|
||
QSize CStyledItemDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const | ||
{ | ||
return QStyledItemDelegate::sizeHint(option, index); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include "include/ctableview.hpp" | ||
|
||
#include <QHeaderView> | ||
|
||
CTableView::CTableView(const QString text, QWidget *parent){ | ||
this->viewport()->setAutoFillBackground(false); | ||
this->setAutoFillBackground(false); | ||
this->setFrameStyle(QFrame::NoFrame); | ||
this->horizontalHeader()->hide(); | ||
this->verticalHeader()->hide(); | ||
this->setShowGrid(false); | ||
this->setColumnWidth(0, 200); | ||
|
||
} | ||
|
||
CTableView::~CTableView(){}; | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include<QStyledItemDelegate> | ||
|
||
class CStyledItemDelegate : public QStyledItemDelegate | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
|
||
CStyledItemDelegate(QObject *parent = nullptr); | ||
|
||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override; | ||
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#pragma once | ||
|
||
#include <QTableView> | ||
|
||
class CTableView : public QTableView | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit CTableView(const QString text = "", QWidget *parent = nullptr); | ||
~CTableView(); | ||
|
||
private: | ||
// Add any private member variables or functions here | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters