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 2444 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 2529 of file assistant-stock-transaction.cpp.

2530 {
2531  m_type_page.connect(model);
2532  m_deets_page.connect(model);
2533  m_stock_amount_page.connect(model->stock_entry());
2534  m_stock_value_page.connect(model->stock_entry());
2535  m_cash_page.connect(model->cash_entry());
2536  m_fees_page.connect(model->fees_entry());
2537  m_dividend_page.connect(model->dividend_entry());
2538  m_capgain_page.connect(model->capgains_entry());
2539 
2540  gtk_assistant_set_forward_page_func (GTK_ASSISTANT(m_window),
2541  (GtkAssistantPageFunc)forward_page_func,
2542  model, nullptr);
2543 }
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 2546 of file assistant-stock-transaction.cpp.

2547 {
2548  g_return_if_fail (page < PAGE_STOCK_AMOUNT || model->txn_type_valid());
2549  switch (page)
2550  {
2551  case PAGE_TRANSACTION_TYPE:
2552  if (!model->maybe_reset_txn_types())
2553  break;
2554  m_type_page.prepare(model);
2555  break;
2556  case PAGE_TRANSACTION_DETAILS:
2557  m_deets_page.prepare(model);
2558  break;
2559  case PAGE_STOCK_AMOUNT:
2560  {
2561  m_stock_amount_page.prepare(model->stock_entry());
2562  break;
2563  }
2564  case PAGE_STOCK_VALUE:
2565  m_stock_value_page.prepare(model->stock_entry());
2566  break;
2567  case PAGE_CASH:
2568  m_cash_page.prepare(model->cash_entry());
2569  break;
2570  case PAGE_FEES:
2571  {
2572  m_fees_page.prepare(model->fees_entry());
2573  break;
2574  }
2575  case PAGE_DIVIDEND:
2576  m_dividend_page.prepare(model->dividend_entry());
2577  break;
2578  case PAGE_CAPGAINS:
2579  {
2580  m_capgain_page.prepare(model->capgains_entry());
2581  break;
2582  }
2583  case PAGE_FINISH:
2584  {
2585  m_finish_page.prepare (m_window, model);
2586  break;
2587  }
2588  default:
2589  break;
2590  }
2591 }
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: