Changeset 748 for trunk


Ignore:
Timestamp:
04/10/01 12:20:13 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Cosy
Files:
3 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/Makefile

    r738 r748  
    5757
    5858#------------------------------------------------------------------------------
    59 #.SILENT:
     59.SILENT:
    6060
    6161.SUFFIXES: .c .cc .h .o
  • trunk/MagicSoft/Cosy/Starguider.cc

    r738 r748  
    3030    IDM_kRate30s,
    3131    IDM_kRate1m,
    32     IDM_kRate5m
     32    IDM_kRate5m,
     33    IDM_kSetup,
     34    IDM_kLimMag3,
     35    IDM_kLimMag4,
     36    IDM_kLimMag5,
     37    IDM_kLimMag6,
     38    IDM_kLimMag7,
     39    IDM_kLimMag8,
     40    IDM_kLimMag9
    3341};
    3442
     
    8896    fList.Add(fWrite);
    8997
     98    fLimMag = new TGPopupMenu(p);
     99    fLimMag->AddEntry("3", IDM_kLimMag3);
     100    fLimMag->AddEntry("4", IDM_kLimMag4);
     101    fLimMag->AddEntry("5", IDM_kLimMag5);
     102    fLimMag->AddEntry("6", IDM_kLimMag6);
     103    fLimMag->AddEntry("7", IDM_kLimMag7);
     104    fLimMag->AddEntry("8", IDM_kLimMag8);
     105    fLimMag->AddEntry("9", IDM_kLimMag9);
     106    fLimMag->CheckEntry(IDM_kLimMag8);
     107    fLimMag->Associate(this);
     108    fList.Add(fLimMag);
     109
     110    fSao.SetLimitMag(8.0);
     111
     112    fSetup = new TGPopupMenu(p);
     113    fSetup->AddPopup("Lim. &Magnitude", fLimMag);
     114    fSetup->Associate(this);
     115    fList.Add(fSetup);
     116
    90117    fMenu = new TGMenuBar(this, 0, 0, kHorizontalFrame);
    91118    fMenu->AddPopup("&Display", fDisplay, NULL);
    92119    fMenu->AddPopup("&Write",   fWrite,   NULL);
     120    fMenu->AddPopup("&Setup",   fSetup,   NULL);
    93121    fMenu->Resize(fMenu->GetDefaultSize());
    94122    AddFrame(fMenu); //, new TGLayoutHints (kLHintsNormal, 0, 4, 0, 0));
     
    128156    MapWindow();
    129157
    130 
    131     fSao.SetLimitMag(9.0);
    132158    fSao.SetPixSize(0.006);
    133159}
     
    243269                }
    244270                return kTRUE;
     271
     272            case IDM_kLimMag3:
     273            case IDM_kLimMag4:
     274            case IDM_kLimMag5:
     275            case IDM_kLimMag6:
     276            case IDM_kLimMag7:
     277            case IDM_kLimMag8:
     278            case IDM_kLimMag9:
     279                for (int i=IDM_kLimMag3; i<=IDM_kLimMag9; i++)
     280                    if (mp1==i)
     281                        fLimMag->CheckEntry(i);
     282                    else
     283                        fLimMag->UnCheckEntry(i);
     284
     285                fSao.SetLimitMag(mp1-IDM_kLimMag3+3);
     286                return kTRUE;
    245287            }
    246288            break;
  • trunk/MagicSoft/Cosy/Starguider.h

    r738 r748  
    3232    TGPopupMenu   *fWriteType;
    3333    TGPopupMenu   *fWriteRate;
     34    TGPopupMenu   *fSetup;
     35    TGPopupMenu   *fLimMag;
    3436
    3537    MGCoordinates *fCRaDec;
  • trunk/MagicSoft/Cosy/base/File.cc

    r732 r748  
    66{
    77    f = fopen(name, flags);
     8    if (!f)
     9        printf("WARNING: Cannot open '%s'\n", name);
    810}
    911
  • trunk/MagicSoft/Cosy/base/File.h

    r732 r748  
    2727    void Newline() const;
    2828    void Skip(int cnt) const;
     29
     30    int operator!() { return !f; }
    2931};
    3032
  • trunk/MagicSoft/Cosy/catalog/SaoFile.cc

    r740 r748  
    6666{
    6767    file = new File(name, "r");
     68
     69    if (!*file)
     70        exit(0);
    6871
    6972    compressed = !strcasecmp(name+strlen(name)-4, ".cmp");
  • trunk/MagicSoft/Cosy/catalog/StarCatalog.cc

    r740 r748  
    2828    // read index file
    2929    //
    30     File idx("sao-sort.idx", "r");
     30    File idx("sao/sao-sort.idx", "r");
     31
     32    if (!idx)
     33        exit(0);
     34
    3135    while (!idx.Eof())
    3236    {
     
    5054    // open catalog
    5155    //
    52     fSao = new SaoFile("sao-sort.cmp");
     56    fSao = new SaoFile("sao/sao-sort.cmp");
    5357}
    5458
Note: See TracChangeset for help on using the changeset viewer.