SoundSettingsPage::SoundSettingsPage() { QIcon deleteIcon("theme:icons/delete.svg"); soundEnabledCheckBox.setChecked(settingsCache->getSoundEnabled()); connect(&soundEnabledCheckBox, SIGNAL(stateChanged(int)), settingsCache, SLOT(setSoundEnabled(int))); soundPathEdit = new QLineEdit(settingsCache->getSoundPath()); soundPathEdit->setReadOnly(true); QPushButton *soundPathClearButton = new QPushButton(deleteIcon, QString()); connect(soundPathClearButton, SIGNAL(clicked()), this, SLOT(soundPathClearButtonClicked())); QPushButton *soundPathButton = new QPushButton("..."); connect(soundPathButton, SIGNAL(clicked()), this, SLOT(soundPathButtonClicked())); connect(&soundTestButton, SIGNAL(clicked()), soundEngine, SLOT(playerJoined())); masterVolumeSlider = new QSlider(Qt::Horizontal); masterVolumeSlider->setMinimum(0); masterVolumeSlider->setMaximum(100); masterVolumeSlider->setValue(settingsCache->getMasterVolume()); masterVolumeSlider->setToolTip(QString::number(settingsCache->getMasterVolume())); connect(settingsCache, SIGNAL(masterVolumeChanged(int)), this, SLOT(masterVolumeChanged(int))); connect(masterVolumeSlider, SIGNAL(sliderReleased()), soundEngine, SLOT(playerJoined())); connect(masterVolumeSlider, SIGNAL(valueChanged(int)), settingsCache, SLOT(setMasterVolume(int))); masterVolumeSpinBox = new QSpinBox(); masterVolumeSpinBox->setMinimum(0); masterVolumeSpinBox->setMaximum(100); masterVolumeSpinBox->setValue(settingsCache->getMasterVolume()); connect(masterVolumeSlider, SIGNAL(valueChanged(int)), masterVolumeSpinBox, SLOT(setValue(int))); connect(masterVolumeSpinBox, SIGNAL(valueChanged(int)), masterVolumeSlider, SLOT(setValue(int))); #if QT_VERSION < 0x050000 masterVolumeSlider->setEnabled(false); masterVolumeSpinBox->setEnabled(false); #endif QGridLayout *soundGrid = new QGridLayout; soundGrid->addWidget(&soundEnabledCheckBox, 0, 0, 1, 4); soundGrid->addWidget(&masterVolumeLabel, 1, 0); soundGrid->addWidget(masterVolumeSlider, 1, 1); soundGrid->addWidget(masterVolumeSpinBox, 1, 2); soundGrid->addWidget(&soundPathLabel, 2, 0); soundGrid->addWidget(soundPathEdit, 2, 1); soundGrid->addWidget(soundPathClearButton, 2, 2); soundGrid->addWidget(soundPathButton, 2, 3); soundGrid->addWidget(&soundTestButton, 3, 1); soundGroupBox = new QGroupBox; soundGroupBox->setLayout(soundGrid); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addWidget(soundGroupBox); setLayout(mainLayout); }
CMSWindowsClientTaskBarReceiver::~CMSWindowsClientTaskBarReceiver() { ARCH->removeReceiver(this); for (UInt32 i = 0; i < kMaxState; ++i) { deleteIcon(m_icon[i]); } DestroyMenu(m_menu); destroyWindow(); }
void CMSWindowsPortableTaskBarReceiver::cleanup() { ARCH->removeReceiver(this); for (UInt32 i = 0; i < kMaxState; ++i) { deleteIcon(m_icon[i]); } DestroyMenu(m_menu); destroyWindow(); }
void HistoryForm::init() { m_model = new QStandardItemModel(historyListView); historyListView->setModel(m_model); m_model->setColumnCount(5); m_model->setHorizontalHeaderLabels(QStringList() << tr("Time") << tr("In/Out") << tr("From/To") << tr("Subject") << tr("Status")); historyListView->horizontalHeader()->setSortIndicator(HISTCOL_TIMESTAMP, Qt::DescendingOrder); #if QT_VERSION >= 0x050000 historyListView->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); #else historyListView->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents); #endif connect(historyListView->selectionModel(), SIGNAL(currentChanged(QModelIndex, QModelIndex)), SLOT(showCallDetails(QModelIndex))); inCheckBox->setChecked(true); outCheckBox->setChecked(true); successCheckBox->setChecked(true); missedCheckBox->setChecked(true); profileCheckBox->setChecked(true); timeLastViewed = phone->get_startup_time(); QIcon inviteIcon(QPixmap(":/icons/images/invite.png")); QIcon deleteIcon(QPixmap(":/icons/images/editdelete.png")); histPopupMenu = new QMenu(this); itemCall = histPopupMenu->addAction(inviteIcon, tr("Call..."), this, SLOT(call())); histPopupMenu->addAction(deleteIcon, tr("Delete"), this, SLOT(deleteEntry())); m_pixmapIn = QPixmap(":/icons/images/1leftarrow-yellow.png"); m_pixmapOut = QPixmap(":/icons/images/1rightarrow.png"); m_pixmapOk = QPixmap(":/icons/images/ok.png"); m_pixmapCancel = QPixmap(":/icons/images/cancel.png"); }
// // FUNCTION: gui_SetTrayIcon( PA_PluginParameters params ) // // PURPOSE: Put an icon in system tray // // COMMENTS: Flags and action determine what happens: Add, modify, delete, tool tip etc // Not available for pre-6.7 4D // IMPORTANT NOTE: This and sys_GetPrintJob use the same subclassed window procedure. // You cannot arbitrarily delete the function newProc // without breaking sys_GetPrintJob. // // DATE: dcc 08/04/01 // void gui_SetTrayIcon( PA_PluginParameters params ) { UINT iconHndl = 0; NOTIFYICONDATA nid; PNOTIFYICONDATA pnid; LONG_PTR returnValue = 0, iconID = 0, flags = 0, action = 0; char szTipParam[60], szBalloonInfo[255], szBalloonTitle[60]; char *pBalloonIconFlag; LONG_PTR arraySize = 0, procNbr = 0, storedProcNbr = 0, nbrParams = 0; LONG_PTR index; LONG_PTR errCode = 0; BOOL bFuncReturn = FALSE; BOOL shellOK = FALSE; //HWND hWnd; LONG_PTR count = -10; activeCalls.bTrayIcons = TRUE; pnid = &nid; count = count % 5; if ((sIsPriorTo67)) { // does not work with 6.5 plugin PA_ReturnLong( params, -1 ); return; } //hWnd = (HWND)PA_GetHWND(PA_GetWindowFocused()); // 3/2/04 Unnecessary nbrParams = getTrayIconParams(params, &action, &flags, &iconID, &procNbr, &iconHndl, szTipParam, szBalloonInfo, szBalloonTitle); index = findIconID( &startPtr, iconID, &storedProcNbr ); if (index == 0) { // not found if (isEmpty(startPtr)) { //processHandles.wpFourDOrigProc = (WNDPROC) SetWindowLong(windowHandles.fourDhWnd, GWL_WNDPROC, (LONG) newProc); // MJG 3/26/04 Replaced code above with function call. subclass4DWindowProcess(); } //add element to array bFuncReturn = insertIcon( &startPtr, iconID, procNbr); } else { if ((action == NIM_MODIFY) & (storedProcNbr != procNbr)) { // process nbr changed and modify request has been explicitly made bFuncReturn = updateIconIdProcNbr( &startPtr, iconID, procNbr ); } } //end if (index == 0) // must have version 5 of shell 32 for balloon feature // NOTIFYICONDATA structure is larger for balloon feature // also must be W2K for balloons if(GetDllVersion(TEXT("shell32.dll")) >= PACKVERSION(5,00)) { shellOK = TRUE; } if (shellOK) { if ((action >= 0) & (flags >= 0x010)) { nid.dwInfoFlags = 0; strcpy(nid.szInfo, szBalloonInfo); switch (szBalloonTitle[0]) // leading 1, 2, 0r 3 causes addition of icon { case '1' : pBalloonIconFlag = &szBalloonTitle[1]; if (*pBalloonIconFlag != '\0') { strcpy(nid.szInfoTitle, pBalloonIconFlag); nid.dwInfoFlags = NIIF_INFO; } break; case '2' : pBalloonIconFlag = &szBalloonTitle[1]; if (*pBalloonIconFlag != '\0') { strcpy(nid.szInfoTitle, pBalloonIconFlag); nid.dwInfoFlags = NIIF_WARNING; } break; case '3' : pBalloonIconFlag = &szBalloonTitle[1]; if (*pBalloonIconFlag != '\0') { strcpy(nid.szInfoTitle, pBalloonIconFlag); nid.dwInfoFlags = NIIF_ERROR; } break; default : strcpy(nid.szInfoTitle, szBalloonTitle); } nid.uTimeout = 10; if (flags & NIF_HIDE) { flags = flags & 0x001F; flags = flags | NIF_STATE; nid.dwState = NIS_HIDDEN; nid.dwStateMask = NIS_HIDDEN; } else { if (flags & NIF_SHOW) { flags = flags & 0x001F; flags = flags | NIF_STATE; nid.dwState = 0; nid.dwStateMask = NIS_HIDDEN; } } } } else { flags = (flags & 0xF); // must not send balloon flag when version not Win2K or above } nid.cbSize = sizeof(NOTIFYICONDATA); nid.hWnd = windowHandles.fourDhWnd; nid.uID = iconID; strcpy(nid.szTip, szTipParam); // can use this if balloon feature not available or not wanted nid.uVersion = 0; // REB 3/3/09 #16207 nid.uFlags = flags; // REB 2/18/10 #22656 switch (action) { case NIM_ADD : case NIM_MODIFY : case NIM_SETFOCUS : case NIM_SETVERSION : nid.uFlags = flags; nid.hIcon = (HICON)iconHndl; if (flags & NIF_MESSAGE) { nid.uCallbackMessage = WM_USER + 0x0021; // hex 21 is purely arbitrary } else { nid.uCallbackMessage = WM_NULL; } break; case NIM_DELETE : //if (index != 0) { // MJG 3/2/04 The element will still exist even if index is zero. returnValue = deleteIcon(&startPtr, iconID); //} } //bFuncReturn = Shell_NotifyIcon(NIM_SETVERSION, pnid); // REB 3/3/09 #16207 Force Win95 icon handling. bFuncReturn = Shell_NotifyIcon(action, pnid); //errCode = GetLastError(); //PA_ReturnLong( params, errCode ); PA_ReturnLong( params, (LONG_PTR)bFuncReturn ); }
dTrayIcon::~dTrayIcon() { deleteIcon(); };
AppearanceSettingsPage::AppearanceSettingsPage() { QIcon deleteIcon(":/resources/icon_delete.svg"); handBgEdit = new QLineEdit(settingsCache->getHandBgPath()); handBgEdit->setReadOnly(true); QPushButton *handBgClearButton = new QPushButton(deleteIcon, QString()); connect(handBgClearButton, SIGNAL(clicked()), this, SLOT(handBgClearButtonClicked())); QPushButton *handBgButton = new QPushButton("..."); connect(handBgButton, SIGNAL(clicked()), this, SLOT(handBgButtonClicked())); stackBgEdit = new QLineEdit(settingsCache->getStackBgPath()); stackBgEdit->setReadOnly(true); QPushButton *stackBgClearButton = new QPushButton(deleteIcon, QString()); connect(stackBgClearButton, SIGNAL(clicked()), this, SLOT(stackBgClearButtonClicked())); QPushButton *stackBgButton = new QPushButton("..."); connect(stackBgButton, SIGNAL(clicked()), this, SLOT(stackBgButtonClicked())); tableBgEdit = new QLineEdit(settingsCache->getTableBgPath()); tableBgEdit->setReadOnly(true); QPushButton *tableBgClearButton = new QPushButton(deleteIcon, QString()); connect(tableBgClearButton, SIGNAL(clicked()), this, SLOT(tableBgClearButtonClicked())); QPushButton *tableBgButton = new QPushButton("..."); connect(tableBgButton, SIGNAL(clicked()), this, SLOT(tableBgButtonClicked())); playerAreaBgEdit = new QLineEdit(settingsCache->getPlayerBgPath()); playerAreaBgEdit->setReadOnly(true); QPushButton *playerAreaBgClearButton = new QPushButton(deleteIcon, QString()); connect(playerAreaBgClearButton, SIGNAL(clicked()), this, SLOT(playerAreaBgClearButtonClicked())); QPushButton *playerAreaBgButton = new QPushButton("..."); connect(playerAreaBgButton, SIGNAL(clicked()), this, SLOT(playerAreaBgButtonClicked())); cardBackPicturePathEdit = new QLineEdit(settingsCache->getCardBackPicturePath()); cardBackPicturePathEdit->setReadOnly(true); QPushButton *cardBackPicturePathClearButton = new QPushButton(deleteIcon, QString()); connect(cardBackPicturePathClearButton, SIGNAL(clicked()), this, SLOT(cardBackPicturePathClearButtonClicked())); QPushButton *cardBackPicturePathButton = new QPushButton("..."); connect(cardBackPicturePathButton, SIGNAL(clicked()), this, SLOT(cardBackPicturePathButtonClicked())); QGridLayout *zoneBgGrid = new QGridLayout; zoneBgGrid->addWidget(&handBgLabel, 0, 0); zoneBgGrid->addWidget(handBgEdit, 0, 1); zoneBgGrid->addWidget(handBgClearButton, 0, 2); zoneBgGrid->addWidget(handBgButton, 0, 3); zoneBgGrid->addWidget(&stackBgLabel, 1, 0); zoneBgGrid->addWidget(stackBgEdit, 1, 1); zoneBgGrid->addWidget(stackBgClearButton, 1, 2); zoneBgGrid->addWidget(stackBgButton, 1, 3); zoneBgGrid->addWidget(&tableBgLabel, 2, 0); zoneBgGrid->addWidget(tableBgEdit, 2, 1); zoneBgGrid->addWidget(tableBgClearButton, 2, 2); zoneBgGrid->addWidget(tableBgButton, 2, 3); zoneBgGrid->addWidget(&playerAreaBgLabel, 3, 0); zoneBgGrid->addWidget(playerAreaBgEdit, 3, 1); zoneBgGrid->addWidget(playerAreaBgClearButton, 3, 2); zoneBgGrid->addWidget(playerAreaBgButton, 3, 3); zoneBgGrid->addWidget(&cardBackPicturePathLabel, 4, 0); zoneBgGrid->addWidget(cardBackPicturePathEdit, 4, 1); zoneBgGrid->addWidget(cardBackPicturePathClearButton, 4, 2); zoneBgGrid->addWidget(cardBackPicturePathButton, 4, 3); zoneBgGroupBox = new QGroupBox; zoneBgGroupBox->setLayout(zoneBgGrid); displayCardNamesCheckBox.setChecked(settingsCache->getDisplayCardNames()); connect(&displayCardNamesCheckBox, SIGNAL(stateChanged(int)), settingsCache, SLOT(setDisplayCardNames(int))); cardScalingCheckBox.setChecked(settingsCache->getScaleCards()); connect(&cardScalingCheckBox, SIGNAL(stateChanged(int)), settingsCache, SLOT(setCardScaling(int))); QGridLayout *cardsGrid = new QGridLayout; cardsGrid->addWidget(&displayCardNamesCheckBox, 0, 0, 1, 2); cardsGrid->addWidget(&cardScalingCheckBox, 1, 0, 1, 2); cardsGroupBox = new QGroupBox; cardsGroupBox->setLayout(cardsGrid); horizontalHandCheckBox.setChecked(settingsCache->getHorizontalHand()); connect(&horizontalHandCheckBox, SIGNAL(stateChanged(int)), settingsCache, SLOT(setHorizontalHand(int))); leftJustifiedHandCheckBox.setChecked(settingsCache->getLeftJustified()); connect(&leftJustifiedHandCheckBox, SIGNAL(stateChanged(int)), settingsCache, SLOT(setLeftJustified(int))); QGridLayout *handGrid = new QGridLayout; handGrid->addWidget(&horizontalHandCheckBox, 0, 0, 1, 2); handGrid->addWidget(&leftJustifiedHandCheckBox, 1, 0, 1, 2); handGroupBox = new QGroupBox; handGroupBox->setLayout(handGrid); invertVerticalCoordinateCheckBox.setChecked(settingsCache->getInvertVerticalCoordinate()); connect(&invertVerticalCoordinateCheckBox, SIGNAL(stateChanged(int)), settingsCache, SLOT(setInvertVerticalCoordinate(int))); minPlayersForMultiColumnLayoutEdit.setMinimum(2); minPlayersForMultiColumnLayoutEdit.setValue(settingsCache->getMinPlayersForMultiColumnLayout()); connect(&minPlayersForMultiColumnLayoutEdit, SIGNAL(valueChanged(int)), settingsCache, SLOT(setMinPlayersForMultiColumnLayout(int))); minPlayersForMultiColumnLayoutLabel.setBuddy(&minPlayersForMultiColumnLayoutEdit); QGridLayout *tableGrid = new QGridLayout; tableGrid->addWidget(&invertVerticalCoordinateCheckBox, 0, 0, 1, 2); tableGrid->addWidget(&minPlayersForMultiColumnLayoutLabel, 1, 0, 1, 1); tableGrid->addWidget(&minPlayersForMultiColumnLayoutEdit, 1, 1, 1, 1); tableGroupBox = new QGroupBox; tableGroupBox->setLayout(tableGrid); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addWidget(zoneBgGroupBox); mainLayout->addWidget(cardsGroupBox); mainLayout->addWidget(handGroupBox); mainLayout->addWidget(tableGroupBox); setLayout(mainLayout); }
EWXWEXPORT(void,wxIcon_SafeDelete)(wxIcon* obj) { deleteIcon(obj); }