Example #1
0
bool CQPlotSubwidget::updateProtected(ListViews::ObjectType objectType, ListViews::Action action, const CCommonName & cn)
{
  if (mIgnoreUpdates || isHidden()) return true;

  switch (objectType)
    {
      //TODO: check list:
      case ListViews::ObjectType::MODEL:
        switch (action)
          {
            case ListViews::DELETE:
            case ListViews::ADD:
              mpObject = NULL;
              mObjectCN.clear();
              return enterProtected();
              break;

            default:
              break;
          }

        break;

      case ListViews::ObjectType::PLOT:
        if (cn == mObjectCN)
          {
            switch (action)
              {
                case ListViews::DELETE:
                  mpObject = NULL;
                  mObjectCN.clear();
                  return enterProtected();
                  break;

                case ListViews::CHANGE:
                  return enterProtected();
                  break;

                default:
                  break;
              }
          }

        break;

      default:
        break;
    }

  return true;
}
Example #2
0
void CQTabWidget::slotBtnCommit()
{
  mpBtnCommit->setFocus();

  leaveProtected();
  enterProtected();
}
Example #3
0
bool CQReportsWidget::update(ListViews::ObjectType C_UNUSED(objectType), ListViews::Action C_UNUSED(action), const std::string & C_UNUSED(key))
{
  if (!mIgnoreUpdates && isVisible())
    {
      enterProtected();
    }

  return true;
}
Example #4
0
// virtual
bool CQLayoutsWidget::update(ListViews::ObjectType /* objectType */, ListViews::Action /* action */, const std::string & /* key */)
{
  if (!mIgnoreUpdates)
    {
      enterProtected();
    }

  return true;
}
Example #5
0
bool CQGlobalQuantitiesWidget::update(ListViews::ObjectType objectType, ListViews::Action C_UNUSED(action), const std::string & C_UNUSED(key))
{
  if (!mIgnoreUpdates &&
      objectType == ListViews::MODEL)
    {
      enterProtected();
    }

  return true;
}
Example #6
0
bool CopasiWidget::enter(const std::string & key)
{
  mKey = key;
  mpObject = CCopasiRootContainer::getKeyFactory()->get(key);

  if (mpObject != NULL)
    {
      mpDataModel = mpObject->getObjectDataModel();
    }
  else
    {
      mpDataModel = NULL;
    }

  return enterProtected();
}
Example #7
0
bool CopasiWidget::enter(const CCommonName & cn)
{
  if (mpListView == NULL)
    {
      initContext();
    }

  mObjectCN = cn;
  mOldCN = cn;

  CObjectInterface::ContainerList List;
  List.push_back(mpDataModel);

  // This will check the current data model and the root container for the object;
  mpObject = const_cast< CDataObject * >(CObjectInterface::DataObject(CObjectInterface::GetObjectFromCN(List, mObjectCN)));
  mObjectType = mpObject != NULL ? ListViews::DataObjectType.toEnum(mpObject->getObjectType(), ListViews::ObjectType::RESULT) : ListViews::ObjectType::RESULT;

  return enterProtected();
}
Example #8
0
bool CQRDFTreeView::updateProtected(ListViews::ObjectType /* objectType */,
                                    ListViews::Action /* action */,
                                    const CCommonName & cn)
{
  // Assure that the pointer is still valid;
  mpAnnotation = CAnnotation::castObject(mpObject);

  if (mIgnoreUpdates || !isVisible())
    {
      return true;
    }

  if (cn == mObjectCN)
    {
      return enterProtected();
    }

  return true;
}
void kernel_init(struct multiboot *mboot_ptr) { 
  
  //Reprogram PICs
  cli();
  init_pics(0x20, 0x28);
  sti();
  
  //Initialize Terminal
  terminal_initialize();
  
  kinfo("Enable A20 Gate (if not already done)\n");
  //Enable A20 Gate if it is not already enabled.
  if (checkA20() = 0)
    enableA20();
  
  //Check if A20 is REALLY enabled
  if (checkA20() = 0)
    panic("Enabling A20 Gate");
  
  //Enable the timer and setting it to 50hz
  kinfo("Enable Timer (50hz)");
  init_timer(50);
  
  //Initiate the descriptor tables (gdt and idt)
  init_descriptor_tables();
  
  //Enter the protected mode
  kinfo("Enter protected mode");
  enterProtected();
  
  //Spawning the init process with argument *mboot_ptr
  kinfo("Spawning Init process...");
  init(*mboot_ptr);
  
  //The init process should NEVER die.
  //If it dies
  kerror("Init Process terminated... make a kernel panic...");
  panic("Unendable Process ended.");
}
Example #10
0
void CQTabWidget::slotBtnRevert()
{
  enterProtected();
}