Change thumbnail bar widget layout.
This commit is contained in:
@@ -7,10 +7,10 @@
|
|||||||
#include "qpainter.h"
|
#include "qpainter.h"
|
||||||
#include "IO/DICOM/QDicomUtility.h"
|
#include "IO/DICOM/QDicomUtility.h"
|
||||||
|
|
||||||
static QString unpick_style = "*{background-color:#7f7f7f;border: 1px;}"
|
static QString unpick_style = "*{background-color:#7f7f7f;}"
|
||||||
"QLabel#m_descri{color:white}";
|
"QLabel#m_descri{color:white}";
|
||||||
|
|
||||||
static QString pick_style = "*{background-color:#c5c5c5;border: 1px;}"
|
static QString pick_style = "*{background-color:#c5c5c5;}"
|
||||||
"QLabel#m_descri{color:black;}";
|
"QLabel#m_descri{color:black;}";
|
||||||
|
|
||||||
thumbnailImage::thumbnailImage(QWidget *parent, ExtendMedicalImageProperties* property) : QFrame(parent)
|
thumbnailImage::thumbnailImage(QWidget *parent, ExtendMedicalImageProperties* property) : QFrame(parent)
|
||||||
@@ -92,28 +92,8 @@ thumbnailImage::thumbnailImage(QWidget *parent, ExtendMedicalImageProperties* pr
|
|||||||
m_descri->setText(property->GetSeriesDescription());
|
m_descri->setText(property->GetSeriesDescription());
|
||||||
m_slicenum->setText(QString("%1").arg(property->GetSliceCount()));
|
m_slicenum->setText(QString("%1").arg(property->GetSliceCount()));
|
||||||
seriesProperty = property;
|
seriesProperty = property;
|
||||||
|
this->setStyleSheet(unpick_style);
|
||||||
}
|
}
|
||||||
|
|
||||||
//void thumbnailImage::setBackgroundColor(QColor pickColor)
|
|
||||||
//{
|
|
||||||
// //m_color = pickColor;
|
|
||||||
// //update();
|
|
||||||
//}
|
|
||||||
//void thumbnailImage::paintEvent(QPaintEvent *event)
|
|
||||||
//{
|
|
||||||
// // Whether to set the title transparent;
|
|
||||||
// //if (!m_isTransparent) {
|
|
||||||
// //Set the background color;
|
|
||||||
// QPainter painter(this);
|
|
||||||
// QPainterPath pathBack;
|
|
||||||
// pathBack.setFillRule(Qt::WindingFill);
|
|
||||||
// pathBack.addRoundedRect(QRect(0, 0, this->width(), this->height()), 0, 0);
|
|
||||||
// painter.setRenderHint(QPainter::Antialiasing, true);
|
|
||||||
// painter.fillPath(pathBack, QBrush(m_color));
|
|
||||||
// //}
|
|
||||||
// QWidget::paintEvent(event);
|
|
||||||
//}
|
|
||||||
|
|
||||||
void thumbnailImage::setHighlight(bool yes) {
|
void thumbnailImage::setHighlight(bool yes) {
|
||||||
if (yes) {
|
if (yes) {
|
||||||
//setBackgroundColor(PickThumbRGB);
|
//setBackgroundColor(PickThumbRGB);
|
||||||
@@ -125,18 +105,6 @@ void thumbnailImage::setHighlight(bool yes) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//void thumbnailImage::setHighlight(bool yes) {
|
|
||||||
// QPalette p = palette();
|
|
||||||
// if (yes) {
|
|
||||||
// setAutoFillBackground(true);
|
|
||||||
// p.setColor(QPalette::Background, Qt::gray);
|
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
// //p.setColor(QPalette::Background, Qt::darkGray);
|
|
||||||
// setAutoFillBackground(false);
|
|
||||||
// }
|
|
||||||
// setPalette(p);
|
|
||||||
//}
|
|
||||||
void thumbnailImage::mouseReleaseEvent(QMouseEvent* event)
|
void thumbnailImage::mouseReleaseEvent(QMouseEvent* event)
|
||||||
{
|
{
|
||||||
emit Signal_ThumbClicked(this);
|
emit Signal_ThumbClicked(this);
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ ThumbnailBarWidget::ThumbnailBarWidget(QWidget *parent) :
|
|||||||
QBoxLayout *layout0 = new QVBoxLayout(this);
|
QBoxLayout *layout0 = new QVBoxLayout(this);
|
||||||
this->setLayout(layout0);
|
this->setLayout(layout0);
|
||||||
layout0->addWidget(scrollArea);
|
layout0->addWidget(scrollArea);
|
||||||
layout0->setContentsMargins(0, 0, 0, 0);
|
layout0->setContentsMargins(2, 1, 2, 1);
|
||||||
scrollArea->setFrameShape(QFrame::NoFrame);
|
scrollArea->setFrameShape(QFrame::NoFrame);
|
||||||
|
|
||||||
//QBoxLayout *layout1 = new QVBoxLayout(scrollArea);
|
//QBoxLayout *layout1 = new QVBoxLayout(scrollArea);
|
||||||
|
|||||||
Reference in New Issue
Block a user