int ShowEditor::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QMainWindow::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: actRemove(); break; case 1: actPopTop(); break; case 2: actPopDown(); break; case 3: actSizeOrig(); break; case 4: actSizeHalf(); break; case 5: actSizeAuto(); break; case 6: actNew(); break; case 7: actOpen(); break; case 8: actSave(); break; case 9: actRun(); break; case 10: actExit(); break; case 11: actSceSet(); break; case 12: actLineCheck(); break; case 13: actHelixSqrCheck(); break; case 14: actHelixCirCheck(); break; case 15: actSqrCheck(); break; case 16: actCubicCheck(); break; case 17: actCircleCheck(); break; case 18: actCylinderCheck(); break; case 19: actHalfCirCheck(); break; case 20: actAlbumACheck(); break; case 21: actArrayEditorCheck(); break; case 22: actTextPix((*reinterpret_cast< int(*)>(_a[1]))); break; case 23: actPage(); break; case 24: actJpge(); break; case 25: actText(); break; case 26: actMusic(); break; case 27: actBuildAlbum(); break; case 28: actFont(); break; case 29: actColor(); break; case 30: actSetting(); break; case 31: actAbout(); break; case 32: fontChange((*reinterpret_cast< QFont(*)>(_a[1]))); break; case 33: activetext((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 34: itemChange((*reinterpret_cast< QListWidgetItem*(*)>(_a[1])),(*reinterpret_cast< QListWidgetItem*(*)>(_a[2]))); break; case 35: pageItemRemove(); break; default: ; } _id -= 36; } return _id; }
MessagesSettingsPage::MessagesSettingsPage() { chatMentionCheckBox.setChecked(settingsCache->getChatMention()); connect(&chatMentionCheckBox, SIGNAL(stateChanged(int)), settingsCache, SLOT(setChatMention(int))); chatMentionCompleterCheckbox.setChecked(settingsCache->getChatMentionCompleter()); connect(&chatMentionCompleterCheckbox, SIGNAL(stateChanged(int)), settingsCache, SLOT(setChatMentionCompleter(int))); ignoreUnregUsersMainChat.setChecked(settingsCache->getIgnoreUnregisteredUsers()); ignoreUnregUserMessages.setChecked(settingsCache->getIgnoreUnregisteredUserMessages()); connect(&ignoreUnregUsersMainChat, SIGNAL(stateChanged(int)), settingsCache, SLOT(setIgnoreUnregisteredUsers(int))); connect(&ignoreUnregUserMessages, SIGNAL(stateChanged(int)), settingsCache, SLOT(setIgnoreUnregisteredUserMessages(int))); invertMentionForeground.setChecked(settingsCache->getChatMentionForeground()); connect(&invertMentionForeground, SIGNAL(stateChanged(int)), this, SLOT(updateTextColor(int))); invertHighlightForeground.setChecked(settingsCache->getChatHighlightForeground()); connect(&invertHighlightForeground, SIGNAL(stateChanged(int)), this, SLOT(updateTextHighlightColor(int))); mentionColor = new QLineEdit(); mentionColor->setText(settingsCache->getChatMentionColor()); updateMentionPreview(); connect(mentionColor, SIGNAL(textChanged(QString)), this, SLOT(updateColor(QString))); messagePopups.setChecked(settingsCache->getShowMessagePopup()); connect(&messagePopups, SIGNAL(stateChanged(int)), settingsCache, SLOT(setShowMessagePopups(int))); mentionPopups.setChecked(settingsCache->getShowMentionPopup()); connect(&mentionPopups, SIGNAL(stateChanged(int)), settingsCache, SLOT(setShowMentionPopups(int))); customAlertString = new QLineEdit(); customAlertString->setPlaceholderText("Word1 Word2 Word3"); customAlertString->setText(settingsCache->getHighlightWords()); connect(customAlertString, SIGNAL(textChanged(QString)), settingsCache, SLOT(setHighlightWords(QString))); QGridLayout *chatGrid = new QGridLayout; chatGrid->addWidget(&chatMentionCheckBox, 0, 0); chatGrid->addWidget(&invertMentionForeground, 0, 1); chatGrid->addWidget(mentionColor, 0, 2); chatGrid->addWidget(&chatMentionCompleterCheckbox, 1, 0); chatGrid->addWidget(&ignoreUnregUsersMainChat, 2, 0); chatGrid->addWidget(&hexLabel, 1, 2); chatGrid->addWidget(&ignoreUnregUserMessages, 3, 0); chatGrid->addWidget(&messagePopups, 4, 0); chatGrid->addWidget(&mentionPopups, 5, 0); chatGroupBox = new QGroupBox; chatGroupBox->setLayout(chatGrid); highlightColor = new QLineEdit(); highlightColor->setText(settingsCache->getChatHighlightColor()); updateHighlightPreview(); connect(highlightColor, SIGNAL(textChanged(QString)), this, SLOT(updateHighlightColor(QString))); QGridLayout *highlightNotice = new QGridLayout; highlightNotice->addWidget(highlightColor, 0, 2); highlightNotice->addWidget(&invertHighlightForeground, 0, 1); highlightNotice->addWidget(&hexHighlightLabel, 1, 2); highlightNotice->addWidget(customAlertString, 0, 0); highlightNotice->addWidget(&customAlertStringLabel, 1, 0); highlightGroupBox = new QGroupBox; highlightGroupBox->setLayout(highlightNotice); QSettings settings; messageList = new QListWidget; settings.beginGroup("messages"); int count = settings.value("count", 0).toInt(); for (int i = 0; i < count; i++) messageList->addItem(settings.value(QString("msg%1").arg(i)).toString()); aAdd = new QAction(this); aAdd->setIcon(QIcon("theme:icons/increment.svg")); connect(aAdd, SIGNAL(triggered()), this, SLOT(actAdd())); aRemove = new QAction(this); aRemove->setIcon(QIcon("theme:icons/decrement.svg")); connect(aRemove, SIGNAL(triggered()), this, SLOT(actRemove())); QToolBar *messageToolBar = new QToolBar; messageToolBar->setOrientation(Qt::Vertical); messageToolBar->addAction(aAdd); messageToolBar->addAction(aRemove); QHBoxLayout *messageListLayout = new QHBoxLayout; messageListLayout->addWidget(messageToolBar); messageListLayout->addWidget(messageList); messageShortcuts = new QGroupBox; messageShortcuts->setLayout(messageListLayout); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addWidget(messageShortcuts); mainLayout->addWidget(chatGroupBox); mainLayout->addWidget(highlightGroupBox); setLayout(mainLayout); retranslateUi(); }