Esempio n. 1
0
  private void checkCurrentStyle() {
    for (QAction action : styleActionGroup.actions()) {
      String styleName = action.data().toString();
      QStyle candidate = QStyleFactory.create(styleName);

      if (candidate.objectName().equals(QApplication.style().objectName())) {
        action.trigger();
        return;
      }
    }
  }
Esempio n. 2
0
  private void changeStyle(boolean checked) {
    if (!checked) return;

    QAction action = (QAction) QSignalEmitter.signalSender();
    QStyle style = QStyleFactory.create((String) action.data());

    if (style != null) {
      QApplication.setStyle(style);
      QApplication.setPalette(style.standardPalette());
    }

    setTextOnRadioButtons();

    changeSize(true);
  }
Esempio n. 3
0
 private void save() {
   QAction action = (QAction) QSignalEmitter.signalSender();
   QByteArray fileFormat = QVariant.toByteArray(action.data());
   saveFile(new String(fileFormat.toByteArray()));
 }