/*public*/ void AddEntryExitPairFrame::initComponents(LayoutEditor* panel) //throws Exception
{
 // the following code sets the frame's initial state

 nxPanel = new AddEntryExitPairPanel(panel);

 setTitle("Add Entry Exit Points");
 //getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS));
 QWidget* centralWidget = new QWidget;
 QVBoxLayout* centralWidgetLayout = new QVBoxLayout(centralWidget);
 setCentralWidget(centralWidget);

centralWidgetLayout->addWidget(nxPanel);

 QMenuBar* menuBar = new QMenuBar();//getJMenuBar();
 QAction* options = new QAction(tr("Options"), this);
 menuBar->addAction(options);
// options.addActionListener(new ActionListener() {
//     /*public*/ void actionPerformed(ActionEvent event) {
//         nxPanel.optionWindow(event);
//     }
// });
 connect(options, SIGNAL(triggered()), this, SLOT(on_options()));

 setMenuBar(menuBar);
 addHelpMenu("package.jmri.jmrit.signalling.EntryExitFrame", true);
 // pack for display
 adjustSize();
}
Пример #2
0
static int on_list_item_selected(SsdWidget widget, const char *new_value, const void *value)
{
   if( (new_value != NULL )&& (strcmp(new_value, roadmap_lang_get(COULDNT_FIND_ADDRESS_TEXT))==0))
   {
      send_error_report();
      generic_search_dlg_switch_gui();
   }
   else
   {
      on_options( NULL, NULL, NULL);
   }
   return 0;
}
Пример #3
0
static int on_list_item_selected(SsdWidget widget, const char *new_value, const void *value)
{
   on_options( NULL, NULL, NULL);
   return 0;
}