Search in sources :

Example 11 with OutPara

use of com.tencent.wstt.gt.OutPara in project GT by Tencent.

the class OpUIManager method getACOutputParams.

public static List<OutPara> getACOutputParams() {
    List<OutPara> show_ov = new ArrayList<OutPara>();
    int len = OpUIManager.list_op.size();
    for (int i = 1; i < len; i++) {
        OutPara op = OpUIManager.list_op.get(i);
        if (op.getKey().equals(ParamConst.DIVID_TITLE)) {
            break;
        }
        show_ov.add(op);
    }
    return show_ov;
}
Also used : OutPara(com.tencent.wstt.gt.OutPara) ArrayList(java.util.ArrayList)

Example 12 with OutPara

use of com.tencent.wstt.gt.OutPara in project GT by Tencent.

the class OpUIManager method initDefaultOutputParamList.

/**
	 * 默认必备输出信息:在GT启动时完成注册
	 * 如果需要新增默认输出,请在GTApp中进行统一添加
	 * 此方法全局执行一次即可
	 */
public static void initDefaultOutputParamList() {
    list_op.clear();
    List<OutPara> outParaList = getAll();
    OutPara ov_title = new OutPara();
    ov_title.setKey(ParamConst.PROMPT_TITLE);
    ov_title.setDisplayProperty(OutPara.DISPLAY_TITLE);
    list_op.add(ov_title);
    // 添加默认显示在AC中的出参
    for (OutPara ov : outParaList) {
        if (OutPara.DISPLAY_AC == ov.getDisplayProperty()) {
            list_op.add(ov);
        }
    }
    // 添加关注线
    OutPara ov_title_divid = new OutPara();
    ov_title_divid.setKey(ParamConst.DIVID_TITLE);
    ov_title_divid.setDisplayProperty(OutPara.DISPLAY_TITLE);
    list_op.add(ov_title_divid);
    // 普通关注出参
    for (OutPara ov : outParaList) {
        if (ov.getDisplayProperty() == AidlEntry.DISPLAY_NORMAL) {
            list_op.add(ov);
        }
    }
    // 不关注线
    OutPara op_title_disable = new OutPara();
    op_title_disable.setKey(ParamConst.PROMPT_DISABLE_TITLE);
    op_title_disable.setDisplayProperty(OutPara.DISPLAY_TITLE);
    list_op.add(op_title_disable);
    // 不关注的出参
    for (OutPara ov : outParaList) {
        if (!list_op.contains(ov) && AidlEntry.DISPLAY_DISABLE == ov.getDisplayProperty()) {
            list_op.add(ov);
        }
    }
}
Also used : OutPara(com.tencent.wstt.gt.OutPara)

Example 13 with OutPara

use of com.tencent.wstt.gt.OutPara in project GT by Tencent.

the class OpUIManager method setAUTitemTop.

public static void setAUTitemTop(GTParamOutListAdapter outparam_adapter) {
    // Optional
    int pos_Divide = getOutListDividePosition();
    Client autClient = ClientManager.getInstance().getAUTClient();
    if (null == autClient) {
        return;
    }
    for (OutPara op : autClient.getAllOutParas()) {
        if (AidlEntry.DISPLAY_NORMAL == op.getDisplayProperty()) {
            int listpos = getPosition(op.getKey());
            setOutListItemToTop(outparam_adapter, listpos, pos_Divide + 1);
        }
    }
}
Also used : OutPara(com.tencent.wstt.gt.OutPara)

Example 14 with OutPara

use of com.tencent.wstt.gt.OutPara in project GT by Tencent.

the class OpUIManager method setOutListItemToTop.

private static void setOutListItemToTop(GTParamOutListAdapter outparam_adapter, int from, int to) {
    int direction = -1;
    int loop_start = from;
    int loop_end = to;
    if (from < to) {
        direction = 1;
    }
    OutPara ov_target = OpUIManager.list_op.get(from);
    for (int i = loop_start; i != loop_end; i = i + direction) {
        OpUIManager.list_op.set(i, OpUIManager.list_op.get(i + direction));
    }
    OpUIManager.list_op.set(to, ov_target);
    if (null != outparam_adapter) {
        outparam_adapter.notifyDataSetChanged();
    }
}
Also used : OutPara(com.tencent.wstt.gt.OutPara)

Example 15 with OutPara

use of com.tencent.wstt.gt.OutPara in project GT by Tencent.

the class IOutParaManager method register.

public void register(String paraName, String alias) {
    if (alias.length() > 4) {
        alias = alias.substring(0, 3) + ".";
    }
    OutPara para = new OutPara();
    para.setKey(paraName);
    para.setAlias(alias);
    para.setDisplayProperty(OutPara.DISPLAY_NORMAL);
    para.setClient(client.getKey());
    if (!contains(paraName)) {
        outParaMap.put(paraName, para);
    }
}
Also used : OutPara(com.tencent.wstt.gt.OutPara)

Aggregations

OutPara (com.tencent.wstt.gt.OutPara)30 Client (com.tencent.wstt.gt.manager.Client)4 ArrayList (java.util.ArrayList)4 TagTimeEntry (com.tencent.wstt.gt.ui.model.TagTimeEntry)3 CommonString (com.tencent.wstt.gt.utils.CommonString)3 NetUtils (com.tencent.wstt.gt.api.utils.NetUtils)2 ParamConst (com.tencent.wstt.gt.manager.ParamConst)2 Intent (android.content.Intent)1 Message (android.os.Message)1 View (android.view.View)1 TextView (android.widget.TextView)1 AidlEntry (com.tencent.wstt.gt.AidlEntry)1 InPara (com.tencent.wstt.gt.InPara)1 GTMainActivity (com.tencent.wstt.gt.activity.GTMainActivity)1 CpuUtils (com.tencent.wstt.gt.api.utils.CpuUtils)1 GWSaveEntry (com.tencent.wstt.gt.log.GWSaveEntry)1