Пример #1
0
    void UserPickerWidget::receivedUserAccounts(QList<QPair<uint, QString> > accounts) {
        bool serverOk = !_serverProblemsPreventLogin;

        std::sort(
            accounts.begin(), accounts.end(),
            [](const QPair<uint,QString>& u1, const QPair<uint,QString>& u2) {
                return u1.second < u2.second;
            }
        );

        _ui->loadingUserListLabel->setVisible(false);

        if (accounts.size() <= 0) {
            _ui->noUserAccountsYetLabel->setVisible(serverOk);
        }
        else {
            for (int i = 0; i < accounts.size(); ++i) {
                QString username = accounts[i].second;

                QCommandLinkButton* button =
                    new QCommandLinkButton(_ui->usersListFrame);
                button->setText(username);
                button->setDescription(QString(tr("Login as %1")).arg(username));

                connect(
                    button, &QCommandLinkButton::clicked,
                    [=]() { emit accountClicked(username); }
                );

                _ui->usersListLayout->addWidget(button);
            }
        }

        _ui->createNewAccountButton->setEnabled(serverOk);
    }
Пример #2
0
QWidget *PlayerCardDialog::createHandcardButton(){
    QCommandLinkButton *button = new QCommandLinkButton(tr("Handcard"));
    int num = player->getHandcardNum();
    if(num == 0){
        button->setDescription(tr("This guy has no any hand cards"));
        button->setEnabled(false);
    }else{
        button->setDescription(tr("This guy has %1 hand card(s)").arg(num));

        mapper->setMapping(button, -1);
        connect(button, SIGNAL(clicked()), mapper, SLOT(map()));
    }

    return button;
}
Пример #3
0
QWidget *PlayerCardDialog::createEquipArea(){
    QGroupBox *area = new QGroupBox(tr("Equip area"));
    QVBoxLayout *layout = new QVBoxLayout();

    const Weapon *weapon = player->getWeapon();
    if(weapon){
        QCommandLinkButton *button = new QCommandLinkButton(weapon->getFullName());
        button->setIcon(weapon->getSuitIcon());

        mapper->setMapping(button, weapon->getId());
        connect(button, SIGNAL(clicked()), mapper, SLOT(map()));
        layout->addWidget(button);
    }

    const Armor *armor = player->getArmor();
    if(armor){
        QCommandLinkButton *button = new QCommandLinkButton(armor->getFullName());
        button->setIcon(armor->getSuitIcon());

        mapper->setMapping(button, armor->getId());
        connect(button, SIGNAL(clicked()), mapper, SLOT(map()));
        layout->addWidget(button);
    }

    const Horse *horse = player->getDefensiveHorse();
    if(horse){
        QCommandLinkButton *button = new QCommandLinkButton(horse->getFullName() + tr("(+1 horse)"));
        button->setIcon(horse->getSuitIcon());

        mapper->setMapping(button, horse->getId());
        connect(button, SIGNAL(clicked()), mapper, SLOT(map()));
        layout->addWidget(button);
    }

    horse = player->getOffensiveHorse();
    if(horse){
        QCommandLinkButton *button = new QCommandLinkButton(horse->getFullName() + tr("(-1 horse)"));
        button->setIcon(horse->getSuitIcon());

        mapper->setMapping(button, horse->getId());
        connect(button, SIGNAL(clicked()), mapper, SLOT(map()));
        layout->addWidget(button);
    }

    if(layout->count() == 0){
        QCommandLinkButton *no_equip = new QCommandLinkButton(tr("No equip"));
        no_equip->setEnabled(false);
        return no_equip;
    }else{
        area->setLayout(layout);
        return area;
    }
}
Пример #4
0
 void retranslateUi(QMainWindow *Detection)
 {
     Detection->setWindowTitle(QApplication::translate("Detection", "Detection", 0, QApplication::UnicodeUTF8));
     actionE_xit->setText(QApplication::translate("Detection", "E&xit", 0, QApplication::UnicodeUTF8));
     action_Load_Map->setText(QApplication::translate("Detection", "&Load Map...", 0, QApplication::UnicodeUTF8));
     action_Connect->setText(QApplication::translate("Detection", "&Connect...", 0, QApplication::UnicodeUTF8));
     action_Disconnect->setText(QApplication::translate("Detection", "&Disconnect", 0, QApplication::UnicodeUTF8));
     ugvFeedLabel->setText(QApplication::translate("Detection", "No UGV Video.", 0, QApplication::UnicodeUTF8));
     connectionButton->setText(QApplication::translate("Detection", "Connect", 0, QApplication::UnicodeUTF8));
     uavFeedLabel->setText(QApplication::translate("Detection", "No UAV Video.", 0, QApplication::UnicodeUTF8));
     ugvMapLabel->setText(QApplication::translate("Detection", "No Uploaded Map.", 0, QApplication::UnicodeUTF8));
     label_2->setText(QApplication::translate("Detection", "UAV:", 0, QApplication::UnicodeUTF8));
     uavTakeoffLandButton->setText(QApplication::translate("Detection", "Take-off", 0, QApplication::UnicodeUTF8));
     label->setText(QApplication::translate("Detection", "UGV Speed:", 0, QApplication::UnicodeUTF8));
     label_3->setText(QApplication::translate("Detection", "UGV:", 0, QApplication::UnicodeUTF8));
     ugvSpeakerButton->setText(QApplication::translate("Detection", "Speakers On", 0, QApplication::UnicodeUTF8));
     label_4->setText(QApplication::translate("Detection", "Status", 0, QApplication::UnicodeUTF8));
     label_5->setText(QApplication::translate("Detection", "Connect to SAUVER:", 0, QApplication::UnicodeUTF8));
     menuFile->setTitle(QApplication::translate("Detection", "&File", 0, QApplication::UnicodeUTF8));
     menu_Tools->setTitle(QApplication::translate("Detection", "&Tools", 0, QApplication::UnicodeUTF8));
     menu_Help->setTitle(QApplication::translate("Detection", "&Help", 0, QApplication::UnicodeUTF8));
 } // retranslateUi
Пример #5
0
void MainWindow::createMenus(int parentMenu)
{
    if ( ui->scrollAreaWidgetContents->layout() != NULL ) // очистка кнопок
    {
        QLayoutItem* item;
        while ((item = ui->scrollAreaWidgetContents->layout()->takeAt(0) ) != NULL )
        {
            delete item->widget();
            delete item;
        }
        delete ui->scrollAreaWidgetContents->layout();
    }
    if (! dal_main->checkConnection())
    {
        QMessageBox::warning(this, tr("Ошибка соединения"), tr("Соединение не установлено"));
        return;
    }
    QSqlQuery *query = new QSqlQuery("SELECT * FROM is_menus WHERE menu_parent = " + QString::number(parentMenu), dal_main->db);
    query->exec();
    query->first();
    //    qDebug()<<query->lastError()<<query->size();
    ui->groupBox->setVisible(true);
    ui->scrollArea->setMinimumSize(900, 400);
    //    ui->scrollArea->setMaximumSize(800, 500);
    //    ui->groupBox_menu->setMinimumSize(800, 1000);
    QGridLayout *menuLayout = new QGridLayout(ui->scrollAreaWidgetContents);
    ui->scrollAreaWidgetContents->setLayout(menuLayout);
    int row = 0;
    int column = 0;
    //    QList<QCommandLinkButton*> list;
    //    QSequentialAnimationGroup *anim = new QSequentialAnimationGroup;
    for (int i = 0; i < query->size(); ++i)
    {
        QCommandLinkButton* mbtn = new QCommandLinkButton(query->value(1).toString());
        //        QPushButton* mbtn = new QPushButton(query->value(1).toString());
        mbtn->setText(query->value(1).toString());
        mbtn->setMinimumSize(265,70);
        mbtn->setMaximumSize(265,70);
        mbtn->setIcon(QIcon(":/img/img/" + query->value(2).toString()));
        mbtn->setIconSize(QSize(30,60));
        mbtn->setToolTip(query->value(5).toString());
        QGraphicsDropShadowEffect * ef =  new QGraphicsDropShadowEffect; // эффект тени
        ef->setBlurRadius(20);
        mbtn->setGraphicsEffect(ef);
        connect(mbtn,SIGNAL(clicked()),SLOT(menuClick()));
        //        QGraphicsOpacityEffect* fade_effect = new QGraphicsOpacityEffect(mbtn);
        //        mbtn->setGraphicsEffect(fade_effect);
        //        QPropertyAnimation *animation = new QPropertyAnimation(fade_effect, "opacity");
        //        animation->setEasingCurve(QEasingCurve::InOutQuad);
        //        animation->setDuration(100);
        //        animation->setStartValue(0.01);
        //        animation->setEndValue(1.0);
        //        anim->addAnimation(animation);
        menuLayout->addWidget(mbtn,row,column);
        if(column<2)
            column++;
        else
        {
            column = 0;
            row++;
        }
        query->next();
    }
    //    anim->start();
    //    *555-050-*
    //        *909-0-*
    ui->frame->setVisible(false);
}
Пример #6
0
int main(int argc, char **argv)
{
    QApplication app(argc, argv);
    Window *view = new Window();
    QWidget *container = QWidget::createWindowContainer(view);
    QSize screenSize = view->screen()->size();
    container->setMinimumSize(QSize(200, 100));
    container->setMaximumSize(screenSize);

    QWidget *widget = new QWidget;
    QHBoxLayout *hLayout = new QHBoxLayout(widget);
    QVBoxLayout *vLayout = new QVBoxLayout();
    vLayout->setAlignment(Qt::AlignTop);
    hLayout->addWidget(container, 1);
    hLayout->addLayout(vLayout);

    widget->setWindowTitle(QStringLiteral("Basic shapes"));

    Qt3DCore::QAspectEngine engine;
    engine.registerAspect(new Qt3DRender::QRenderAspect());
    Qt3DInput::QInputAspect *input = new Qt3DInput::QInputAspect;
    engine.registerAspect(input);
    QVariantMap data;
    data.insert(QStringLiteral("surface"), QVariant::fromValue(static_cast<QSurface *>(view)));
    data.insert(QStringLiteral("eventSource"), QVariant::fromValue(view));
    engine.setData(data);

    // Root entity
    Qt3DCore::QEntity *rootEntity = new Qt3DCore::QEntity();

    // Camera
    Qt3DCore::QCamera *cameraEntity = new Qt3DCore::QCamera(rootEntity);
    cameraEntity->setObjectName(QStringLiteral("cameraEntity"));

    cameraEntity->lens()->setPerspectiveProjection(45.0f, 16.0f/9.0f, 0.1f, 1000.0f);
    cameraEntity->setPosition(QVector3D(0, 0, -20.0f));
    cameraEntity->setUpVector(QVector3D(0, 1, 0));
    cameraEntity->setViewCenter(QVector3D(0, 0, 0));
    input->setCamera(cameraEntity);

    // FrameGraph
    Qt3DRender::QFrameGraph *frameGraph = new Qt3DRender::QFrameGraph();
    Qt3DRender::QForwardRenderer *forwardRenderer = new Qt3DRender::QForwardRenderer();

    forwardRenderer->setCamera(cameraEntity);
    forwardRenderer->setClearColor(QColor(QRgb(0x4d4d4f)));
    frameGraph->setActiveFrameGraph(forwardRenderer);

    // Setting the FrameGraph
    rootEntity->addComponent(frameGraph);

    // Scenemodifier
    SceneModifier *modifier = new SceneModifier(rootEntity);

    // Set root object of the scene
    engine.setRootEntity(rootEntity);

    // Create control widgets
    QCommandLinkButton *info = new QCommandLinkButton();
    info->setText(QStringLiteral("Qt3D ready-made meshes"));
    info->setDescription(QStringLiteral("Qt3D provides several ready-made meshes, like torus, cylinder, cube and sphere."));
    info->setIconSize(QSize(0,0));

    QCheckBox *torusCB = new QCheckBox(widget);
    torusCB->setChecked(true);
    torusCB->setText(QStringLiteral("Torus"));

    QCheckBox *cylinderCB = new QCheckBox(widget);
    cylinderCB->setChecked(true);
    cylinderCB->setText(QStringLiteral("Cylinder"));

    QCheckBox *cuboidCB = new QCheckBox(widget);
    cuboidCB->setChecked(true);
    cuboidCB->setText(QStringLiteral("Cuboid"));

    QCheckBox *sphereCB = new QCheckBox(widget);
    sphereCB->setChecked(true);
    sphereCB->setText(QStringLiteral("Sphere"));

    vLayout->addWidget(info);
    vLayout->addWidget(torusCB);
    vLayout->addWidget(cylinderCB);
    vLayout->addWidget(cuboidCB);
    vLayout->addWidget(sphereCB);

    QObject::connect(torusCB, &QCheckBox::stateChanged,
                     modifier, &SceneModifier::enableTorus);
    QObject::connect(cylinderCB, &QCheckBox::stateChanged,
                     modifier, &SceneModifier::enableCylinder);
    QObject::connect(cuboidCB, &QCheckBox::stateChanged,
                     modifier, &SceneModifier::enableCuboid);
    QObject::connect(sphereCB, &QCheckBox::stateChanged,
                     modifier, &SceneModifier::enableSphere);

    torusCB->setChecked(true);
    cylinderCB->setChecked(true);
    cuboidCB->setChecked(true);
    sphereCB->setChecked(true);

    // Show window
    widget->show();
    widget->resize(1200, 800);

    // Update the aspect ratio
    QSize widgetSize =  container->size();
    float aspectRatio = float(widgetSize.width()) / float(widgetSize.height());
    cameraEntity->lens()->setPerspectiveProjection(45.0f, aspectRatio, 0.1f, 1000.0f);

    return app.exec();
}
Пример #7
0
    void setupUi(QMainWindow *Detection)
    {
        if (Detection->objectName().isEmpty())
            Detection->setObjectName(QString::fromUtf8("Detection"));
        Detection->resize(729, 480);
        actionE_xit = new QAction(Detection);
        actionE_xit->setObjectName(QString::fromUtf8("actionE_xit"));
        action_Load_Map = new QAction(Detection);
        action_Load_Map->setObjectName(QString::fromUtf8("action_Load_Map"));
        action_Connect = new QAction(Detection);
        action_Connect->setObjectName(QString::fromUtf8("action_Connect"));
        action_Disconnect = new QAction(Detection);
        action_Disconnect->setObjectName(QString::fromUtf8("action_Disconnect"));
        centralWidget = new QWidget(Detection);
        centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
        gridLayoutWidget = new QWidget(centralWidget);
        gridLayoutWidget->setObjectName(QString::fromUtf8("gridLayoutWidget"));
        gridLayoutWidget->setGeometry(QRect(0, 0, 721, 421));
        gridLayout = new QGridLayout(gridLayoutWidget);
        gridLayout->setSpacing(6);
        gridLayout->setContentsMargins(11, 11, 11, 11);
        gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
        gridLayout->setSizeConstraint(QLayout::SetNoConstraint);
        gridLayout->setVerticalSpacing(5);
        gridLayout->setContentsMargins(0, 0, 0, 0);
        ugvFeedLabel = new QLabel(gridLayoutWidget);
        ugvFeedLabel->setObjectName(QString::fromUtf8("ugvFeedLabel"));
        QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
        sizePolicy.setHorizontalStretch(0);
        sizePolicy.setVerticalStretch(0);
        sizePolicy.setHeightForWidth(ugvFeedLabel->sizePolicy().hasHeightForWidth());
        ugvFeedLabel->setSizePolicy(sizePolicy);

        gridLayout->addWidget(ugvFeedLabel, 1, 2, 1, 1);

        connectionButton = new QCommandLinkButton(gridLayoutWidget);
        connectionButton->setObjectName(QString::fromUtf8("connectionButton"));

        gridLayout->addWidget(connectionButton, 0, 2, 1, 1);

        uavFeedLabel = new QLabel(gridLayoutWidget);
        uavFeedLabel->setObjectName(QString::fromUtf8("uavFeedLabel"));
        sizePolicy.setHeightForWidth(uavFeedLabel->sizePolicy().hasHeightForWidth());
        uavFeedLabel->setSizePolicy(sizePolicy);
        uavFeedLabel->setMaximumSize(QSize(16777215, 16777215));

        gridLayout->addWidget(uavFeedLabel, 1, 0, 1, 1);

        ugvMapLabel = new QLabel(gridLayoutWidget);
        ugvMapLabel->setObjectName(QString::fromUtf8("ugvMapLabel"));
        QSizePolicy sizePolicy1(QSizePolicy::MinimumExpanding, QSizePolicy::Expanding);
        sizePolicy1.setHorizontalStretch(0);
        sizePolicy1.setVerticalStretch(0);
        sizePolicy1.setHeightForWidth(ugvMapLabel->sizePolicy().hasHeightForWidth());
        ugvMapLabel->setSizePolicy(sizePolicy1);

        gridLayout->addWidget(ugvMapLabel, 1, 3, 1, 1);

        horizontalLayout_4 = new QHBoxLayout();
        horizontalLayout_4->setSpacing(6);
        horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4"));
        label_2 = new QLabel(gridLayoutWidget);
        label_2->setObjectName(QString::fromUtf8("label_2"));

        horizontalLayout_4->addWidget(label_2);

        uavTakeoffLandButton = new QPushButton(gridLayoutWidget);
        uavTakeoffLandButton->setObjectName(QString::fromUtf8("uavTakeoffLandButton"));

        horizontalLayout_4->addWidget(uavTakeoffLandButton);


        gridLayout->addLayout(horizontalLayout_4, 2, 0, 1, 1);

        horizontalLayout_2 = new QHBoxLayout();
        horizontalLayout_2->setSpacing(6);
        horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2"));
        label = new QLabel(gridLayoutWidget);
        label->setObjectName(QString::fromUtf8("label"));

        horizontalLayout_2->addWidget(label);

        ugvSpeedLCD = new QLCDNumber(gridLayoutWidget);
        ugvSpeedLCD->setObjectName(QString::fromUtf8("ugvSpeedLCD"));
        ugvSpeedLCD->setFrameShape(QFrame::Box);

        horizontalLayout_2->addWidget(ugvSpeedLCD);


        gridLayout->addLayout(horizontalLayout_2, 4, 2, 1, 1);

        horizontalLayout_6 = new QHBoxLayout();
        horizontalLayout_6->setSpacing(6);
        horizontalLayout_6->setObjectName(QString::fromUtf8("horizontalLayout_6"));
        label_3 = new QLabel(gridLayoutWidget);
        label_3->setObjectName(QString::fromUtf8("label_3"));

        horizontalLayout_6->addWidget(label_3);

        ugvSpeakerButton = new QPushButton(gridLayoutWidget);
        ugvSpeakerButton->setObjectName(QString::fromUtf8("ugvSpeakerButton"));

        horizontalLayout_6->addWidget(ugvSpeakerButton);


        gridLayout->addLayout(horizontalLayout_6, 2, 2, 1, 1);

        verticalLayout = new QVBoxLayout();
        verticalLayout->setSpacing(6);
        verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
        label_4 = new QLabel(gridLayoutWidget);
        label_4->setObjectName(QString::fromUtf8("label_4"));
        label_4->setAlignment(Qt::AlignCenter);

        verticalLayout->addWidget(label_4);

        sauverStatus = new QTextBrowser(gridLayoutWidget);
        sauverStatus->setObjectName(QString::fromUtf8("sauverStatus"));
        sauverStatus->setEnabled(true);
        QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Minimum);
        sizePolicy2.setHorizontalStretch(0);
        sizePolicy2.setVerticalStretch(0);
        sizePolicy2.setHeightForWidth(sauverStatus->sizePolicy().hasHeightForWidth());
        sauverStatus->setSizePolicy(sizePolicy2);
        sauverStatus->setMaximumSize(QSize(777215, 215));

        verticalLayout->addWidget(sauverStatus);


        gridLayout->addLayout(verticalLayout, 4, 3, 1, 1);

        label_5 = new QLabel(gridLayoutWidget);
        label_5->setObjectName(QString::fromUtf8("label_5"));

        gridLayout->addWidget(label_5, 0, 0, 1, 1);

        Detection->setCentralWidget(centralWidget);
        menuBar = new QMenuBar(Detection);
        menuBar->setObjectName(QString::fromUtf8("menuBar"));
        menuBar->setGeometry(QRect(0, 0, 729, 23));
        menuFile = new QMenu(menuBar);
        menuFile->setObjectName(QString::fromUtf8("menuFile"));
        menu_Tools = new QMenu(menuBar);
        menu_Tools->setObjectName(QString::fromUtf8("menu_Tools"));
        menu_Help = new QMenu(menuBar);
        menu_Help->setObjectName(QString::fromUtf8("menu_Help"));
        Detection->setMenuBar(menuBar);
        mainToolBar = new QToolBar(Detection);
        mainToolBar->setObjectName(QString::fromUtf8("mainToolBar"));
        Detection->addToolBar(Qt::TopToolBarArea, mainToolBar);
        statusBar = new QStatusBar(Detection);
        statusBar->setObjectName(QString::fromUtf8("statusBar"));
        Detection->setStatusBar(statusBar);

        menuBar->addAction(menuFile->menuAction());
        menuBar->addAction(menu_Tools->menuAction());
        menuBar->addAction(menu_Help->menuAction());
        menuFile->addAction(action_Load_Map);
        menuFile->addAction(action_Disconnect);
        menuFile->addAction(actionE_xit);
        menu_Tools->addAction(action_Connect);

        retranslateUi(Detection);
        QObject::connect(actionE_xit, SIGNAL(activated()), Detection, SLOT(close()));
        QObject::connect(action_Connect, SIGNAL(activated()), connectionButton, SLOT(click()));

        QMetaObject::connectSlotsByName(Detection);
    } // setupUi
Пример #8
0
void CLogisticMainWindow::setupDockWindow(const bool &visible)
{
    if (!visible) return;

    QDockWidget *dockDictionary = new QDockWidget(tr("Справочники"));
                 dockDictionary->setFeatures(QDockWidget::NoDockWidgetFeatures);

    QFrame *frameDictionary = new QFrame(this);

    QCommandLinkButton *client = new QCommandLinkButton(tr("Заказчики"), tr("Справочник клиентов"), frameDictionary);
                        client->setIcon(QIcon("data/picture/sidebar/customer.ico"));
    connect(client, SIGNAL(clicked()), this, SLOT(slotCustomerDictionary()));

    QCommandLinkButton *supplier = new QCommandLinkButton(tr("Поставщики"), tr("Справочник поставщиков"), frameDictionary);
                        supplier->setIcon(QIcon("data/picture/sidebar/suppliers.ico"));
    connect(supplier, SIGNAL(clicked()), this, SLOT(slotSuppliersDictionary()));

    QCommandLinkButton *producer = new QCommandLinkButton(tr("Производители"), tr("Справочник производителей"), frameDictionary);
                        producer->setIcon(QIcon("data/picture/sidebar/producers.ico"));
    connect(producer, SIGNAL(clicked()), this, SLOT(slotProdusersDictionary()));

    QCommandLinkButton *contact = new QCommandLinkButton(tr("Контакты"), tr("Справочник контактов"), frameDictionary);
                        contact->setIcon(QIcon("data/picture/sidebar/contacts.ico"));
    connect(contact, SIGNAL(clicked()), this, SLOT(slotContactsDictionary()));

    QCommandLinkButton *position = new QCommandLinkButton (tr("Должности"), tr("Справочник должностей"), frameDictionary);
                        position->setIcon(QIcon("data/picture/sidebar/positions.ico"));
    connect(position, SIGNAL(clicked()), this, SLOT(slotPositionsDictionary()));

    QCommandLinkButton *tasktype = new QCommandLinkButton (tr("Типы задач"), tr("Справочник типов задач"), frameDictionary);
                        tasktype->setIcon(QIcon("data/picture/sidebar/tasktype.ico"));
    connect(tasktype, SIGNAL(clicked()), this, SLOT(slotTaskTypesDictionary()));

    QCommandLinkButton *contractor = new QCommandLinkButton(tr("Контрагенты"), tr("Справочник контрагентов"), frameDictionary);
                        contractor->setIcon(QIcon("data/picture/sidebar/contractortype.ico"));
    connect(contractor, SIGNAL(clicked()), this, SLOT(slotContractorTypesDictionary()));

    QCommandLinkButton *status = new QCommandLinkButton (tr("Статусы"), tr("Справочник статусов"), frameDictionary);
                        status->setIcon(QIcon("data/picture/sidebar/status.ico"));
    connect(status, SIGNAL(clicked()), this, SLOT(slotStatusDictionary()));

    QCommandLinkButton *priority = new QCommandLinkButton (tr("Приоритеты"), tr("Справочник приоритетов"), frameDictionary);
                        priority->setIcon(QIcon("data/picture/sidebar/priority.ico"));
    connect(priority, SIGNAL(clicked()), this, SLOT(slotPrioritiesDictionary()));

    QCommandLinkButton *countrycity = new QCommandLinkButton (tr("Страны и города"), tr("Справочник стран и городов"), frameDictionary);
                        countrycity->setIcon(QIcon("data/picture/sidebar/countryandcity.ico"));
    connect(countrycity, SIGNAL(clicked()), this, SLOT(slotCountryCityDictionary()));

    QVBoxLayout *vboxDictionary = new QVBoxLayout(frameDictionary);
                 vboxDictionary->setSizeConstraint(QVBoxLayout::SetMinAndMaxSize);
                 vboxDictionary->addWidget(client);
                 vboxDictionary->addWidget(supplier);
                 vboxDictionary->addWidget(producer);
                 vboxDictionary->addWidget(contact);
                 vboxDictionary->addWidget(position);
                 vboxDictionary->addWidget(tasktype);
                 vboxDictionary->addWidget(contractor);
                 vboxDictionary->addWidget(status);
                 vboxDictionary->addWidget(priority);
                 vboxDictionary->addWidget(countrycity);

    dockDictionary->setLayout(vboxDictionary);
    dockDictionary->setWidget(frameDictionary);

    QDockWidget *dockFolder = new QDockWidget(tr("Папки"));
                 dockFolder->setFeatures(QDockWidget::NoDockWidgetFeatures);

    QFrame *frameFolder = new QFrame(this);

    QCommandLinkButton *relation = new QCommandLinkButton(tr("Взаимоотношения"), frameFolder);
                        relation->setIcon(QIcon("data/picture/sidebar/relations.ico"));
    connect(relation, SIGNAL(clicked()), this, SLOT(slotRelationsFolder()));

    QCommandLinkButton *calendar = new QCommandLinkButton (tr("Календарь"), frameFolder);
                        calendar->setIcon(QIcon("data/picture/sidebar/calendar.ico"));
    connect(calendar, SIGNAL(clicked()), this, SLOT(slotCalendarFolder()));

    QCommandLinkButton *reminder = new QCommandLinkButton (tr("Напоминания"), frameFolder);
                        reminder->setIcon(QIcon("data/picture/sidebar/reminder.ico"));
    connect(reminder, SIGNAL(clicked()), this, SLOT(slotReminderFolder()));

    QVBoxLayout *vboxFolder = new QVBoxLayout(frameFolder);
                 vboxFolder->setSizeConstraint(QVBoxLayout::SetMinAndMaxSize);
                 vboxFolder->addWidget(relation);
                 vboxFolder->addWidget(calendar);
                 vboxFolder->addWidget(reminder);

    dockFolder->setLayout(vboxFolder);
    dockFolder->setWidget(frameFolder);

    QDockWidget *dockAdditionally = new QDockWidget(tr("Дополнительно"));
                 dockAdditionally->setFeatures(QDockWidget::NoDockWidgetFeatures);

    QFrame *frameAdditionally = new QFrame(this);

    QCommandLinkButton *accounting = new QCommandLinkButton(tr("Учетные операции"), tr("Справочник УО"), frameAdditionally);
                        accounting->setIcon(QIcon("data/picture/sidebar/accounting.png"));
    connect(accounting, SIGNAL(clicked()), this, SLOT(slotAccountingAdditionally()));

    QVBoxLayout *vboxAdditionally = new QVBoxLayout(frameAdditionally);
                 vboxAdditionally->setSizeConstraint(QVBoxLayout::SetMinAndMaxSize);
                 vboxAdditionally->addWidget(accounting);

    dockAdditionally->setLayout(vboxAdditionally);
    dockAdditionally->setWidget(frameAdditionally);

    addDockWidget(Qt::LeftDockWidgetArea, dockDictionary);
    addDockWidget(Qt::LeftDockWidgetArea, dockFolder);
    addDockWidget(Qt::LeftDockWidgetArea, dockAdditionally);

    tabifyDockWidget(dockDictionary, dockFolder);
    tabifyDockWidget(dockFolder, dockAdditionally);
}