QTfrontend/ui/page/pageroomslist.cpp
changeset 9999 8f2dc49262c3
parent 9998 736015b847e3
child 10108 c68cf030eded
equal deleted inserted replaced
9998:736015b847e3 9999:8f2dc49262c3
    51     setCurrentIndex(moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier));
    51     setCurrentIndex(moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier));
    52 }
    52 }
    53 
    53 
    54 QLayout * PageRoomsList::bodyLayoutDefinition()
    54 QLayout * PageRoomsList::bodyLayoutDefinition()
    55 {
    55 {
       
    56     // TODO move stylesheet stuff into css/qt.css
       
    57 
    56     QVBoxLayout * pageLayout = new QVBoxLayout();
    58     QVBoxLayout * pageLayout = new QVBoxLayout();
    57     pageLayout->setSpacing(0);
    59     pageLayout->setSpacing(0);
    58 
    60 
    59     QGridLayout * topLayout = new QGridLayout();
    61     QGridLayout * topLayout = new QGridLayout();
    60     topLayout->setSpacing(0);
    62     topLayout->setSpacing(0);
    61     pageLayout->addLayout(topLayout, 0);
    63     pageLayout->addLayout(topLayout, 0);
    62 
    64 
    63     // State button
    65     // State button
    64 
    66 
    65     QPushButton * btnState = new QPushButton(tr("Room state"));
    67     QPushButton * btnState = new QPushButton(tr("Room state"));
    66     btnState->setStyleSheet("QPushButton { padding: 2px; margin: 0px; margin-right: 10px; border-bottom: none; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; } QPushButton:pressed { background-color: #ffcc00; border-color: #ffcc00; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; color: #11084A; }");
    68     btnState->setStyleSheet("QPushButton { background-color: #F6CB1C; border-color: #F6CB1C; color: #130F2A; padding: 1px 3px 3px 3px; margin: 0px; border-bottom: none; border-radius: 0px; border-top-left-radius: 10px; } QPushButton:hover { background-color: #FFEB3C; border-color: #F6CB1C; color: #000000 } QPushButton:pressed { background-color: #FFEB3C; border-color: #F6CB1C; color: #000000; }");
    67     btnState->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
    69     btnState->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
    68 
    70 
    69     // State menu
    71     // State menu
    70 
    72 
    71     QMenu * stateMenu = new QMenu(btnState);
    73     QMenu * stateMenu = new QMenu(btnState);
    80     btnState->setMenu(stateMenu);
    82     btnState->setMenu(stateMenu);
    81 
    83 
    82     // Help/prompt message at top
    84     // Help/prompt message at top
    83     QLabel * lblDesc = new QLabel(tr("Search for a room:"));
    85     QLabel * lblDesc = new QLabel(tr("Search for a room:"));
    84     lblDesc->setObjectName("lblDesc");
    86     lblDesc->setObjectName("lblDesc");
    85     lblDesc->setStyleSheet("#lblDesc { color: #130F2A; background: #F6CB1C; border: solid 4px #F6CB1C; border-top-left-radius: 10px; padding: 4px 10px;}");
    87     lblDesc->setStyleSheet("#lblDesc { color: #130F2A; background: #F6CB1C; border: solid 4px #F6CB1C; padding: 5px 10px 3px 6px;}");
    86     lblDesc->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
    88     lblDesc->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
    87     lblDesc->setFixedHeight(24);
    89     lblDesc->setFixedHeight(24);
    88     lblDesc->setMinimumWidth(0);
    90     lblDesc->setMinimumWidth(0);
    89 
    91 
    90     // Search text box
    92     // Search text box