Subversion Repositories Code-Repo

Rev

Rev 350 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 350 Rev 351
Line 204... Line 204...
204
 
204
 
205
    if (macroCount == 1)
205
    if (macroCount == 1)
206
        btnRemoveMacro->setEnabled(false);
206
        btnRemoveMacro->setEnabled(false);
207
}
207
}
208
 
208
 
-
 
209
void MacroController::Macro_Clear()
-
 
210
{
-
 
211
    for (int i = 0; i < macroCount; i++) {
-
 
212
        macroNameList[i]->setText(QString("Macro %1").arg(i+1));
-
 
213
        macroValueList[i]->clear();
-
 
214
        macroBtnKeyList[i]->setText("Hotkey: None");
-
 
215
    }
-
 
216
    registeredKeyMacroIDs.clear();
-
 
217
    registeredKeySequences.clear();
-
 
218
}
-
 
219
 
209
void MacroController::Macro_WriteToFile()
220
void MacroController::Macro_WriteToFile()
210
{
221
{
211
    QString file = QFileDialog::getSaveFileName(this, "Settings XML File", lastKnownFilePath, "XML File (*.xml)");
222
    QString file = QFileDialog::getSaveFileName(this, "Settings XML File", lastKnownFilePath, "XML File (*.xml)");
212
    QCoreApplication::processEvents(); // Wait for dialog to close
223
    QCoreApplication::processEvents(); // Wait for dialog to close
213
 
224
 
Line 330... Line 341...
330
            }
341
            }
331
        }
342
        }
332
    }
343
    }
333
}
344
}
334
 
345
 
335
void MacroController::Macro_Clear()
-
 
336
{
-
 
337
    for (int i = 0; i < macroCount; i++) {
-
 
338
        macroNameList[i]->setText(QString("Macro %1").arg(i+1));
-
 
339
        macroValueList[i]->clear();
-
 
340
        macroBtnKeyList[i]->setText("Hotkey: None");
-
 
341
    }
-
 
342
    registeredKeyMacroIDs.clear();
-
 
343
    registeredKeySequences.clear();
-
 
344
}
-
 
345
 
-
 
346
bool MacroController::eventFilter(QObject *obj, QEvent *event)
346
bool MacroController::eventFilter(QObject *obj, QEvent *event)
347
{
347
{
348
    // Only process keyboard events
348
    // Only process keyboard events
349
    if (event->type() == QEvent::KeyPress) {
349
    if (event->type() == QEvent::KeyPress) {
350
        QKeyEvent *keyevent = static_cast<QKeyEvent*>(event);
350
        QKeyEvent *keyevent = static_cast<QKeyEvent*>(event);