MCPcopy Create free account
hub / github.com/baumgarr/nixnote2 / DateTimeEditor

Method DateTimeEditor

gui/browserWidgets/datetimeeditor.cpp:33–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31extern Global global;
32
33DateTimeEditor::DateTimeEditor(QWidget *parent) :
34 QDateTimeEdit(parent)
35{
36 this->setFont(global.getGuiFont(font()));
37
38 QPalette pal;
39 pal.setColor(QPalette::Text, QColor(14,28,209));
40 pal.setColor(backgroundRole(), QPalette::Base);
41 setPalette(pal);
42
43 inactiveColor = "QDateTimeEdit {background-color: transparent; border-radius: 1px;} QDateTimeEdit:hover {border: 1px solid #808080; background-color: white; border-radius: 4px;} QDateTimeEdit::up-button {width: 0px; image:none;} QDateTimeEdit::down-button{width: 0px; image: none;}";
44 activeColor = "QDateTimeEdit {border: 1px solid #808080; background-color: white; border-radius: 4px;} QDateTimeEdit::up-button {width: 14px;} QDateTimeEdit::down-button{width: 14px;}";
45
46 //editor.setCalendarPopup(true);
47 //display.setStyleSheet(inactiveColor);
48 setStyleSheet(inactiveColor);
49 setCalendarPopup(true);
50
51 setCursor(Qt::PointingHandCursor);
52
53 connect(this, SIGNAL(dateChanged(QDate)), this, SLOT(valueChanged()));
54 connect(this, SIGNAL(timeChanged(QTime)), this, SLOT(valueChanged()));
55 this->setDisplayFormat(global.dateFormat + " " +global.timeFormat);
56
57 hide();
58}
59
60
61

Callers

nothing calls this directly

Calls 2

getGuiFontMethod · 0.80
setColorMethod · 0.80

Tested by

no test coverage detected