Example #1
0
void wizardDisk::programInit()
{
  prevID = 0;

  populateDiskInfo();

  //connect(pushClose, SIGNAL(clicked()), this, SLOT(slotClose()));
  connect(pushSizeMount, SIGNAL(clicked()), this, SLOT(slotResizeFS()));
  connect(pushRemoveMount, SIGNAL(clicked()), this, SLOT(slotRemoveFS()));
  connect(pushAddMount, SIGNAL(clicked()), this, SLOT(slotAddFS()));
  connect(this,SIGNAL(currentIdChanged(int)),this,SLOT(slotCheckComplete()));
  connect(comboDisk,SIGNAL(currentIndexChanged(int)),this,SLOT(slotCheckComplete()));
  connect(comboDisk,SIGNAL(currentIndexChanged(int)),this,SLOT(slotChangedDisk()));
  connect(comboPartition,SIGNAL(currentIndexChanged(int)),this,SLOT(slotCheckComplete()));
  connect(treeMounts,SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)),this,SLOT(slotTreeDiskChanged()));
  treeMounts->setContextMenuPolicy(Qt::CustomContextMenu);
  connect(treeMounts,SIGNAL(customContextMenuRequested(const QPoint &)),this,SLOT(slotTreeMountsRightClick()));
  connect(pushTerminal, SIGNAL(clicked()), this, SLOT(slotTerminal()));

  // ZFS Mode Page
  connect(comboZFSMode,SIGNAL(currentIndexChanged(int)),this,SLOT(slotCheckComplete()));
  connect(groupZFSOpts,SIGNAL(clicked(bool)),this,SLOT(slotCheckComplete()));
  connect(listZFSDisks,SIGNAL(itemClicked(QListWidgetItem *)),this,SLOT(slotCheckComplete()));
  connect(listZFSDisks,SIGNAL(itemActivated(QListWidgetItem *)),this,SLOT(slotCheckComplete()));
  connect(listZFSDisks,SIGNAL(itemChanged(QListWidgetItem *)),this,SLOT(slotCheckComplete()));

}
Example #2
0
void wizardDisk::programInit()
{
  prevID = 0;
  restoreMode=false;

  populateDiskInfo();

  nextS = new QShortcut(Qt::ALT + Qt::Key_N, this);
  connect(nextS, SIGNAL(activated()), this, SLOT(slotNext()) );
  this->button(QWizard::BackButton)->setShortcut(Qt::ALT + Qt::Key_B);

  //connect(pushClose, SIGNAL(clicked()), this, SLOT(slotClose()));
  connect(pushSwapSize, SIGNAL(clicked()), this, SLOT(slotSwapSize()));
  connect(pushRemoveMount, SIGNAL(clicked()), this, SLOT(slotRemoveFS()));
  connect(pushAddMount, SIGNAL(clicked()), this, SLOT(slotAddFS()));
  connect(this,SIGNAL(currentIdChanged(int)),this,SLOT(slotCheckComplete()));
  connect(lineZpoolName,SIGNAL(textChanged ( const QString & )),this,SLOT(slotCheckComplete()));
  connect(groupZFSPool,SIGNAL( clicked(bool)),this,SLOT(slotCheckComplete()));
  connect(comboDisk,SIGNAL(currentIndexChanged(int)),this,SLOT(slotCheckComplete()));
  connect(comboDisk,SIGNAL(currentIndexChanged(int)),this,SLOT(slotChangedDisk()));
  connect(comboPartition,SIGNAL(currentIndexChanged(int)),this,SLOT(slotCheckComplete()));
  connect(treeMounts,SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)),this,SLOT(slotTreeDiskChanged()));
  treeMounts->setContextMenuPolicy(Qt::CustomContextMenu);
  connect(treeMounts,SIGNAL(customContextMenuRequested(const QPoint &)),this,SLOT(slotTreeMountsRightClick()));
  //connect(pushTerminal, SIGNAL(clicked()), this, SLOT(slotTerminal()));

  // ZFS Mode Page
  connect(comboZFSMode,SIGNAL(currentIndexChanged(int)),this,SLOT(slotCheckComplete()));
  connect(groupZFSOpts,SIGNAL(clicked(bool)),this,SLOT(slotCheckComplete()));
  connect(listZFSDisks,SIGNAL(itemClicked(QListWidgetItem *)),this,SLOT(slotCheckComplete()));
  connect(listZFSDisks,SIGNAL(itemActivated(QListWidgetItem *)),this,SLOT(slotCheckComplete()));
  connect(listZFSDisks,SIGNAL(itemChanged(QListWidgetItem *)),this,SLOT(slotCheckComplete()));
  connect(groupZFSCache,SIGNAL(clicked(bool)),this,SLOT(slotCheckComplete()));
  connect(listZFSCache,SIGNAL(itemClicked(QListWidgetItem *)),this,SLOT(slotCheckComplete()));
  connect(listZFSCache,SIGNAL(itemActivated(QListWidgetItem *)),this,SLOT(slotCheckComplete()));
  connect(listZFSCache,SIGNAL(itemChanged(QListWidgetItem *)),this,SLOT(slotCheckComplete()));
  connect(groupZFSLog,SIGNAL(clicked(bool)),this,SLOT(slotCheckComplete()));
  connect(listZFSLog,SIGNAL(itemClicked(QListWidgetItem *)),this,SLOT(slotCheckComplete()));
  connect(listZFSLog,SIGNAL(itemActivated(QListWidgetItem *)),this,SLOT(slotCheckComplete()));
  connect(listZFSLog,SIGNAL(itemChanged(QListWidgetItem *)),this,SLOT(slotCheckComplete()));
  connect(groupEncrypt,SIGNAL(clicked(bool)),this,SLOT(slotCheckComplete()));
  connect(lineEncPass,SIGNAL(textChanged(const QString &)),this,SLOT(slotCheckComplete()));
  connect(lineEncPass2,SIGNAL(textChanged(const QString &)),this,SLOT(slotCheckComplete()));

  // Check if we are running in EFI mode
  if ( system("sysctl -n machdep.bootmethod | grep -q 'UEFI'") == 0 ) {
    efiMode=true;
    radioMBR->setEnabled(false);
    radioGPT->setChecked(true);
    checkRefind->setChecked(true);
    checkRefind->setHidden(false);
  } else {
    efiMode=false;
    radioMBR->setEnabled(true);
    radioGPT->setChecked(true);
    checkRefind->setHidden(true);
  }
  groupEncrypt->setEnabled(!efiMode);
  if(!efiMode){ groupEncrypt->setToolTip( tr("GELI encryption is not currently supported when booting with UEFI") ); }
}
Example #3
0
void wizardDisk::programInit()
{
  prevID = 0;
  restoreMode=false;

  populateDiskInfo();

  //connect(pushClose, SIGNAL(clicked()), this, SLOT(slotClose()));
  connect(radioUEFI, SIGNAL(clicked()), this, SLOT(slotUEFIClicked()));
  connect(radioBIOS, SIGNAL(clicked()), this, SLOT(slotUEFIClicked()));
  connect(pushSwapSize, SIGNAL(clicked()), this, SLOT(slotSwapSize()));
  connect(pushRemoveMount, SIGNAL(clicked()), this, SLOT(slotRemoveFS()));
  connect(pushAddMount, SIGNAL(clicked()), this, SLOT(slotAddFS()));
  connect(this,SIGNAL(currentIdChanged(int)),this,SLOT(slotCheckComplete()));
  connect(lineZpoolName,SIGNAL(textChanged ( const QString & )),this,SLOT(slotCheckComplete()));
  connect(groupZFSPool,SIGNAL( clicked(bool)),this,SLOT(slotCheckComplete()));
  connect(comboDisk,SIGNAL(currentIndexChanged(int)),this,SLOT(slotCheckComplete()));
  connect(comboDisk,SIGNAL(currentIndexChanged(int)),this,SLOT(slotChangedDisk()));
  connect(comboPartition,SIGNAL(currentIndexChanged(int)),this,SLOT(slotCheckComplete()));
  connect(treeMounts,SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)),this,SLOT(slotTreeDiskChanged()));
  treeMounts->setContextMenuPolicy(Qt::CustomContextMenu);
  connect(treeMounts,SIGNAL(customContextMenuRequested(const QPoint &)),this,SLOT(slotTreeMountsRightClick()));
  connect(pushTerminal, SIGNAL(clicked()), this, SLOT(slotTerminal()));

  // ZFS Mode Page
  connect(comboZFSMode,SIGNAL(currentIndexChanged(int)),this,SLOT(slotCheckComplete()));
  connect(groupZFSOpts,SIGNAL(clicked(bool)),this,SLOT(slotCheckComplete()));
  connect(listZFSDisks,SIGNAL(itemClicked(QListWidgetItem *)),this,SLOT(slotCheckComplete()));
  connect(listZFSDisks,SIGNAL(itemActivated(QListWidgetItem *)),this,SLOT(slotCheckComplete()));
  connect(listZFSDisks,SIGNAL(itemChanged(QListWidgetItem *)),this,SLOT(slotCheckComplete()));
  connect(groupZFSCache,SIGNAL(clicked(bool)),this,SLOT(slotCheckComplete()));
  connect(listZFSCache,SIGNAL(itemClicked(QListWidgetItem *)),this,SLOT(slotCheckComplete()));
  connect(listZFSCache,SIGNAL(itemActivated(QListWidgetItem *)),this,SLOT(slotCheckComplete()));
  connect(listZFSCache,SIGNAL(itemChanged(QListWidgetItem *)),this,SLOT(slotCheckComplete()));
  connect(groupZFSLog,SIGNAL(clicked(bool)),this,SLOT(slotCheckComplete()));
  connect(listZFSLog,SIGNAL(itemClicked(QListWidgetItem *)),this,SLOT(slotCheckComplete()));
  connect(listZFSLog,SIGNAL(itemActivated(QListWidgetItem *)),this,SLOT(slotCheckComplete()));
  connect(listZFSLog,SIGNAL(itemChanged(QListWidgetItem *)),this,SLOT(slotCheckComplete()));
  connect(groupEncrypt,SIGNAL(clicked(bool)),this,SLOT(slotCheckComplete()));
  connect(lineEncPass,SIGNAL(textChanged(const QString &)),this,SLOT(slotCheckComplete()));
  connect(lineEncPass2,SIGNAL(textChanged(const QString &)),this,SLOT(slotCheckComplete()));

  // Check if we are running in EFI mode
  if ( system("kenv grub.platform | grep -q 'efi'") == 0 ) {
     radioUEFI->setChecked(true);
     efiMode=true;
  } else {
     radioBIOS->setChecked(true);
     efiMode=false;
  }
  slotUEFIClicked();
}