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 2447 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 2532 of file assistant-stock-transaction.cpp.

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

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