Settings_window.cpp 19.6 KB
Newer Older
1
/*
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
 ** This file is part of the ViTE project.
 **
 ** This software is governed by the CeCILL-A license under French law
 ** and abiding by the rules of distribution of free software. You can
 ** use, modify and/or redistribute the software under the terms of the
 ** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following
 ** URL: "http://www.cecill.info".
 **
 ** As a counterpart to the access to the source code and rights to copy,
 ** modify and redistribute granted by the license, users are provided
 ** only with a limited warranty and the software's author, the holder of
 ** the economic rights, and the successive licensors have only limited
 ** liability.
 **
 ** In this respect, the user's attention is drawn to the risks associated
 ** with loading, using, modifying and/or developing or reproducing the
 ** software by the user in light of its specific status of free software,
 ** that may mean that it is complicated to manipulate, and that also
 ** therefore means that it is reserved for developers and experienced
 ** professionals having in-depth computer knowledge. Users are therefore
 ** encouraged to load and test the software's suitability as regards
 ** their requirements in conditions enabling the security of their
 ** systems and/or data to be ensured and, more generally, to use and
 ** operate it in the same conditions as regards security.
 **
 ** The fact that you are presently reading this means that you have had
 ** knowledge of the CeCILL-A license and that you accept its terms.
 **
 **
 ** ViTE developers are (for version 0.* to 1.0):
 **
 **        - COULOMB Kevin
 **        - FAVERGE Mathieu
 **        - JAZEIX Johnny
 **        - LAGRASSE Olivier
 **        - MARCOUEILLE Jule
 **        - NOISETTE Pascal
 **        - REDONDY Arthur
 **        - VUCHENER Clément
 **
 */
43 44 45

#include <iostream>
#include <string>
46
#include <cassert>
47 48 49 50 51 52 53
/* -- */
#include <QStringList>
#include <QColor>
#include <QFileDialog>
#include <QColorDialog>
#include <QInputDialog>
#include <QMessageBox>
54
#include <QMap>
55
/* -- */
56
#include <qtcolorpicker.h>
57 58 59 60 61 62 63
/* -- */
#include "trace/values/Values.hpp"
#include "trace/EntityValue.hpp"
#include "trace/EntityTypes.hpp"
#include "trace/Entitys.hpp"
#include "trace/Trace.hpp"
/* -- */
Mathieu Faverge's avatar
Mathieu Faverge committed
64
#include "common/Palette.hpp"
65
#include "common/Session.hpp"
66 67
#include "common/common.hpp"
#include "common/Info.hpp"
Mathieu Faverge's avatar
Mathieu Faverge committed
68
/* -- */
69 70 71 72 73 74
#include "interface/Interface.hpp"
#include "core/Core.hpp"
#include "interface/Settings_window.hpp"

using namespace std;

75 76
Settings_tab::Settings_tab(Core *core, std::string ecname)
{
Mathieu Faverge's avatar
Mathieu Faverge committed
77
    _changed = false;
78 79 80 81 82
    _core    = core;
    _ecname  = ecname;

    // Create the header
    hdr_label = new QLabel(this);
83
    hdr_label->setObjectName(QString("hdr_label"));
Mathieu Faverge's avatar
Mathieu Faverge committed
84
    hdr_label->setText(QApplication::translate("settings", "Colors set:", nullptr));
85 86

    list_palette = new QComboBox(this);
87
    list_palette->setObjectName(QString("list_palette"));
88 89 90 91

    hdr_spacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);

    btn_palette_cp = new QPushButton(this);
92
    btn_palette_cp->setObjectName(QString("btn_palette_cp"));
Mathieu Faverge's avatar
Mathieu Faverge committed
93
    btn_palette_cp->setText(QApplication::translate("settings", "Copy", nullptr));
94 95

    btn_palette_rm = new QPushButton(this);
96
    btn_palette_rm->setObjectName(QString("btn_palette_rm"));
Mathieu Faverge's avatar
Mathieu Faverge committed
97
    btn_palette_rm->setText(QApplication::translate("settings", "Remove", nullptr));
98 99

    header = new QHBoxLayout();
100
    header->setObjectName(QString("header"));
101 102 103 104 105 106 107 108 109
    header->addWidget(hdr_label);
    header->addWidget(list_palette);
    header->addItem(hdr_spacer);
    header->addWidget(btn_palette_cp);
    header->addWidget(btn_palette_rm);

    // Create the content
    content = new QTableWidget(this);
    content->setColumnCount(3);
110
    content->setObjectName(QString("content"));
111 112 113

    QTableWidgetItem *__qtablewidgetitem = new QTableWidgetItem();
    content->setHorizontalHeaderItem(0, __qtablewidgetitem);
Mathieu Faverge's avatar
Mathieu Faverge committed
114
    __qtablewidgetitem->setText(QApplication::translate("settings", "Name", nullptr));
115 116 117

    QTableWidgetItem *__qtablewidgetitem1 = new QTableWidgetItem();
    content->setHorizontalHeaderItem(1, __qtablewidgetitem1);
Mathieu Faverge's avatar
Mathieu Faverge committed
118
    __qtablewidgetitem1->setText(QApplication::translate("settings", "Color", nullptr));
119 120 121

    QTableWidgetItem *__qtablewidgetitem2 = new QTableWidgetItem();
    content->setHorizontalHeaderItem(2, __qtablewidgetitem2);
Mathieu Faverge's avatar
Mathieu Faverge committed
122
    __qtablewidgetitem2->setText(QApplication::translate("settings", "Visible", nullptr));
123 124 125 126 127 128 129 130 131 132 133

    QSizePolicy sizePolicy3(QSizePolicy::Expanding, QSizePolicy::Expanding);
    sizePolicy3.setHorizontalStretch(100);
    sizePolicy3.setVerticalStretch(100);
    sizePolicy3.setHeightForWidth(content->sizePolicy().hasHeightForWidth());
    content->setSizePolicy(sizePolicy3);

    // Create the footer
    ftr_spacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);

    btn_apply  = new QPushButton(this);
134
    btn_apply->setObjectName(QString("btn_apply"));
Mathieu Faverge's avatar
Mathieu Faverge committed
135
    btn_apply->setText(QApplication::translate("settings", "Apply", nullptr));
136 137

    btn_cancel = new QPushButton(this);
138
    btn_cancel->setObjectName(QString("btn_cancel"));
Mathieu Faverge's avatar
Mathieu Faverge committed
139
    btn_cancel->setText(QApplication::translate("settings", "Cancel", nullptr));
140 141

    btn_reload = new QPushButton(this);
142
    btn_reload->setObjectName(QString("btn_reload"));
Mathieu Faverge's avatar
Mathieu Faverge committed
143
    btn_reload->setText(QApplication::translate("settings", "Reload from file", nullptr));
144
#ifndef QT_NO_TOOLTIP
Mathieu Faverge's avatar
Mathieu Faverge committed
145
    btn_reload->setToolTip(QApplication::translate("settings", "Reload all the states types from the displayed trace", nullptr));
146 147 148
#endif // QT_NO_TOOLTIP

    footer = new QHBoxLayout();
149
    footer->setObjectName(QString("footer"));
150 151 152 153 154 155 156
    footer->addItem(ftr_spacer);
    footer->addWidget(btn_apply);
    footer->addWidget(btn_cancel);
    footer->addWidget(btn_reload);

    // Assemble the background
    background = new QVBoxLayout(this);
157
    background->setObjectName(QString("background"));
158 159 160 161
    background->addLayout(header);
    background->addWidget(content);
    background->addLayout(footer);

162
    refresh();
163

164
    QMetaObject::connectSlotsByName(this);
165 166
}

167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182
Settings_tab::~Settings_tab()
{
    delete hdr_label;
    delete list_palette;
    delete hdr_spacer;
    delete btn_palette_cp;
    delete btn_palette_rm;
    delete header;
    delete content;
    delete ftr_spacer;
    delete btn_apply;
    delete btn_cancel;
    delete btn_reload;
    delete footer;
    delete background;
}
183

184
void
185
Settings_tab::refresh()
186
{
187 188 189 190
    // Initialize the parameters of the tab
    Session    &S = Session::getSession();
    QStringList palettes;
    string      current;
191

192 193
    S.get_palettes_name( _ecname, palettes );
    current = S.get_current_palette( _ecname );
194

195 196 197 198
    list_palette->clear();
    list_palette->addItems(palettes);
    // Set the combobox at the good index.
    list_palette->setCurrentIndex(list_palette->findText(QString::fromStdString(current)));
199

200
    fill_table();
201 202
}

203
void
204
Settings_tab::item_changed(int row)
205
{
206
    _changed = true;
207

208
    if( !content || !list_palette)
209
        return;
210

211
    if (row == -1) {
212
        // Find the row of the colorPicker
213
        row = 0;
214
        while(content->cellWidget(row, 1) &&
215 216 217
              (content->cellWidget(row, 1) != sender() ) &&
              (content->cellWidget(row, 2) != sender() ) )
        {
218 219
            row ++;
        }
220
    }
221

222
    if(!content->cellWidget(row, 1))
223 224
        return; // epic fail...

225
    std::string ev_alias = content->item(row, 3)->text().toStdString();
226

227 228 229
    // If the state has not already been changed, we register it
    if( _changes.count(ev_alias) == 0 ) {
        _changes[ev_alias] = row;
230 231
    }
    return;
232
}
233 234

void
235 236 237
Settings_tab::add_table_line(int &row,
                             EntityValue *ev,
                             bool used)
238
{
239
    /* Name */
240 241 242 243
    QTableWidgetItem *name = new QTableWidgetItem(ev->get_name().c_str());

    /* Alias */
    QTableWidgetItem *alias = new QTableWidgetItem(ev->get_alias().c_str());
244 245

    /* Color */
Mathieu Faverge's avatar
Mathieu Faverge committed
246
    Color *c = nullptr;
247 248
    QtColorPicker *color_widget = new QtColorPicker();
    color_widget->setStandardColors();
249 250 251 252
    if(used) {
        c = ev->get_used_color();
    } else {
        c = ev->get_file_color();
253
    }
254
    assert(c);
255 256 257

    QColor qc(c->get_red()*255, c->get_green()*255, c->get_blue()*255);
    color_widget->setCurrentColor(qc);
258 259
    color_widget->setColorDialogEnabled(false);
    connect(color_widget, SIGNAL(colorChanged(const QColor &)),
260
            this, SLOT(item_changed()) );
261 262 263

    /* Visible */
    QCheckBox *cb = new QCheckBox();
264
    cb->setChecked( ev->get_visible() );
265
    connect(cb, SIGNAL(stateChanged(int)),
266
            this, SLOT(item_changed()));
267

268
    /* Set the row */
269 270 271 272 273 274
    content->insertRow(row);
    content->setItem(row, 0, name);
    content->setCellWidget(row, 1, color_widget);
    content->setCellWidget(row, 2, cb);
    content->setItem(row, 3, alias);

275
    /* If we reload from file, backup the changes */
276
    if( !used ) {
277
        /* Change the color test */
278 279 280 281
        if ( (c != ev->get_used_color()) ||
             (!ev->get_visible()) )
        {
            item_changed( row );
282 283
        }
    }
284 285 286
    row ++;
}

287 288
void
Settings_tab::fill_table( bool used )
Mathieu Faverge's avatar
Mathieu Faverge committed
289
{
290 291
    map<string, EntityValue*>                *ev_list;
    map<string, EntityValue*>::const_iterator ev;
292
    int row = 0;
293

294
    /* Reset the table before insertion */
295 296 297 298
    content->clearContents();
    content->setRowCount(0);
    content->setColumnCount(4);
    content->setColumnHidden(3, true);
299 300

    /* Get the list from trace */
301 302
    if(_core->get_trace()) { // Need a trace loaded
        ev_list = _core->get_trace()->get_all_entityvalues( _ecname );
303
    }
304
    else {
305
        std::cerr << "fill_table (" << _ecname << "): No trace loaded" << std::endl;
306 307 308
        return;
    }

309 310 311
    // Add a line per EntityValue
    for(ev  = ev_list->begin();
        ev != ev_list->end(); ++ev)
312
    {
313
        add_table_line( row, ev->second, used );
314 315 316
    }
}

317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332
void
Settings_tab::update_table_from_palette( string pname )
{
    Session &S = Session::getSession();
    Palette *p = S.get_palette(_ecname, pname);

    map<string, EntityValue*>                *ev_list;
    map<string, EntityValue*>::const_iterator ev;

    int rownbr = content->rowCount();

    for( int i=0; i < rownbr; i++ ) {
        string ev_name  = content->item(i, 0)->text().toStdString();
        string ev_alias = content->item(i, 3)->text().toStdString();
        Color *c = p->get_color( ev_name );

Mathieu Faverge's avatar
Mathieu Faverge committed
333
        if ( c != nullptr ) {
334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349
            _changed = true;
            bool v = p->is_visible( ev_name );

            QtColorPicker *color_widget = qobject_cast<QtColorPicker *>(content->cellWidget(i, 1));
            color_widget->setCurrentColor(QColor(c->get_red()  *255,
                                                 c->get_green()*255,
                                                 c->get_blue() *255));

            QCheckBox *cb =  qobject_cast<QCheckBox *>(content->cellWidget(i, 2));
            cb->setCheckState( v ? Qt::Checked : Qt::Unchecked );

            _changes[ev_alias] = i;
        }
    }
}

350 351 352
void
Settings_tab::on_list_palette_currentIndexChanged(const QString & text)
{
353
    update_table_from_palette( text.toStdString() );
354 355
}

356 357 358 359 360 361 362 363
void
Settings_tab::on_btn_palette_cp_clicked()
{
    bool ok;
    QString text = QInputDialog::getText( this, tr("ViTE"),
                                          tr("New colors set name:"),
                                          QLineEdit::Normal,
                                          "", &ok );
364

365 366
    // Copy the color set
    if (ok && !text.isEmpty()) {
367

368 369 370 371 372 373 374 375 376 377 378 379
        Session &S = Session::getSession();

        // Check if the name already exists
        if (list_palette->findText(text) != -1) {
            if(QMessageBox::warning( this, tr("ViTE"),
                                     tr("Colors set already exists.\n"
                                        "Are you sure you want to erase it?"),
                                     QMessageBox::Ok | QMessageBox::Cancel )
               != QMessageBox::Ok )
            {
                return;
            }
380

381 382 383 384 385 386
            // Remove the existing set
            S.remove_palette( _ecname, text.toStdString() );
        }
        else {
            list_palette->addItem(text);
        }
387

388 389 390 391 392
        S.copy_palette( _ecname,
                        list_palette->currentText().toStdString(),
                        text.toStdString() );
        list_palette->setCurrentIndex( list_palette->findText(text) );
    }
393 394
}

395 396 397 398
void
Settings_tab::on_btn_palette_rm_clicked()
{
    QString current = list_palette->currentText();
Mathieu Faverge's avatar
Mathieu Faverge committed
399

400
    Session::getSession().remove_palette( _ecname, current.toStdString() );
Mathieu Faverge's avatar
Mathieu Faverge committed
401

402 403 404 405 406 407
    if ( current == "Default" ) {
        // Reload default from file
        fill_table( false );
    }
    else {
        list_palette->removeItem( list_palette->currentIndex() );
Mathieu Faverge's avatar
Mathieu Faverge committed
408

409 410 411
        int index = list_palette->findText("Default");
        assert(index != -1);
        list_palette->setCurrentIndex( index );
412

413
        update_table_from_palette( "Default" );
414 415 416
    }
}

417 418 419 420 421
void
Settings_tab::on_btn_apply_clicked()
{
    if (_changed) {
        Session &S = Session::getSession();
422

423 424
        string setname = list_palette->currentText().toStdString();
        S.set_current_palette( _ecname, setname );
425

426 427 428
        map<string, EntityValue*> *ev_list;
        map<string, EntityValue*>::iterator ev;
        std::map<std::string, int>::iterator it;
429

430
        ev_list = _core->get_trace()->get_all_entityvalues( _ecname );
Mathieu Faverge's avatar
Mathieu Faverge committed
431

432 433 434 435 436 437 438
        it  = _changes.begin();
        while(it != _changes.end()) {
            int i = it->second;
            string ev_name = content->item(i, 0)->text().toStdString();
            QColor qc      = qobject_cast<QtColorPicker *>(content->cellWidget(i, 1))->currentColor();
            bool   visible = qobject_cast<QCheckBox *>    (content->cellWidget(i, 2))->checkState() == Qt::Checked;
            Color *color = new Color(qc.red()/255., qc.green()/255., qc.blue()/255.);
Mathieu Faverge's avatar
Mathieu Faverge committed
439

440 441
            ev = ev_list->find( it->first );
            assert( ev != ev_list->end() );
442

443 444
            (ev->second)->set_used_color(color);
            (ev->second)->set_visible(visible);
445

446
            S.add_state_to_palette( _ecname, setname, ev_name, *color, visible );
447

448 449
            it++;
        }
450

451 452
        _changes.clear();
        _changed = false;
453

454
        _core->launch_action(Core::_STATE_RENDER_UPDATE);
455
    }
456
}
457

458 459 460 461
void
Settings_tab::on_btn_cancel_clicked()
{
    if (_changed) {
462

463
        Session &S = Session::getSession();
464

465 466 467
        map<string, EntityValue*> *ev_list;
        map<string, EntityValue*>::iterator ev;
        std::map<std::string, int>::iterator it;
468

469
        ev_list = _core->get_trace()->get_all_entityvalues( _ecname );
470

471 472 473
        it  = _changes.begin();
        while(it != _changes.end()) {
            int i = it->second;
474

475 476
            ev = ev_list->find( it->first );
            assert( ev != ev_list->end() );
477

478 479
            bool   visible = (ev->second)->get_visible();
            Color *color   = (ev->second)->get_used_color();
480

481 482 483 484
            QtColorPicker *color_widget = qobject_cast<QtColorPicker *>(content->cellWidget(i, 1));
            color_widget->setCurrentColor(QColor(color->get_red()  *255,
                                                 color->get_green()*255,
                                                 color->get_blue() *255));
485

486 487
            QCheckBox *cb =  qobject_cast<QCheckBox *>(content->cellWidget(i, 2));
            cb->setCheckState( visible ? Qt::Checked : Qt::Unchecked );
488

489
            it++;
490
        }
491 492 493 494

        _changes.clear();
        _changed = false;
        update();
495 496 497
    }
}

498 499 500 501
void
Settings_tab::on_btn_reload_clicked()
{
    fill_table(false);
502 503
}

504
Settings_window::Settings_window(Core *c, QWidget *parent)
Mathieu Faverge's avatar
Mathieu Faverge committed
505
    : QWidget(parent), _c(c)
506 507 508
{
    QStringList palettes;
    string current;
509

510
    setupUi(this);
511

512 513
    plugin_load_dirs_name();
    reload_general_tab();
514

515
    _changed = false;
516

517 518
    reload_minimap_tab();

Mathieu Faverge's avatar
Mathieu Faverge committed
519 520
    _tab_states = new Settings_tab( _c, "palette" );
    tabWidget->insertTab(1, _tab_states, "States");
521

Mathieu Faverge's avatar
Mathieu Faverge committed
522 523
    _tab_events = new Settings_tab( _c, "event_types" );
    tabWidget->insertTab(2, _tab_events, "Events");
524

Mathieu Faverge's avatar
Mathieu Faverge committed
525 526
    _tab_links = new Settings_tab( _c, "link_types" );
    tabWidget->insertTab(3, _tab_links, "Links");
527 528
}

Mathieu Faverge's avatar
Mathieu Faverge committed
529
Settings_window::~Settings_window() = default;
530

531
void Settings_window::on_tabWidget_currentChanged(int ) {
532

533 534
}

535 536 537 538 539 540 541 542
void
Settings_window::refresh()
{
    _tab_states->refresh();
    _tab_events->refresh();
    _tab_links ->refresh();
}

543 544
void Settings_window::show() {
    // The plugin tab
545
    refresh();
546 547 548 549
    dir_list->clear();
    plugin_load_dirs_name();
    reload_minimap_tab();
    QWidget::show();
550 551
}

552 553 554 555
/************************/
/***** General tab. *****/
/************************/
void Settings_window::reload_general_tab() {
556 557
}

558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578
/************************/
/***** Minimap tab. *****/
/************************/
void Settings_window::reload_minimap_tab() {
    MinimapSettings &ms = Session::getSessionMinimap();

    minimap_hide_cb->setChecked(ms._is_closed);
    minimap_x_sb->setValue(ms._x);
    minimap_y_sb->setValue(ms._y);
    minimap_w_sb->setValue(ms._width);
    minimap_h_sb->setValue(ms._height);
    // \todo Square border size? kesako?
    // \todo maybe colors?
}

/*************************/
/****** Plugin tab. ******/
/*************************/

void Settings_window::on_rm_dir_btn_clicked() {
    dir_list->takeItem(dir_list->currentRow());
579 580
}

581 582 583 584 585 586 587 588 589 590
void Settings_window::on_add_dir_btn_clicked() {
    QFileDialog dialog(this, tr("Add a directory"));

    dialog.setFileMode(QFileDialog::DirectoryOnly);
    dialog.exec();

    if(dialog.result() == QDialog::Accepted) {
        QStringList list = dialog.selectedFiles();
        dir_list->addItems(list);
    }
591 592
}

593 594 595 596 597
void Settings_window::plugin_load_dirs_name() {
    QStringList dirs;
    Session::getSession().load_plugin_directories(dirs);
    dir_list->addItems(dirs);
}
598

599 600 601
/*************************/
/* Global buttons click. */
/*************************/
Mathieu Faverge's avatar
Mathieu Faverge committed
602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632
// void Settings_window::on_btn_apply_clicked() {
//     Session         &S  = Session::getSession();
//     MinimapSettings &ms = Session::getSessionMinimap();

//     _changed=false;
//     // The plugin tab
//     QStringList dir_names;
//     for(int i = 0 ; i < dir_list->count() ; i ++) {
//         dir_names << dir_list->item(i)->text();
//     }
//     S.save_plugin_directories(dir_names);

//     // The minimap tab
//     minimap_hide_cb->setChecked(ms._is_closed);
//     minimap_x_sb->setValue(ms._x);
//     minimap_y_sb->setValue(ms._y);
//     minimap_w_sb->setValue(ms._width);
//     minimap_h_sb->setValue(ms._height);

//     /*cout <<minimap_x_sb->value() << " " << minimap_y_sb->value() <<" " <<
//      minimap_w_sb->value() <<" " <<  minimap_h_sb->value() <<" " <<
//      minimap_hide_cb->isChecked() << endl;*/

//     ms.save( minimap_x_sb->value(),
//              minimap_y_sb->value(),
//              minimap_w_sb->value(),
//              minimap_h_sb->value(),
//              minimap_hide_cb->isChecked());

//     _c->launch_action(Core::_STATE_RENDER_UPDATE);
// }
633

Mathieu Faverge's avatar
Mathieu Faverge committed
634 635 636
void
Settings_window::on_btn_ok_clicked()
{
637 638 639 640
    _tab_states->on_btn_apply_clicked();
    _tab_events->on_btn_apply_clicked();
    _tab_links ->on_btn_apply_clicked();

Mathieu Faverge's avatar
Mathieu Faverge committed
641 642 643
    if( _changed ) {
        // Catch by at least the interface_graphic which will dispatch it to the classes which needs
        emit settings_changed();
644

Mathieu Faverge's avatar
Mathieu Faverge committed
645 646 647
        _c->launch_action(Core::_STATE_RENDER_UPDATE);
    }
    hide();
648 649
}

Mathieu Faverge's avatar
Mathieu Faverge committed
650 651 652
void
Settings_window::on_btn_cancel_clicked()
{
653 654 655 656
    _tab_states->on_btn_cancel_clicked();
    _tab_events->on_btn_cancel_clicked();
    _tab_links ->on_btn_cancel_clicked();

Mathieu Faverge's avatar
Mathieu Faverge committed
657
    hide();
658
}
659

Mathieu Faverge's avatar
Mathieu Faverge committed
660 661 662 663
void
Settings_window::on_cb_tip_currentIndexChanged(int index)
{
    Info::Render::_arrows_shape = index;
664
    _c->launch_action(Core::_STATE_RENDER_UPDATE);
665
}
Mathieu Faverge's avatar
Mathieu Faverge committed
666 667 668 669

void
Settings_window::on_cb_nolinks_stateChanged(int index)
{
670
    _c->launch_action(Core::_STATE_RENDER_UPDATE);
671
}
672

Mathieu Faverge's avatar
Mathieu Faverge committed
673 674 675
void
Settings_window::on_cb_noevents_stateChanged(int index)
{
676
    _c->launch_action(Core::_STATE_RENDER_UPDATE);
677
}
678