GnuCash  5.6-150-g038405b370+
Public Member Functions
StockAssistantView Class Reference

Contains the pages and manages displaying them one at a time. More...

Public Member Functions

 StockAssistantView (GtkBuilder *builder, Account *account, GtkWidget *parent)
 
void connect (StockAssistantModel *)
 Calls each page's connect function. More...
 
void prepare (int page, StockAssistantModel *)
 Calls the specified page's prepare function. More...
 
GtkWidget * window ()
 

Detailed Description

Contains the pages and manages displaying them one at a time.

Definition at line 2445 of file assistant-stock-transaction.cpp.

Member Function Documentation

◆ connect()

void StockAssistantView::connect ( StockAssistantModel *  model)

Calls each page's connect function.

Parameters
Themodel.

Definition at line 2530 of file assistant-stock-transaction.cpp.

2531 {
2532  m_type_page.connect(model);
2533  m_deets_page.connect(model);
2534  m_stock_amount_page.connect(model->stock_entry());
2535  m_stock_value_page.connect(model->stock_entry());
2536  m_cash_page.connect(model->cash_entry());
2537  m_fees_page.connect(model->fees_entry());
2538  m_dividend_page.connect(model->dividend_entry());
2539  m_capgain_page.connect(model->capgains_entry());
2540 
2541  gtk_assistant_set_forward_page_func (GTK_ASSISTANT(m_window),
2542  (GtkAssistantPageFunc)forward_page_func,
2543  model, nullptr);
2544 }
StockTransactionEntry * fees_entry()
Accessor.
StockTransactionEntry * dividend_entry()
Accessor.
StockTransactionEntry * capgains_entry()
Accessor.
StockTransactionEntry * cash_entry()
Accessor.
StockTransactionEntry * stock_entry()
Accessor.

◆ prepare()

void StockAssistantView::prepare ( int  page,
StockAssistantModel *  model 
)

Calls the specified page's prepare function.

As with connect the association with the model's entry might be better at the Assistant level.

Parameters
pageThe page who's prepare function to call.
model

Definition at line 2547 of file assistant-stock-transaction.cpp.

2548 {
2549  g_return_if_fail (page < PAGE_STOCK_AMOUNT || model->txn_type_valid());
2550  switch (page)
2551  {
2552  case PAGE_TRANSACTION_TYPE:
2553  if (!model->maybe_reset_txn_types())
2554  break;
2555  m_type_page.prepare(model);
2556  break;
2557  case PAGE_TRANSACTION_DETAILS:
2558  m_deets_page.prepare(model);
2559  break;
2560  case PAGE_STOCK_AMOUNT:
2561  {
2562  m_stock_amount_page.prepare(model->stock_entry());
2563  break;
2564  }
2565  case PAGE_STOCK_VALUE:
2566  m_stock_value_page.prepare(model->stock_entry());
2567  break;
2568  case PAGE_CASH:
2569  m_cash_page.prepare(model->cash_entry());
2570  break;
2571  case PAGE_FEES:
2572  {
2573  m_fees_page.prepare(model->fees_entry());
2574  break;
2575  }
2576  case PAGE_DIVIDEND:
2577  m_dividend_page.prepare(model->dividend_entry());
2578  break;
2579  case PAGE_CAPGAINS:
2580  {
2581  m_capgain_page.prepare(model->capgains_entry());
2582  break;
2583  }
2584  case PAGE_FINISH:
2585  {
2586  m_finish_page.prepare (m_window, model);
2587  break;
2588  }
2589  default:
2590  break;
2591  }
2592 }
StockTransactionEntry * fees_entry()
Accessor.
StockTransactionEntry * dividend_entry()
Accessor.
bool maybe_reset_txn_types()
Selects a TxnTypevec for the user to pick from depending on whether the account has a positive...
StockTransactionEntry * capgains_entry()
Accessor.
StockTransactionEntry * cash_entry()
Accessor.
StockTransactionEntry * stock_entry()
Accessor.

The documentation for this class was generated from the following file: